Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing ldap connection should not process or bind the credentials #31081

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

pedroigor
Copy link
Contributor

@pedroigor pedroigor commented Jul 5, 2024

Closes #30821
Closes #31001

Closes keycloak#30821

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Copy link
Contributor

@rmartinc rmartinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pedroigor! LGTM!

Copy link
Contributor

@stianst stianst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on previous reviews

@stianst stianst merged commit ead1b4a into keycloak:main Jul 8, 2024
68 checks passed
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jul 8, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jul 8, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jul 8, 2024
@puggimer
Copy link

puggimer commented Jul 10, 2024

I tested this by running from quay.io/keycloak/keycloak:nightly today (July 9th, 2024). It still failed.
To make a better test case (I hope), I created a new realm. Then I added an Active Directory ldap. I tested connection, it passed. I tested authentication, it passed (though the message it gave was "Successfully connected to LDAP". Then I saved it. Clicked test connection and it now fails. Clicked test authentication it now fails. Reset the BindCredentials to the original value and both test succeed until I save it, then they fail again. (see #31001 ).

This now seems to be happening consistently - I cannot save and use an AD federation on the nightly build because the bindCredentials is always reset (since it is masked I don't know what it is set to).

I am attaching the new realm, and the trace log (though there is nothing in the log when the errors occur)

One note - this only happens when using ACTIVE DIRECTORY as the vendor. Using OTHER it works as expected. (I don't have Red Hat, Tivoli or Novell to test against)

realm-export.zip
keycloak.zip

@rmartinc
Copy link
Contributor

Argggh! It's because you are using email format for the bind DN and not a proper DN. If you use a Dn instead of the email of the admin proxy user in ldap it will work. I'm going to file a new issue. It's incredible the mess I did with such a simple change. Sorry.

@puggimer
Copy link

Hmmm - when I was given the credentials is was the email address and password which worked before.
Took me a while to find the DN for the account, but using that the issue goes away (well the mask still changes size, which is a bit weird to me, but inconsequential.
Thanks!!!

@rmartinc
Copy link
Contributor

rmartinc commented Jul 10, 2024

I created #31196 for the samaccountname@domain format.

@puggimer
Copy link

Thanks - but I think you meant to reference #31196

ahus1 pushed a commit that referenced this pull request Jul 10, 2024
…31081)

Closes #30821

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
ahus1 pushed a commit that referenced this pull request Jul 10, 2024
…31081)

Closes #30821

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
ahus1 pushed a commit that referenced this pull request Jul 10, 2024
…31081)

Closes #30821

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Captain-P-Goldfish pushed a commit to Captain-P-Goldfish/keycloak that referenced this pull request Jul 17, 2024
@stianst stianst mentioned this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants