How to set and use metadata attributes on user identities for ABAC.
User identities can have metadata attributes assigned directly. These attributes (such as location or department) are used to define dynamic access policies.
Navigate to the Access Control page on the organization sidebar and select a user.
On the User Page, click the pencil icon to edit the selected user.
Add metadata via key-value pairs and update the user identity.
Attribute-based access controls are currently only available for policies defined on Secrets Manager projects. You can set ABAC permissions to dynamically set access to environments, folders, secrets, and secret tags.
In your policies, metadata values are accessed as follows:
{{ identity.id }}
(always available){{ identity.username }}
(always available){{ identity.metadata.<metadata-key-name> }}
(available if set)