Skip to main content

Roles and permission policies

A Permission policy lists the actions that a person or application may do in Verdictan. A role bundles policies for one job, and you give access by assigning the role to a team or a member. This page walks through creating a narrow role, for example one that lets reviewers read request events but not change gateway configurations.

Which "policy"?

A permission policy (IAM) controls who can do which action in Verdictan. A policy on its own is the runtime AI policy that a configuration enforces on model traffic. A model access rule limits the models, gateways, and per-minute traffic of an API token, and a budget limits spend. See Which "policy" is which.

Before you start​

You need policies:read, policies:write, roles:read, roles:write, and roles:assign. You can grant only the permissions that you have. See Grant limits. Test the result with an account that is not an owner, because an owner's extra permissions hide mistakes.

Take action names from the Permissions reference, not from button labels.

1. Define the permission​

A statement has an effect, actions, and resources, and optional conditions that limit when it applies. This one allows only events:read on one resource:

iam-policies.yaml
name: evidence-read
statements:
  - effect: allow
    actions:
      - events:read
    resources:
      - vdt:verdictan:gateway:eu:org_example:events

The resource is an example. Replace it with the resource pattern of your organization and region before you assign the policy.

Verdictan denies every action that no statement allows, and a matching deny wins over an allow.

2. Simulate the policy​

Sign in with verdictan auth login. A simulation calls the API but assigns nothing.

The allowed action:

verdictan policy evaluate \
  --file iam-policies.yaml \
  --action events:read \
  --resource-vrn 'vdt:verdictan:gateway:eu:org_example:events' \
  --json

An action that the file does not allow:

verdictan policy evaluate \
  --file iam-policies.yaml \
  --action events:export \
  --resource-vrn 'vdt:verdictan:gateway:eu:org_example:events' \
  --json

The first decision allows the read, and the second denies the export. Also try a resource outside the scope.

A simulation evaluates only the statements you give it. It does not know who has the role or whether their attributes match, so test real access after you assign it.

3. Create and assign the role​

  1. Open Administration → IAM → Permission policies and select Create permission policy.
  2. Enter the name, actions, resources, and any conditions, and save.
  3. Open Administration → IAM → Roles and select Create role.
  4. Enter the role name, attach the policy, and save.
  5. Assign the role to your test team or member.

Permission policies list with the Org Admin system policy and the Create permission policy button.

The role shows the attached policy and the assignment. A policy that is not in an assigned role gives no access.

Model access rules are something else: they control which models and gateways API tokens can use, and they do not create a permission policy.

CLI alternative​

Create the policy and the role:

verdictan iam policy create \
  --name evidence-read \
  --action events:read \
  --resource 'vdt:verdictan:gateway:eu:org_example:events'

verdictan role create --name evidence-reviewer

Then use the returned IDs to attach the policy and assign the role:

verdictan role attach-policy --role-id <role-id> --policy-id <policy-id>
verdictan team assign-role --team-id <team-id> --role-id <role-id>

Role assignments to API tokens apply to the whole organization. Member and team assignments can be scoped to the organization or a team.

4. Do an access test​

Sign in as the test member. Do the allowed read, then try an action the policy does not allow. Find both results and the administrative changes in Trail.

Look at the role from the CLI:

verdictan role show-actions --role-id <role-id>
verdictan role show-assignments --role-id <role-id> --json

Review the statements, the whole role, and every assignment. Another team or a direct role can grant access that this policy does not.

When you change or delete a policy, the new permissions apply on the next request of each member who holds it. Members stay signed in.

Conditions and wildcards​

PatternMeaning
events:readOne action
events:*Every action in the events namespace
*Every action, or every resource in resources

Resource patterns start with vdt:verdictan:, or are *. Use the narrowest pattern that works. A deny in a shared policy applies to everyone who has it.

The third part of a resource pattern is the service, for example gateway in vdt:verdictan:gateway:eu:org_example:events. Each action namespace applies to specified services: events actions apply to gateway and governance, secrets actions to secrets, and users actions to iam. When you create or update a policy, the API rejects a statement whose action does not apply to the service of a resource, because that statement can never match. A service of * matches every action. A policy that was saved before this check still applies. When you open it, the API returns a warning for each statement that does not match, and you must correct the statement before you save the policy again.

Conditions can test identity, request, or resource attributes. Operators include StringEquals, StringLike, StringNotEquals, Bool, Null, numeric comparisons, ForAnyValue:StringEquals, mfa_required, and tag and resource-name conditions.

To simulate a condition, pass JSON attributes with --caller-attrs, --resource-attrs, or --request-attrs. Simulate once with a matching value and once with the value missing.

Attribute-based deny policies​

Attribute-based access control (ABAC) policies add deny rules on top of roles. You manage them with /v1/policies/abac and need policies:write.

  • An enabled policy with the deny effect refuses a matching request even when a role allows it. The response is 403.
  • A deny policy for chat:completion makes gateway tokens of the organization invalid when its conditions match.
  • An allow policy never grants access that the roles do not grant.
  • Test a policy with POST /v1/policies/abac/simulate before you enable it.

To stop a policy, update it with "enabled": false.

Remove access​

Review every assignment before you remove a role or detach a policy, because another assignment can grant the same action. To detach a policy:

verdictan role detach-policy \
  --role-id <role-id> \
  --policy-id <policy-id> \
  --yes

This changes access for everyone with the role. Confirm the denial with a test account and in Trail.

Troubleshooting​

ProblemWhat to check
The simulation allows, but the user is deniedThe assigned role, the resource scope, the attributes, and other deny statements
A test user can do too muchDirect roles and other teams, and that the account is not an owner
A change denies requests you did not expectThe exact action and resource. Do not add * to make the error go away.
A policy cannot be deletedWhether a role still has it
403 with iam.privilege_escalation or iam.owner_requiredYou can grant only the permissions that you have. FullAccess, platform policies, and the removal of deny statements need an owner. See Grant limits.
SSO users get unexpected permissionsGroup mappings, fallback roles, and direct assignments

Next steps​