Jenkins login via LDAP is not performed

We want to run two Jenkins on the same server. To log in to Jenkins (using version 1.595) we use the LDAP plugin (version 1.11). The "project-based matrix authorization strategy" is selected, and my user gets administrator access. Therefore, when I can log in, I have administrator rights. The character to the left of users added to matirx shows "little man", so the user seems to be found on LDAP.

  • CASE 1: If I type in my credentials, CORRECT, I will be redirected to the open page before I clicked the "enter" button.
    • Not bad → Without allowing an anonymous user to manage, I have no chance to do anything.
  • CASE 2: If I type them, WRONG Jenkins tells me "Invalid login information. Please try again."
    • good → as expected.

Also tried "Anyone can do anything" as a security parameter. Using this, I am not redirected to the login form, but to the last page visited, from where I called "login".

It doesn't matter what type of Internet Explorer I use. The result is always the same (Chrome, Firefox, and Internet explorer were tested).

I have already discussed with a colleague in charge of the LDAP service. Input information is processed correctly (-> Jenkins LDAP settings must be correct). But this fact is clear, because incorrect login information leads to the "Invalid login information page", but there is no correct login information.

Also make sure that the firewall is not causing problems.

Do you have an idea why this is not working? Or what could be the reason? Is it possible that there is some “redirect link” for login?

+5
source share
2 answers

I found one reason!

After deleting the JENKINS_HOME environment variable, I was able to log into Jenkins ... At least through localhost. Previously, even this login was not possible. When we run two Jenkins queues on the same server, it looks like they want to use the variable as → leads to crashes. But if I try to log into the system via a network from another PC, I still can not log in (as before). The JENKINS_HOME variable is set (as before) in jekins.xml in the jenkins installation folder, so enironmentvariable does not need the right level. I open a new question, since now it is an Apache error.

I think the reason I can log in through localhost, but not through the network, should be our Apache 2.2 server, which does not process information correctly. Using localhost, I can bypass Apache (-> it works), but through the Apache network it is used (-> it does not work).

Link to a new question: Jenkins behind the Apache server / Cannot log in to Jenkins

+1
source

It is difficult to say from the information you provided, but you need to verify that the body of your username exactly matches the name that you configured in matrix authentication. LDAP is not case sensitive, but Jenkins means that you can successfully authenticate without the expected administrative access.

One way to continue would be to add an “authenticated” (case-sensitive) user to your matrix with a limited set of permissions and see if you can go through the login page.

+1
source

Source: https://habr.com/ru/post/1210681/


All Articles