AD/LDAP Integration #1366
-
Hi there, I want to start integrating our openDCIM with AD/LDAP. Can the site be fixed or is there another point for information? Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 23 replies
-
https://github.com/opendcim/openDCIM/wiki/LDAP |
Beta Was this translation helpful? Give feedback.
-
I am yet unable to get a working AD/LDAP integration. edit: I think I found something within /var/opt/rh/rh-php73/log/php-fpm/www-error.log What is the maintenance mode and how do I get out of it? |
Beta Was this translation helpful? Give feedback.
-
You likely still have a .htaccess file at the root of your installation or
you have the basic auth directive in your virtualhost config of apache.
Scott
From: LFrank2021
Sent: Thursday, June 15, 2023 11:50 AM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; State change
***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
Update worked without any problems.
Still trying to work out Modern Auth.
Noticed something: Currently I get asked by Apache for a basic auth and then
get redirected to login_ldap.php.
Is there a way to avoid being asked for the basic auth?
-
Reply to this email directly, view it on GitHub
<#1366 (comment)
7964> , or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMTY62RLFYSGSGY3IBJTOLXL
MVKVANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you modified the open/close state.
<https://github.com/notifications/beacon/AAMTY67SWVZBTEMHDUEQSQTXLMVKVA5CNFS
M6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3T
UL5UWJTQALZV3Y.gif> Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You’d just get rid of it.
From: LFrank2021
Sent: Friday, June 16, 2023 9:57 AM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; State change ***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
Currently I still have the infromation from initial install in there:
AuthType Basic
AuthName "openDCIM"
AuthUserFile /my/path/.htpasswd
Require valid-user
Would I change it to this?
AuthType None
Require all granted
—
Reply to this email directly, view it on GitHub <#1366 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMTY62DWBNNO542JZ4XUFDXLRQ4JANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you modified the open/close state. <https://github.com/notifications/beacon/AAMTY623IOYH6RL27KNOMBLXLRQ4JA5CNFSM6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAL2IUI.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
You have this wonderful button to import the metadata.xml from the SAML IdP site.
I assume the follwing:
|
Beta Was this translation helpful? Give feedback.
-
https://{$install_URL}/saml/metadata.php <https://%7b$install_URL%7d/saml/metadata.php>
Though there is no error checking to make sure that you actually have sane/complete data, but it’s there. If you get XML at that URL, you’re good. If you get an error, read what it says and make sure you’ve filled that in.
Scott
From: LFrank2021
Sent: Tuesday, June 20, 2023 8:33 AM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; State change ***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
You have this wonderful button to import the metadata.xml from the SAML IdP site.
Is there a similar feature from openDCIM site?
I have the option to upload a metadata.xml file to my SAML IdP for the configuration of the SP (openDCIM).
Else I am needed to provide
1. Entity ID
2. Logout URL (POST Binding and/or REDIRECT Binding)
3. Assertion Consumer Service URL (POST Binding and/or REDIRECT binding)
I assume the follwing:
1. the Entity ID I set on the SAML page
2. login_ldap.php?
3. login_ldap.php?
—
Reply to this email directly, view it on GitHub <#1366 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMTY65VDULXDTWF6QGRLEDXMGKBHANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you modified the open/close state. <https://github.com/notifications/beacon/AAMTY642JVIAJPMOEKRQISLXMGKBHA5CNFSM6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAL4IA2.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Watch the YouTube video for SAML.
From: LFrank2021
Sent: Tuesday, June 20, 2023 8:58 AM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; State change ***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
And do you have some information on how to get the memberOf Attribute up and running?
I am sorry, if this goes deep into SAML IdP setup.
—
Reply to this email directly, view it on GitHub <#1366 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMTY67ISWQOQF4ZBOFMRBDXMGM5VANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you modified the open/close state. <https://github.com/notifications/beacon/AAMTY66HVRUZFLEKLXEV34TXMGM5VA5CNFSM6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAL4ISM.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
We worked it out (mostly). |
Beta Was this translation helpful? Give feedback.
-
If you aren’t running at the root of your site – such as dcim.myserver.com – then you are asking for headaches. Period.
Scott
From: LFrank2021 ***@***.***>
Sent: Friday, June 23, 2023 7:33 AM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; State change ***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
We worked it out (mostly).
Who is responsible for the redirection after login?
My openDCIM is running on https://myserver/dcim and after the login with SAML I get redirected to https://myserver.
And after Logout I get a failure page from IdP.
As mentioned before this might be a result of my lack of httpd-configuration knowledge.
—
Reply to this email directly, view it on GitHub <#1366 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMTY6YSBQRKM36QYBYY5E3XMV5GZANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you modified the open/close state. <https://github.com/notifications/beacon/AAMTY66FX4JR7QRQY6NKB2LXMV5GZA5CNFSM6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAL6FIG.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Any idea why this is happening on my productive Instance?
|
Beta Was this translation helpful? Give feedback.
-
I have another question. |
Beta Was this translation helpful? Give feedback.
-
So, now I have a working setup (see #1366 (reply in thread)) but strangely I have a colleague that can login though they do not have any of the needed memberOf attributes. I assume it is still a faulty httpd config:
|
Beta Was this translation helpful? Give feedback.
-
Are you saying that your IdP doesn’t like a ? with nothing trailing? That appears to be the only real difference between yours and the codebase, other than we recently added the SameSite=>Strict cookie for security purposes.
Scott
From: LFrank2021
Sent: Wednesday, August 09, 2023 9:22 AM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; Mention ***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
Our IdP does not allow the ? at the redirect URL.
At least not as the final character.
And I am not understanding, why it is added there.
Isn't it only necessary if any Query string is submitted?
This is working for me:
if( AUTHENTICATION=="Saml" && !isset($_SESSION['userid']) && php_sapi_name()!="cli" && !isset($loginPage))
{
error_log("Query String: " . sanitize($_SERVER['QUERY_STRING']));
if(sanitize($_SERVER['QUERY_STRING']) != "")
$savedurl = $_SERVER['SCRIPT_NAME'] . "?" . sanitize($_SERVER['QUERY_STRING']);
else
$savedurl = $_SERVER['SCRIPT_NAME'];
setcookie( 'targeturl', $savedurl, time()+60 );
header("Location: ".redirect('saml/login.php'));
exit;
}
The error_log is included just for debug needs.
Which result in a working instance and this error_log output:
[Wed Aug 09 15:10:33.467258 2023] [php:notice] [pid 127488] [client ] Logged out, redirecting back to home page., referer: https://mydcim.mydomain.me/
[Wed Aug 09 15:10:33.475241 2023] [php:notice] [pid 127488] [client ] Query String: , referer: https://mydcim.mydomain.me/
[Wed Aug 09 15:10:38.336651 2023] [php:notice] [pid 127488] [client ] Query String: cabinetid=16
Could this be a general fix?
—
Reply to this email directly, view it on GitHub <#1366 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMTY6ZDLHCD35VYMZJKVQDXUOFJJANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AAMTY6ZL6VGVWJVHHU57MTLXUOFJJA5CNFSM6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAMXXSM.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Yeah, we can integrate a check to never add a dangling question mark.
From: LFrank2021
Sent: Wednesday, August 09, 2023 12:37 PM
To: opendcim/openDCIM ***@***.***>
Cc: Scott Milliken ***@***.***>; Mention ***@***.***>
Subject: Re: [opendcim/openDCIM] AD/LDAP Integration (Discussion #1366)
Yes, that is exactly the problem.
The IdP configuration UI does not accept the ? in general. (Information from the IdP administrator.)
Without it or with more data (dc_stats.php?dc=2) it seems to work.
That's why I added the 'crude' workaround.
—
Reply to this email directly, view it on GitHub <#1366 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMTY6YOJ2V2GY67CKG67PDXUO4CNANCNFSM6AAAAAAYW2LQXM> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AAMTY67Q7ROUWQXHWQWBTA3XUO4CNA5CNFSM6AAAAAAYW2LQXOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAMX33C.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
https://github.com/opendcim/openDCIM/wiki/LDAP
https://github.com/opendcim/openDCIM/wiki/ModernAuth