Chapter 25. Delegating permissions to user groups to manage users using IdM CLI Delegation is one of the access control methods in IdM, along with self-service rules and role-based access control (RBAC). You can use delegation to assign permissions to one group of users to manage entries for another group of users. This section covers the following topics: Delegation rules Creating a delegation rule using IdM CLI Viewing existing delegation rules using IdM CLI Modifying a delegation rule using IdM CLI Deleting a delegation rule using IdM CLI 25.1. Delegation rules You can delegate permissions to user groups to manage users by creating delegation rules . Delegation rules allow a specific user group to perform write (edit) operations on specific attributes for users in another user group. This form of access control rule is limited to editing the values of a subset of attributes you specify in a delegation rule; it does not grant the ability to add or remove whole entries or control over unspecified attributes. Delegation rules grant permissions to existing user groups in IdM. You can use delegation to, for example, allow the managers user group to manage selected attributes of users in the employees user group. 25.2. Creating a delegation rule using IdM CLI Follow this procedure to create a delegation rule using the IdM CLI. Prerequisites You are logged in as a member of the admins group. Procedure Enter the ipa delegation-add command. Specify the following options: --group : the group who is being granted permissions to the entries of users in the user group. --membergroup : the group whose entries can be edited by members of the delegation group. --permissions : whether users will have the right to view the given attributes ( read ) and add or change the given attributes ( write ). If you do not specify permissions, only the write permission will be added. --attrs : the attributes which users in the member group are allowed to view or edit. For example: 25.3. Viewing existing delegation rules using IdM CLI Follow this procedure to view existing delegation rules using the IdM CLI. Prerequisites You are logged in as a member of the admins group. Procedure Enter the ipa delegation-find command: 25.4. Modifying a delegation rule using IdM CLI Follow this procedure to modify an existing delegation rule using the IdM CLI. Important The --attrs option overwrites whatever the list of supported attributes was, so always include the complete list of attributes along with any new attributes. This also applies to the --permissions option. Prerequisites You are logged in as a member of the admins group. Procedure Enter the ipa delegation-mod command with the desired changes. For example, to add the displayname attribute to the basic manager attributes example rule: 25.5. Deleting a delegation rule using IdM CLI Follow this procedure to delete an existing delegation rule using the IdM CLI. Prerequisites You are logged in as a member of the admins group. Procedure Enter the ipa delegation-del command. When prompted, enter the name of the delegation rule you want to delete:

Commands:
ipa delegation-add "basic manager attributes" --permissions=read --permissions=write --attrs=businesscategory --attrs=departmentnumber --attrs=employeetype --attrs=employeenumber --group=managers --membergroup=employees ------------------------------------------- Added delegation "basic manager attributes" ------------------------------------------- Delegation name: basic manager attributes Permissions: read, write Attributes: businesscategory, departmentnumber, employeetype, employeenumber Member user group: employees User group: managers
ipa delegation-find -------------------- 1 delegation matched -------------------- Delegation name: basic manager attributes Permissions: read, write Attributes: businesscategory, departmentnumber, employeenumber, employeetype Member user group: employees User group: managers ---------------------------- Number of entries returned 1 ----------------------------
ipa delegation-mod "basic manager attributes" --attrs=businesscategory --attrs=departmentnumber --attrs=employeetype --attrs=employeenumber --attrs=displayname ---------------------------------------------- Modified delegation "basic manager attributes" ---------------------------------------------- Delegation name: basic manager attributes Permissions: read, write Attributes: businesscategory, departmentnumber, employeetype, employeenumber, displayname Member user group: employees User group: managers
ipa delegation-del Delegation name: basic manager attributes --------------------------------------------- Deleted delegation "basic manager attributes" ---------------------------------------------