# Split userPassword and sshPublicKey into separate rules so system # accounts (uid=guix, uid=kerberos: everything under ou=system) can still # read SSH keys for sshd's AuthorizedKeysCommand and sssd's ssh responder, # but no longer read userPassword. uid=guix's password is in /gnu/store on # every machine (LDAP_AUTHTOK), so that read gave any local user every # password hash and pw-totp secret. # # Password checks are unaffected: sssd (pam_sss, auth_provider ldap) binds # as the user, which is "by anonymous auth"; offline logins use sssd's own # credential cache; passwd changes as the user are "by self write". # # replace rewrites the whole list; {1}..{8} are the old {1}..{8} shifted down # one and otherwise unchanged. dn: olcDatabase={1}mdb,cn=config changetype: modify replace: olcAccess olcAccess: {0}to attrs=userPassword by self write by dn.exact="uid=daemon,ou=system,ou=accounts,dc=metznet,dc=ca" write by anonymous auth by * none olcAccess: {1}to attrs=sshPublicKey by self write by dn.exact="uid=daemon,ou=system,ou=accounts,dc=metznet,dc=ca" write by dn.children="ou=system,ou=accounts,dc=metznet,dc=ca" read by * none olcAccess: {2}to attrs=shadowLastChange by self write by * read olcAccess: {3}to attrs=krbPrincipalKey by anonymous auth by dn.exact="uid=kerberos,ou=system,ou=accounts,dc=metznet,dc=ca" write by self write by * none olcAccess: {4}to dn.subtree="ou=groups,dc=metznet,dc=ca" by * read break olcAccess: {5}to dn.subtree="cn=kerberos,dc=metznet,dc=ca" by dn.exact="uid=kerberos,ou=system,ou=accounts,dc=metznet,dc=ca" write by * none break olcAccess: {6}to dn.subtree="ou=accounts,dc=metznet,dc=ca" by dn.exact="uid=kerberos,ou=system,ou=accounts,dc=metznet,dc=ca" write by dn.exact="uid=daemon,ou=system,ou=accounts,dc=metznet,dc=ca" write by * none break olcAccess: {7}to dn.subtree="ou=services,dc=metznet,dc=ca" by dn.exact="uid=kerberos,ou=system,ou=accounts,dc=metznet,dc=ca" write by dn.exact="uid=daemon,ou=system,ou=accounts,dc=metznet,dc=ca" write by * none break olcAccess: {8}to attrs=krbPrincipalName,krbLastPwdChange,krbLastFailedAuth,krbLoginFailedCount,krbLastSuccessfulAuth,krbExtraData,krbTicketFlags,krbPasswordExpiration by self read by dn.exact="uid=kerberos,ou=system,ou=accounts,dc=metznet,dc=ca" write by dn.exact="uid=daemon,ou=system,ou=accounts,dc=metznet,dc=ca" write by * none olcAccess: {9}to * by * read