Skip to main content

Command Overview

User, role, and permission commands work at two levels: resource-level permissions with OPA policies, and end users with roles.

Permissions and Policies​

CommandPurpose
tcb policy listQuery the policy list
tcb policy getGet policy content
tcb policy setSet an OPA Rego policy
tcb permissionResource permissions under the legacy gateway (retired)

Users and Roles​

CommandPurpose
tcb user listQuery the user list
tcb user createCreate a user
tcb user updateUpdate a user
tcb user deleteDelete a user
tcb role listQuery the role list
tcb role getQuery role details
tcb role createCreate a custom role
tcb role updateUpdate a role
tcb role deleteDelete a role
System Preset PoliciesPreset policies available when creating a role

Notes​

  • Use tcb policy for OPA policies in new projects; tcb permission only applies to the legacy gateway and is retired
  • Users belong to an environment, so commands need -e/--env-id
  • Roles apply to end users, policies apply to API access
  • Setting a Rego policy invalidates legacy gateway authentication immediately