I have two servers up and running, SP server, named webserver.com, and IdP server named idpserver.com, just for example. idpserver.com has KeyCloak installed, and LDAP federation is configured successfully. On SP server, webserver.com, I have Apache and mod_auth_mellon configured successfully. webserver.com is a client on idpserver.com. The client is configured successfully. If I run https://webserver.com against KeyCloak authentication on IdP server, i.e. https://idpserver.com, the authentication with LDAP federation is successful.
I can see mapped LDAP user on IdP server inside KeyCloak admin, and I can see some of LDAP attributes are also mapped successfully.
On SP server, i.e. webserver.com, I use the following PHP code to trace the _SERVER environment variables: ( Based on mod_auth_mellon User Guide, ‘PHP Environment Dump’ section)
<?php //header('Content-Type: text/plain'); foreach($_SERVER as $key=>$value) { if (substr($key, 0, 7) == 'MELLON_') { echo($key . '=' . $value . ""); } } ?>
I would expect the output should be something like this:
MELLON_lastname=Smith
MELLON_cn=John Smith
MELLON_username=jsmith
MELLON_mail=john.smith@abc.com
MELLON_badge=987654321abc
However, the current output is something like this:
MELLON_Role_5=uma_authorization
MELLON_Role_4=default-roles-basic
MELLON_Role_3=view-profile
MELLON_Role_2=offline_access
MELLON_Role_1=manage-account-links
MELLON_Role_0=manage-account
MELLON_Role=manage-account
MELLON_NAME_ID=K-7654321-76543-9999-a12a-c99fb9abcde
On the IdP server with KeyCloak configured, I can see the LDAP attributes are mapped successful to the username federated with LDAP server. Why I am not able to fetch the LDAP attributes on my web page server with mod_auth_mellon configured? How to make the PHP code to see real LDAP attributes after the user successfully logged in?
Any advises or helpful URL links are very welcome. Thank you very much.