Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
---
title: "User metadata for ABAC"
sidebarTitle: "User identities"
description: "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.
#### Setting metadata on users
<Tabs>
<Tab title="Manually Configure Metadata">
<Steps>
<Step title="Open a user">
In the organization sidebar, select **Access Control**, select **Users**, then select a user.
<img src="/images/platform/access-controls/add-metadata-step1.png" />
</Step>
<Step title="Open the user editor">
Select **Options**, then select **Edit User**.
<img src="/images/platform/access-controls/add-metadata-step2.png" />
</Step>
<Step title="Add metadata">
Select **Add Key**, enter the metadata key-value pair, then select **Update**.
<img src="/images/platform/access-controls/add-metadata-step3.png" />
</Step>
</Steps>
</Tab>
<Tab title="Automatically Populate Metadata">
For organizations using SAML for **user logins**, Infisical automatically maps metadata attributes from SAML assertions to user identities on every login. This enables dynamic policies based on the user's SAML attributes.
</Tab>
</Tabs>
#### Applying ABAC policies with user metadata
Attribute-based access controls are currently only available for policies defined on Secrets Management projects.
You can set ABAC permissions to dynamically set access to environments, folders, secrets, and secret tags.
<img src="/images/platform/access-controls/example-abac-1.png" />
In your policies, metadata values are accessed as follows:
- **User ID:** `{{ identity.id }}` (always available)
- **Username:** `{{ identity.username }}` (always available)
- **Metadata Attributes:** `{{ identity.metadata.<metadata-key-name> }}` (available if set)