tests#
__NOTOC__
Test permission
Implemented in
ipatests.test_xmlrpc.test_permission_plugin.test_permission
Misc. tests for the permission plugin
Like other tests in the test_xmlrpc suite, these tests should run on a clean IPA installation, or possibly after other similar tests.
Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm2,cn=permissions,cn=pbac,$SUFFIXcn: testperm2ipaPermAllowedAttr: cnipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topowner: cn=testowner: cn=test2Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: readipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=ipausers,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2member: cn=testpriv1,cn=privileges,cn=pbac,$SUFFIXobjectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topowner: cn=other-testowner: cn=other-test2Note: the permission entry cn=testperm,cn=permissions,cn=pbac,$SUFFIX will not be present
Note: the permission entry will look like this:
dn: cn=testperm1_rn,cn=permissions,cn=pbac,$SUFFIXcn: testperm1_rnipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: allipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=ipausers,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2member: cn=testpriv1,cn=privileges,cn=pbac,$SUFFIXobjectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topowner: cn=other-testowner: cn=other-test2Note: the permission entry cn=testperm1_rn,cn=permissions,cn=pbac,$SUFFIX will not be present
Note: the permission entry will look like this:
dn: cn=Testperm_RN,cn=permissions,cn=pbac,$SUFFIXcn: Testperm_RNipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=ipausers,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2member: cn=testpriv1,cn=privileges,cn=pbac,$SUFFIXobjectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topowner: cn=other-testowner: cn=other-test2Note: the permission entry will look like this:
dn: cn=Testperm_RN,cn=permissions,cn=pbac,$SUFFIXcn: Testperm_RNipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTargetFilter: (memberOf=cn=ipausers,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2member: cn=testpriv1,cn=privileges,cn=pbac,$SUFFIXobjectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topowner: cn=other-testowner: cn=other-test2Note: the permission entry will look like this:
dn: cn=testperm2,cn=permissions,cn=pbac,$SUFFIXcn: testperm2ipaPermAllowedAttr: cnipaPermBindRuleType: permissionipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topowner: cn=testowner: cn=test2Note: the permission entry cn=Testperm_RN,cn=permissions,cn=pbac,$SUFFIX will not be present
Note: the permission entry cn=testperm2,cn=permissions,cn=pbac,$SUFFIX will not be present
Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=editors,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry cn=testperm,cn=permissions,cn=pbac,$SUFFIX will not be present
Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermRight: writeipaPermTarget: cn=editors,cn=groups,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm3,cn=permissions,cn=pbac,$SUFFIXcn: testperm3ipaPermAllowedAttr: cnipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm3,cn=permissions,cn=pbac,$SUFFIXcn: testperm3ipaPermAllowedAttr: cnipaPermAllowedAttr: uidipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topCleanup
ipa permission_del testperm --forceipa permission_del testperm2 --forceipa permission_del testperm3 --forceipa permission_del testperm1_rn --forceipa permission_del Testperm_RN --forceipa privilege_del testpriv1Test permission rollback
Implemented in
ipatests.test_xmlrpc.test_permission_plugin.test_permission_rollback
Test rolling back changes after failed update
Like other tests in the test_xmlrpc suite, these tests should run on a clean IPA installation, or possibly after other similar tests.
Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=admin,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=admin,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=admin,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=admin,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=admin,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=admin,cn=users,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topCleanup
ipa permission_del testperm --force
Test permission sync attributes
Implemented in
ipatests.test_xmlrpc.test_permission_plugin.test_permission_sync_attributes
Test the effects of setting permission attributes
Like other tests in the test_xmlrpc suite, these tests should run on a clean IPA installation, or possibly after other similar tests.
Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=groups,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: cn=*,cn=groups,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=groups,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: cn=editors,cn=groups,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topCleanup
ipa permission_del testperm --force
Test permission sync nice
Implemented in
ipatests.test_xmlrpc.test_permission_plugin.test_permission_sync_nice
Test the effects of setting convenience options on permissions
Like other tests in the test_xmlrpc suite, these tests should run on a clean IPA installation, or possibly after other similar tests.
Note: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=users,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: uid=*,cn=users,cn=accounts,$SUFFIXipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermRight: writeipaPermTargetFilter: (memberOf=cn=admins,cn=groups,cn=accounts,$SUFFIX)ipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermRight: writeipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=groups,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: cn=*,cn=groups,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topNote: the permission entry will look like this:
dn: cn=testperm,cn=permissions,cn=pbac,$SUFFIXcn: testpermipaPermAllowedAttr: snipaPermBindRuleType: permissionipaPermLocation: cn=groups,cn=accounts,$SUFFIXipaPermRight: writeipaPermTarget: cn=editors,cn=groups,cn=accounts,$SUFFIXipaPermissionType: SYSTEMipaPermissionType: V2objectClass: groupofnamesobjectClass: ipapermissionobjectClass: ipapermissionv2objectClass: topCleanup
ipa permission_del testperm --force
Test permission flags
Implemented in
ipatests.test_xmlrpc.test_permission_plugin.test_permission_flags
Test that permission flags are handled correctly
Like other tests in the test_xmlrpc suite, these tests should run on a clean IPA installation, or possibly after other similar tests.
Cleanup
ipa permission_del testperm --force