Fix the change_password permissions and the DNS access controls.

The change_password permission was too broad, limit it to users.

The DNS access controls rolled everything into a single ACI. I broke
it out into separate ACIs for add, delete and add. I also added a new
dns type for the permission plugin.

ticket 628
This commit is contained in:
Rob Crittenden 2010-12-17 15:04:47 -05:00 committed by Adam Young
parent b66c680f86
commit 1207a7c83f
4 changed files with 33 additions and 8 deletions

View File

@ -493,7 +493,7 @@ dn: $SUFFIX
changetype: modify
add: aci
aci: (target = "ldap:///uid=*,cn=users,cn=accounts,$SUFFIX")(version 3.0;acl "Add Users";allow (add) groupdn = "ldap:///cn=addusers,cn=permissions,cn=accounts,$SUFFIX";)
aci: (targetattr = "userPassword || krbPrincipalKey || sambaLMPassword || sambaNTPassword || passwordHistory")(version 3.0;acl "Change a user password";allow (write) groupdn = "ldap:///cn=change_password,cn=permissions,cn=accounts,$SUFFIX";)
aci: (target = "ldap:///uid=*,cn=users,cn=accounts,$SUFFIX")(targetattr = "userPassword || krbPrincipalKey || sambaLMPassword || sambaNTPassword || passwordHistory")(version 3.0;acl "Change a user password";allow (write) groupdn = "ldap:///cn=change_password,cn=permissions,cn=accounts,$SUFFIX";)
aci: (targetattr = "member")(target = "ldap:///cn=ipausers,cn=groups,cn=accounts,$SUFFIX")(version 3.0;acl "Add user to default group";allow (write) groupdn = "ldap:///cn=add_user_to_default_group,cn=permissions,cn=accounts,$SUFFIX";)
aci: (target = "ldap:///uid=*,cn=users,cn=accounts,$SUFFIX")(version 3.0;acl "Remove Users";allow (delete) groupdn = "ldap:///cn=removeusers,cn=permissions,cn=accounts,$SUFFIX";)
aci: (targetattr = "givenName || sn || cn || displayName || title || initials || loginShell || gecos || homePhone || mobile || pager || facsimileTelephoneNumber || telephoneNumber || street || roomNumber || l || st || postalCode || manager || secretary || description || carLicense || labeledURI || inetUserHTTPURL || seeAlso || employeeType || businessCategory || ou || mepManagedEntry || objectclass")(target = "ldap:///uid=*,cn=users,cn=accounts,$SUFFIX")(version 3.0;acl "Modify Users";allow (write) groupdn = "ldap:///cn=modifyusers,cn=permissions,cn=accounts,$SUFFIX";)

View File

@ -3,17 +3,41 @@ changetype: add
objectClass: nsContainer
objectClass: top
cn: dns
aci: (targetfilter = "(objectClass=idnsRecord)")(targetattr != "aci")(version 3.0; acl "DNS Servers Updates"; allow (add,write,delete) groupdn = "ldap:///cn=update_dns,cn=permissions,cn=accounts,$SUFFIX";)
dn: cn=update_dns,cn=permissions,cn=accounts,$SUFFIX
dn: cn=add dns entries,cn=permissions,cn=accounts,$SUFFIX
changetype: add
objectClass: top
objectClass: groupofnames
cn: update_dns
description: DNS Servers Updates
objectClass: top
cn: add dns entries
description: Add DNS entries
member: cn=dnsadmin,cn=privileges,cn=accounts,$SUFFIX
member: cn=dnsserver,cn=privileges,cn=accounts,$SUFFIX
dn: cn=remove dns entries,cn=permissions,cn=accounts,$SUFFIX
changetype: add
objectClass: groupofnames
objectClass: top
cn: remove dns entries
description: Remove DNS entries
member: cn=dnsadmin,cn=privileges,cn=accounts,$SUFFIX
member: cn=dnsserver,cn=privileges,cn=accounts,$SUFFIX
dn: cn=update dns entries,cn=permissions,cn=accounts,$SUFFIX
changetype: add
objectClass: groupofnames
objectClass: top
cn: update dns entries
description: Update DNS entries
member: cn=dnsadmin,cn=privileges,cn=accounts,$SUFFIX
member: cn=dnsserver,cn=privileges,cn=accounts,$SUFFIX
dn: $SUFFIX
changetype: modify
add: aci
aci: (target = "ldap:///idnsname=*,cn=dns,$SUFFIX")(version 3.0;acl "Add DNS entries";allow (add) groupdn = "ldap:///cn=add dns entries,cn=permissions,cn=accounts,$SUFFIX";)
aci: (target = "ldap:///idnsname=*,cn=dns,$SUFFIX")(version 3.0;acl "Remove DNS entries";allow (delete) groupdn = "ldap:///cn=remove dns entries,cn=permissions,cn=accounts,$SUFFIX";)
aci: (targetattr = "idnsname || cn || idnsallowdynupdate || dnsttl || dnsclass || arecord || aaaarecord || a6record || nsrecord || cnamerecord || ptrrecord || srvrecord || txtrecord || mxrecord || mdrecord || hinforecord || minforecord || afsdbrecord || sigrecord || keyrecord || locrecord || nxtrecord || naptrrecord || kxrecord || certrecord || dnamerecord || dsrecord || sshfprecord || rrsigrecord || nsecrecord || idnsname || idnszoneactive || idnssoamname || idnssoarname || idnssoaserial || idnssoarefresh || idnssoaretry || idnssoaexpire || idnssoaminimum || idnsupdatepolicy")(target = "ldap:///idnsname=*,cn=dns,$SUFFIX")(version 3.0;acl "Update DNS entries";allow (write) groupdn = "ldap:///cn=update dns entries,cn=permissions,cn=accounts,$SUFFIX";)
dn: cn=dnsadmin,cn=privileges,cn=accounts,$SUFFIX
changetype: add
objectClass: top

View File

@ -135,6 +135,7 @@ _type_map = {
'hostgroup': 'ldap:///cn=*,%s,%s' % (api.env.container_hostgroup, api.env.basedn),
'service': 'ldap:///krbprincipalname=*,%s,%s' % (api.env.container_service, api.env.basedn),
'netgroup': 'ldap:///ipauniqueid=*,%s,%s' % (api.env.container_netgroup, api.env.basedn),
'dns': 'ldap:///idnsname=*,%s,%s' % (api.env.container_dns, api.env.basedn),
}
_valid_permissions_values = [
@ -378,7 +379,7 @@ class aci(Object):
cli_name='type',
label=_('Type'),
doc=_('type of IPA object (user, group, host, hostgroup, service, netgroup)'),
values=(u'user', u'group', u'host', u'service', u'hostgroup', u'netgroup'),
values=(u'user', u'group', u'host', u'service', u'hostgroup', u'netgroup', u'dns',),
),
Str('memberof?',
cli_name='memberof',

View File

@ -120,7 +120,7 @@ class permission(LDAPObject):
cli_name='type',
label=_('Type'),
doc=_('Type of IPA object (user, group, host, hostgroup, service, netgroup)'),
values=(u'user', u'group', u'host', u'service', u'hostgroup', u'netgroup'),
values=(u'user', u'group', u'host', u'service', u'hostgroup', u'netgroup', u'dns',),
),
Str('memberof?',
cli_name='memberof',