-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Guide Request] -- GLPI Single Sign On with Keycloak #116
Comments
Hello @casetofon2, |
Hello Eduardo ! Thank you for the reply ! I've taken a look in to the callback.php file as well ( not 100% sure) but it would seem that the function that takes the current loginID isn't sent correctly to keycloak. Theoretically, that should be the field value that is sent in to the userID that keycloak would require. I'm not a coder so maybe I'm just talking non-sense ( please correct me if I do). In regards to the issue with the userID=null, I have attempted everything from mapper creation to setting the Plugin to use e-mail as login and then create a mapper on the Keycloak Side to convert that email in to userID as it would need it to be with no luck. For the callbackURL I have also discovered that if I input on the keycloakside the callback.php/provider/* ( is able to be interpreted by Keycloak as any number from what I'm seeing) both callback.php/provider/1 and callback.php/provider/* send requests to Keycloak as needed. If I go manually to the /realms/CompanyRealm/account page on the Keycloak side I can log in normally with my AD users with no difficulty whatsoever. My non-coder best guess is that I'm either not smart enough or I don't know enough about coding to figure out where the userID=null is being pulled from and sent to keycloak. I'm pasting a keycloak sso login attempt here ( and will redact company information). Maybe you see something I don't. 2025-02-09 20:05:39,384 WARN [org.keycloak.events] (executor-thread-1) type="LOGIN_ERROR", realmId="REALM-ID", realmName="CONTOSO", clientId="glpi", userId="null", ipAddress="Client_IP", error="invalid_user_credentials", auth_method="openid-connect", auth_type="code", response_type="code", redirect_uri="http://glpi.contoso.com/marketplace/singlesignon/front/callback.php/provider/1", code_id="8dee7209-fbdd-4d17-89a0-bca0ee268ecd", response_mode="query" |
Hello!
First of all ! Mr. Edgar thank GOD you made this plugin ! ( I found it a couple of days ago and have been playing with it since).
Second of all : Given my limited coding knowledge I attempted to setup SSO with your Plugin and Keycloak 26.1 version.
This is how far I got on my own with help from GhatCPT and SeepDeek. ( pun intended ).
Mappers ( I think are correct?) I setup a mapper in Keycloak for the glpi-dedicated with userID for the ( userID="null") and username ( for the sAMAccountName LDAP Attribute).
LDAP Connection Correct.
Tested login on the http://keycloak-Server/realm/ExampleRealm/account .
Login here works normally.
However :
If I attempt to do SSO , well, I get invalid username and password.
The credentials are correct, what bothers me specifically is the userId="null" field.
Together with GhatCPT , I've disected every angle suggested by ChatGPT and we came down to this conclusion :
Keycloak is receiving BAD requests from the GLPI SSO Plugin ?
Anyone got any input ?
in the developer tools of the web browser : it states after I push the test single sign on : Error 400 BAD REQUEST.
But I think I'm too dumb, even with GhatCPT to figure out where the "boo-boo" is.
Any help is apreciated!
I'm also attaching a screenshot of the SSO Plugin Configuration in case it would help
The text was updated successfully, but these errors were encountered: