Hello FreeIPA users..
I am currently trying to setup an account for syncing users hashed userpassword attributes to our google directory.. Basically we use gmail and sync users ldap passwords so that their login matches their ldap login.. this a one way sync, and google only requires the hashes (md5, base64, SHA1)..
From what I can gather, the cn=Directory Manager role is the only one that can access users userpassword attributes, but I was told it is possible to maybe create a service account that is able to also access this? It only needs read permissions.. I have however not been able to get this working, and I do not find the documentation on this to be vary clear..
Can anyone point me in the right direction? or help me to set this up?
As of right not I have a user account (google), enrolled in a group (google_sync), and would like to assign permissions to this group to read the userpassword attribute from a group called "mail"
uid=google,cn=users,cn=accounts,dc=xx,dc=xx cn=google_sync,cn=groups,cn=accounts,dc=xx,dc=xx cn=mail,cn=groups,dc=accounts,dc=xx,dc=xx
As an additonal question, are userpasswords hashed in base64 or? I cant seem to find an answer to this..
Mvh. René Johansen Systemadministrator
Christians Brygge 1 1219 København K Tlf: 31625208
René Johansen via FreeIPA-users wrote:
Hello FreeIPA users..
I am currently trying to setup an account for syncing users hashed userpassword attributes to our google directory.. Basically we use gmail and sync users ldap passwords so that their login matches their ldap login.. this a one way sync, and google only requires the hashes (md5, base64, SHA1)..
From what I can gather, the cn=Directory Manager role is the only one that can access users userpassword attributes, but I was told it is possible to maybe create a service account that is able to also access this? It only needs read permissions.. I have however not been able to get this working, and I do not find the documentation on this to be vary clear..
Can anyone point me in the right direction? or help me to set this up?
As of right not I have a user account (google), enrolled in a group (google_sync), and would like to assign permissions to this group to read the userpassword attribute from a group called "mail"
uid=google,cn=users,cn=accounts,dc=xx,dc=xx cn=google_sync,cn=groups,cn=accounts,dc=xx,dc=xx cn=mail,cn=groups,dc=accounts,dc=xx,dc=xx
See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/htm...
As an additonal question, are userpasswords hashed in base64 or? I cant seem to find an answer to this..
Both. Decode it and you'll see the hashing.
rob
Hi Rob (and others)..
Thank you for taking the time to respond..
I tried the suggested solution and it does not seem to allow the google user to modify ipa_pwd_extop
Specificly I tried the following:
``` dn: cn=ipa_pwd_extop,cn=plugins,cn=config changetype: modify add: passSyncMamagersDNs passSyncManagersDNs: uid=google,cn=users,cn=accounts,dc=XXX,dc=XXX ```
But the service still is not syncing password hashes (I am using Google Cloud Directory Sync, it only reads hashes (from ldap) and compares them to stored hashes, and updates the stored hashes if a new password has been set i ldap, there are no writes from google to ldap), as seen when running GCDS in debug mode (it dosent get userPassword attribute):
``` [2020-09-11 10:32:15,938+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Executing LDAP rule, scope "SUBTREE", filter "memberof=cn=mail,cn=groups,cn=accounts,dc=dsl,dc=lan" [2020-09-11 10:32:15,943+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "uid" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "mail" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "givenName" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "sn" ```
I have been suggested to try adding permissions via an aci, but am unsure of how to do this.. The following was suggested:
`aci: (targetattr = "userPassword") (target = "ldap:///cn=users,cn=accounts,dc=<my>,dc=<domain>") (version 3.0;acl "Allow password read";allow (read,compare,search)(groupdn = "ldap:///<system accounts group dn>");)`
What would I need to specify as "groupdn"?
Does anyone have any advice? I have been scouring google, but I have not been able to find any definitive answers :/
Mvh. René Johansen Systemadministrator
Christians Brygge 1 1219 København K Tlf: 31625208
Den fre. 11. sep. 2020 kl. 10.47 skrev René Johansen via FreeIPA-users < freeipa-users@lists.fedorahosted.org>:
Hi Rob (and others)..
Thank you for taking the time to respond..
I tried the suggested solution and it does not seem to allow the google user to modify ipa_pwd_extop
Specificly I tried the following:
dn: cn=ipa_pwd_extop,cn=plugins,cn=config changetype: modify add: passSyncMamagersDNs passSyncManagersDNs: uid=google,cn=users,cn=accounts,dc=XXX,dc=XXXBut the service still is not syncing password hashes (I am using Google Cloud Directory Sync, it only reads hashes (from ldap) and compares them to stored hashes, and updates the stored hashes if a new password has been set i ldap, there are no writes from google to ldap), as seen when running GCDS in debug mode (it dosent get userPassword attribute):
[2020-09-11 10:32:15,938+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Executing LDAP rule, scope "SUBTREE", filter "memberof=cn=mail,cn=groups,cn=accounts,dc=dsl,dc=lan" [2020-09-11 10:32:15,943+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "uid" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "mail" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "givenName" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "sn"I have been suggested to try adding permissions via an aci, but am unsure of how to do this.. The following was suggested:
`aci: (targetattr = "userPassword") (target = "ldap:///cn=users,cn=accounts,dc=<my>,dc=<domain>") (version 3.0;acl "Allow password read";allow (read,compare,search)(groupdn = "ldap:///<system accounts group dn>");)`
What would I need to specify as "groupdn"? _______________________________________________ FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org To unsubscribe send an email to freeipa-users-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahoste...
René Johansen via FreeIPA-users wrote:
Does anyone have any advice? I have been scouring google, but I have not been able to find any definitive answers :/
We strongly discourage allowing anything to read password hashes as this significantly compromises the security of the system.
Adding the sync user to passSyncManagersDNs is not really needed since this is a read-only (and there is a typo in the LDIF anyway). When you said sync before I though that the external site would be writing passwords into IPA.
An ACI to allow a system account to read the password attribute would look like:
aci: (targetattr = "userPassword") (target = "ldap:///uid=*,cn=users,cn=accounts,dc=<my>,dc=<domain>") (version 3.0;acl "Allow password read";allow (read,compare,search)(userdn = "ldap:///<system account dn>");)
But again, this is not recommended. I seriously considered not arming you with the information.
rob
Mvh. René Johansen Systemadministrator
Christians Brygge 1 1219 København K Tlf: 31625208
Den fre. 11. sep. 2020 kl. 10.47 skrev René Johansen via FreeIPA-users <freeipa-users@lists.fedorahosted.org mailto:freeipa-users@lists.fedorahosted.org>:
Hi Rob (and others).. Thank you for taking the time to respond.. I tried the suggested solution and it does not seem to allow the google user to modify ipa_pwd_extop Specificly I tried the following: ``` dn: cn=ipa_pwd_extop,cn=plugins,cn=config changetype: modify add: passSyncMamagersDNs passSyncManagersDNs: uid=google,cn=users,cn=accounts,dc=XXX,dc=XXX ``` But the service still is not syncing password hashes (I am using Google Cloud Directory Sync, it only reads hashes (from ldap) and compares them to stored hashes, and updates the stored hashes if a new password has been set i ldap, there are no writes from google to ldap), as seen when running GCDS in debug mode (it dosent get userPassword attribute): ``` [2020-09-11 10:32:15,938+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Executing LDAP rule, scope "SUBTREE", filter "memberof=cn=mail,cn=groups,cn=accounts,dc=dsl,dc=lan" [2020-09-11 10:32:15,943+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "uid" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "mail" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "givenName" [2020-09-11 10:32:15,945+0200] [pool-3-thread-24] [DEBUG] [plugin.ldap.AbstractLdapHandler] Will retrieve notable LDAP attribute "sn" ``` I have been suggested to try adding permissions via an aci, but am unsure of how to do this.. The following was suggested: `aci: (targetattr = "userPassword") (target = "ldap:///cn=users,cn=accounts,dc=<my>,dc=<domain>") (version 3.0;acl "Allow password read";allow (read,compare,search)(groupdn = "ldap:///<system accounts group dn>");)` What would I need to specify as "groupdn"? _______________________________________________ FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org <mailto:freeipa-users@lists.fedorahosted.org> To unsubscribe send an email to freeipa-users-leave@lists.fedorahosted.org <mailto:freeipa-users-leave@lists.fedorahosted.org> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahosted.org
FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org To unsubscribe send an email to freeipa-users-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahoste...
freeipa-users@lists.fedorahosted.org