ABAC (Attribute-Based Access Control) is an Enterprise feature in private beta. If you are interested in upgrading to Enterprise, contact our sales team.
Roles and resource tags can be managed via the UI or API. ABAC policies are currently only configurable via the API.
Before you begin
- Set up resource tags in your workspace.
- ABAC currently only supports
resource_tag_keyas anattribute_namein policies, for evaluating against resource tags. No other attributes are supported yet.
Access policy structure
An access policy defines conditions under which access is granted or denied. Here’s the structure:Effect
Theeffect determines what happens when conditions match:
allow- Grant access when conditions matchdeny- Block access when conditions match
Deny policies always take precedence. If both an allow and deny policy match, access is denied.
Condition groups
Thecondition_groups array contains one or more condition groups. Multiple condition groups are evaluated with OR logic - if any group matches, the policy applies.
Each condition group specifies:
permission- The permission this group applies toresource_type- The resource type to matchconditions- Array of conditions (evaluated with AND logic within the group)
Resource types and permissions
| Resource type | Supported permissions |
|---|---|
project | projects:read, runs:read |
prompt | prompts:read, prompts:update, prompts:delete |
dataset | datasets:read, datasets:update, datasets:delete, datasets:share |
Runs don’t have their own tags. Run permissions (
runs:read) are evaluated against the parent project’s tags.Conditions
Each condition in theconditions array specifies:
attribute_name- Currently onlyresource_tag_keyis supportedattribute_key- The tag key to match (e.g.,Environment,Team)operator- The comparison operatorattribute_value- The value to compare against
Operators
| Operator | Description |
|---|---|
equals | Exact match (case sensitive) |
not_equals | Values differ (case sensitive) |
equals_ignore_case | Exact match (case insensitive) |
not_equals_ignore_case | Values differ (case insensitive) |
matches | Glob pattern matching with * and ? wildcards |
not_matches | Match when value doesn’t match glob pattern |
_if_exists variants
Each operator has an _if_exists variant that matches by default when the tag key is absent, or evaluates the condition normally when the tag exists:
| Operator | Description |
|---|---|
equals_if_exists | Exact match (case sensitive), or if tag key absent |
not_equals_if_exists | Values differ (case sensitive), or if tag key absent |
equals_ignore_case_if_exists | Exact match (case insensitive), or if tag key absent |
not_equals_ignore_case_if_exists | Values differ (case insensitive), or if tag key absent |
matches_if_exists | Glob pattern match, or if tag key absent |
not_matches_if_exists | Match when value doesn’t match glob pattern, or if tag key absent |
Roles
Therole_ids array specifies which workspace roles the policy applies to. When a user with that role accesses a resource, the policy conditions are evaluated.
Policies can be attached to roles when creating the policy, or attached later via the API.
Managing access policies
Access policies are managed via the LangSmith API by Organization Admins. Before creating policies, set up resource tags in your workspace.How ABAC works with RBAC
RBAC permissions and ABAC policies are both considered when determining access to resources:- ABAC deny policies override RBAC permissions
- ABAC allow policies can grant access even without RBAC permissions
- If no ABAC policies match, the system falls back to RBAC
Policy evaluation outcomes
Feature combinations:| RBAC enabled | ABAC enabled | Behavior |
|---|---|---|
| âś— | âś— | All workspace members have Admin-level access |
| âś“ | âś— | Standard RBAC - access based on role permissions |
| âś“ | âś“ | RBAC + ABAC - fine-grained tag-based access control |
| RBAC permits | Allow policy matches | Deny policy matches | Result |
|---|---|---|---|
| âś“ | âś“ | âś— | Allowed |
| âś“ | âś— | âś— | Allowed (RBAC fallback) |
| âś“ | âś“ | âś“ | Denied (deny wins) |
| âś“ | âś— | âś“ | Denied (deny wins) |
| âś— | âś“ | âś— | Allowed (ABAC grants access) |
| âś— | âś— | âś— | Denied |
| âś— | âś“ | âś“ | Denied (deny wins) |
Example scenarios
1. Annotator team assignment
Allow annotators to only access datasets tagged for their team:2. Block sensitive data
Deny access to datasets containing PII. Since deny policies override allow policies, this blocks access even for users with RBAC permissions:3. Application-based access with wildcards
Allow engineers to access projects for any application in the “chatbot” family using glob patterns:4. Client and purpose isolation (AND logic)
Grant access only if both conditions are met - dataset is for training AND belongs to a specific client:5. Client data plus resources without a Client tag using _if_exists
Consultants don’t have RBAC datasets:read permission, but this policy grants them access to datasets tagged Client=Acme-Corp, as well as datasets that don’t have a Client tag at all. Datasets tagged with a different client (e.g., Client=Other-Corp) remain blocked:
Troubleshooting
Access unexpectedly denied?- Check if a deny policy is matching (deny always takes precedence)
- Check if the user has RBAC permissions or a matching allow policy
- Verify the resource has the expected tag and value
- Deny policies with
_if_existsoperators block resources missing that tag key - For case-sensitive operators (
equals,not_equals), check for case mismatches - With multiple conditions in a group, all must match (AND logic)
- Review RBAC permissions (users may have access via their role)
- Check if an allow policy is too broad (e.g., using wildcards)
_if_existsoperators match resources missing that tag key
- Confirm the policy is attached to the correct role
- Verify the user has that role in the workspace
- Check that
resource_typeandpermissionmatch the resource being accessed
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.