Include Page | ||||
---|---|---|---|---|
|
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This topic is discussed in the Advanced Topics training video. |
Users of Grouper users sometimes need to create and manage entities in Grouper that are not part of a central subject source. An example is where Grouper integrates with an external database that has schemas needed for access management. These schemas must be represented in Grouper so they can be assigned to Groups/Roles/Permissions. Before Grouper 2.1 this could be solved by creating a group to represent the local entity, and not assigning members to the group. In Grouper 2.1 a "local entity" can be created in the folder structure.
...
- id - uuid, doesn't change
- extension - system name in the folder, shouldn't change
- display extension - display name in the folder, can change
- description - free form text documentation about the entity
- name - fully qualified (including parent folders) system name
- display name - fully qualified (including parent folders) display name
- subjectIdentifier attribute - if the identifier of the entity is not valid for the extension (e.g. if it could contain a colon, or other invalid character in the grouper extension namespace), then you can put any fully qualified (including folder names) identifier here. Note, no two entities can have the same subjectIdentifier. Also, this attribute is public, meaning anyone can read (if they can VIEW the entity), or update it (if the can ADMIN the entity). Note, this security to be maintained, this assumes a hierarchical security model for folders... i.e. you must trust the owners of parent folders where the entities are stored since they can have a subjectIdentifier with a colon inside. The attribute must start with the folder where the entity is stored. This is autocreated for you, depending on your config, might be here: etc:attribute:entities:entitySubjectIdentifier Assign this to the local entity (e.g. with UI), and give the string value which is the identifier. Note: the assignment to the local entity is done with a "group attribute assignment" not an "entity attribute assignment"
Local entity subjects
Grouper entities have a subject source different than the Grouper subject source (though similar). Since there is an optional subjectIdentifier attribute, queries for search or findByIdentifier will consider that value. Also, the following subject attributes exist in addition to the group subject attributes (name, extension, displayName, description, etc) :
Attribute name | Meaning |
---|---|
entityIdAttribute | if there is an entity id attribute assigned, this is the value |
entityId | if there is an entity id attribute assigned, it is used, if not, then this is the name attribute |
entityExtension | if there is an entity id attribute assigned, this is the suffix after the entity folder name and colon, if not, then this is the extension (not of attribute) |
API
You can create a local entity with the EntitySave class:
...
You can create/edit/delete local entities on the UI in a folder you have CREATE on
Other screens are tweaked, e.g. on the permissions screen you can search for entities but not groups/roles for individual permissions:
. In 2.4 UI patch #27 this is in the new UI
...
...
...
Local entity icon:
...
View an entity
...
Menu has entity options
...
Delete a local entity
...
Edit a local entity
...
There is a privilege tab
...
Only entity privileges can be assigned
...
Limiting the scope of entities
...