Este contenido no está disponible en el idioma seleccionado.
6.9.6. Configure Group Role Assignment using the Management CLI
/core-service=management/access=authorization as role-mapping elements.
/core-service=management/access=authorization location:
[standalone@localhost:9999] cd /core-service=management/access=authorization
[standalone@localhost:9999] cd /core-service=management/access=authorization
Procedure 6.16. Viewing Group Role Assignment Configuration
- Use the
read-children-namesoperation to get a complete list of the configured roles:/core-service=management/access=authorization:read-children-names(child-type=role-mapping)
/core-service=management/access=authorization:read-children-names(child-type=role-mapping)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the
read-resourceoperation of a specified role-mapping to get the full details of a specific role:/core-service=management/access=authorization/role-mapping=ROLENAME:read-resource(recursive=true)
/core-service=management/access=authorization/role-mapping=ROLENAME:read-resource(recursive=true)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 6.17. Add a new role
- Use the
addoperation to add a new role configuration./core-service=management/access=authorization/role-mapping=ROLENAME:add
/core-service=management/access=authorization/role-mapping=ROLENAME:addCopy to Clipboard Copied! Toggle word wrap Toggle overflow [standalone@localhost:9999 access=authorization] ./role-mapping=Auditor:add {"outcome" => "success"} [standalone@localhost:9999 access=authorization][standalone@localhost:9999 access=authorization] ./role-mapping=Auditor:add {"outcome" => "success"} [standalone@localhost:9999 access=authorization]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 6.18. Add a Group as included in a role
- Use the
addoperation to add a Group entry to the includes list of the role./core-service=management/access=authorization/role-mapping=ROLENAME/include=ALIAS:add(name=GROUPNAME, type=GROUP)
/core-service=management/access=authorization/role-mapping=ROLENAME/include=ALIAS:add(name=GROUPNAME, type=GROUP)Copy to Clipboard Copied! Toggle word wrap Toggle overflow ROLENAME is the name of the role being configured.GROUPNAME is the name of the group being added to the include list.ALIASis a unique name for this mapping. Red Hat recommends that you use a naming convention for your aliases such asgroup-GROUPNAME.[standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/include=group-investigators:add(name=investigators, type=GROUP) {"outcome" => "success"} [standalone@localhost:9999 access=authorization][standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/include=group-investigators:add(name=investigators, type=GROUP) {"outcome" => "success"} [standalone@localhost:9999 access=authorization]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 6.19. Add a group as excluded in a role
- Use the
addoperation to add a group entry to the excludes list of the role./core-service=management/access=authorization/role-mapping=ROLENAME/exclude=ALIAS:add(name=GROUPNAME, type=GROUP)
/core-service=management/access=authorization/role-mapping=ROLENAME/exclude=ALIAS:add(name=GROUPNAME, type=GROUP)Copy to Clipboard Copied! Toggle word wrap Toggle overflow ROLENAME is the name of the role being configuredGROUPNAME is the name of the group being added to the include listALIASis a unique name for this mapping. Red Hat recommends that you use a naming convention for your aliases such asgroup-GROUPNAME.[standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/exclude=group-supervisors:add(name=supervisors, type=GROUP) {"outcome" => "success"} [standalone@localhost:9999 access=authorization][standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/exclude=group-supervisors:add(name=supervisors, type=GROUP) {"outcome" => "success"} [standalone@localhost:9999 access=authorization]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 6.20. Remove group role include configuration
- Use the
removeoperation to remove the entry./core-service=management/access=authorization/role-mapping=ROLENAME/include=ALIAS:remove
/core-service=management/access=authorization/role-mapping=ROLENAME/include=ALIAS:removeCopy to Clipboard Copied! Toggle word wrap Toggle overflow ROLENAME is the name of the role being configuredALIASis a unique name for this mapping. Red Hat recommends that you use a naming convention for your aliases such asgroup-GROUPNAME.[standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/include=group-investigators:remove {"outcome" => "success"} [standalone@localhost:9999 access=authorization][standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/include=group-investigators:remove {"outcome" => "success"} [standalone@localhost:9999 access=authorization]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Removing the group from the list of includes does not remove the group from the system, nor does it guarantee that the role won't be assigned to users in this group. The role might still be assigned to users in the group individually.
Procedure 6.21. Remove a user group exclude entry
- Use the
removeoperation to remove the entry./core-service=management/access=authorization/role-mapping=ROLENAME/exclude=ALIAS:remove
/core-service=management/access=authorization/role-mapping=ROLENAME/exclude=ALIAS:removeCopy to Clipboard Copied! Toggle word wrap Toggle overflow ROLENAME is the name of the role being configured.ALIASis a unique name for this mapping. Red Hat recommends that you use a naming convention for your aliases such asgroup-GROUPNAME.[standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/exclude=group-supervisors:remove {"outcome" => "success"} [standalone@localhost:9999 access=authorization][standalone@localhost:9999 access=authorization] ./role-mapping=Auditor/exclude=group-supervisors:remove {"outcome" => "success"} [standalone@localhost:9999 access=authorization]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Removing the group from the list of excludes does not remove the group from the system. It also does not guarantee the role will be assigned to members of the group. Roles might still be excluded based on group membership.