summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-06-04 17:39:10 +0200
committerMartin Kosek <mkosek@redhat.com>2014-06-24 13:53:40 +0200
commitf881f063647577b59f6d2d3a8d00225840498fe8 (patch)
tree8d532d814e4106219080c7d9b3990f646e0e9e9b
parent0c4d13e136cb1c2b64df8954d91ff88f5590e889 (diff)
downloadfreeipa-f881f063647577b59f6d2d3a8d00225840498fe8.tar.gz
freeipa-f881f063647577b59f6d2d3a8d00225840498fe8.tar.xz
freeipa-f881f063647577b59f6d2d3a8d00225840498fe8.zip
Convert the Modify privilege membership permission to managed
Part of the work for: https://fedorahosted.org/freeipa/ticket/4346 Reviewed-By: Martin Kosek <mkosek@redhat.com>
-rw-r--r--ACI.txt2
-rw-r--r--install/share/delegation.ldif9
-rw-r--r--ipalib/plugins/permission.py8
3 files changed, 10 insertions, 9 deletions
diff --git a/ACI.txt b/ACI.txt
index 5b1038176..d3da774d1 100644
--- a/ACI.txt
+++ b/ACI.txt
@@ -128,6 +128,8 @@ dn: cn=System: Read Netgroups,cn=permissions,cn=pbac,dc=ipa,dc=example
aci: (targetattr = "cn || description || hostcategory || ipaenabledflag || ipauniqueid || nisdomainname || objectclass || usercategory")(targetfilter = "(objectclass=ipanisnetgroup)")(version 3.0;acl "permission:System: Read Netgroups";allow (compare,read,search) userdn = "ldap:///all";)
dn: cn=System: Remove Netgroups,cn=permissions,cn=pbac,dc=ipa,dc=example
aci: (targetfilter = "(objectclass=ipanisnetgroup)")(version 3.0;acl "permission:System: Remove Netgroups";allow (delete) groupdn = "ldap:///cn=System: Remove Netgroups,cn=permissions,cn=pbac,dc=ipa,dc=example";)
+dn: cn=System: Modify Privilege Membership,cn=permissions,cn=pbac,dc=ipa,dc=example
+aci: (targetattr = "member")(targetfilter = "(objectclass=ipapermission)")(version 3.0;acl "permission:System: Modify Privilege Membership";allow (write) groupdn = "ldap:///cn=System: Modify Privilege Membership,cn=permissions,cn=pbac,dc=ipa,dc=example";)
dn: cn=System: Read ACIs,cn=permissions,cn=pbac,dc=ipa,dc=example
aci: (targetattr = "aci")(version 3.0;acl "permission:System: Read ACIs";allow (compare,read,search) groupdn = "ldap:///cn=System: Read ACIs,cn=permissions,cn=pbac,dc=ipa,dc=example";)
dn: cn=System: Read Permissions,cn=permissions,cn=pbac,dc=ipa,dc=example
diff --git a/install/share/delegation.ldif b/install/share/delegation.ldif
index 513829bd6..0365376a8 100644
--- a/install/share/delegation.ldif
+++ b/install/share/delegation.ldif
@@ -193,14 +193,6 @@ objectClass: ipapermission
cn: Modify Role membership
member: cn=Delegation Administrator,cn=privileges,cn=pbac,$SUFFIX
-dn: cn=Modify privilege membership,cn=permissions,cn=pbac,$SUFFIX
-changetype: add
-objectClass: top
-objectClass: groupofnames
-objectClass: ipapermission
-cn: Modify privilege membership
-member: cn=Delegation Administrator,cn=privileges,cn=pbac,$SUFFIX
-
dn: cn=Manage service keytab,cn=permissions,cn=pbac,$SUFFIX
changetype: add
objectClass: top
@@ -274,7 +266,6 @@ aci: (target = "ldap:///cn=*,cn=roles,cn=accounts,$SUFFIX")(version 3.0;acl "per
aci: (target = "ldap:///cn=*,cn=roles,cn=accounts,$SUFFIX")(version 3.0;acl "permission:Remove Roles";allow (delete) groupdn = "ldap:///cn=Remove Roles,cn=permissions,cn=pbac,$SUFFIX";)
aci: (targetattr = "cn || description")(target = "ldap:///cn=*,cn=roles,cn=accounts,$SUFFIX")(version 3.0; acl "permission:Modify Roles";allow (write) groupdn = "ldap:///cn=Modify Roles,cn=permissions,cn=pbac,$SUFFIX";)
aci: (targetattr = "member")(target = "ldap:///cn=*,cn=roles,cn=accounts,$SUFFIX")(version 3.0;acl "permission:Modify Role membership";allow (write) groupdn = "ldap:///cn=Modify Role membership,cn=permissions,cn=pbac,$SUFFIX";)
-aci: (targetattr = "member")(target = "ldap:///cn=*,cn=permissions,cn=pbac,$SUFFIX")(version 3.0;acl "permission:Modify privilege membership";allow (write) groupdn = "ldap:///cn=Modify privilege membership,cn=permissions,cn=pbac,$SUFFIX";)
# Service keytab admin
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index 52ab09b14..e7bd22091 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -205,6 +205,14 @@ class permission(baseldap.LDAPObject):
'ipapermdefaultattr': {'aci'},
'default_privileges': {'RBAC Readers'},
},
+ 'System: Modify Privilege Membership': {
+ 'ipapermright': {'write'},
+ 'ipapermdefaultattr': {'member'},
+ 'replaces': [
+ '(targetattr = "member")(target = "ldap:///cn=*,cn=permissions,cn=pbac,$SUFFIX")(version 3.0;acl "permission:Modify privilege membership";allow (write) groupdn = "ldap:///cn=Modify privilege membership,cn=permissions,cn=pbac,$SUFFIX";)',
+ ],
+ 'default_privileges': {'Delegation Administrator'},
+ },
}
label = _('Permissions')