Architecture navigation+

Architecture · Permissions

Permissions & scopes

Shield's OAuth 2.1 enforcement model: how scopes are defined, evaluated and audited across every tool call and resource fetch.

OAuth 2.1 + OIDC

Shield implements the OAuth 2.1 profile (draft-ietf-oauth-v2-1) with mandatory PKCE for all flows. OIDC provides the identity layer: the ID Token carries the tenant_id, RBAC roles, and jurisdiction claims required by Shield's policy engine.

Unsupported flows (by design, not configuration):

  • Implicit flow (RFC 6749 §4.2) — removed in OAuth 2.1
  • Resource Owner Password Credentials — too broad, no per-request scope binding
  • Client Credentials without mTLS — insufficient for multi-tenant isolation

The authorization code flow with PKCE is the only supported path for operator authentication. Machine-to-machine communication uses client_credentials with mTLS client certificates, never shared secrets.

Spec · RFC 9700Cognitive Server tracks RFC 9700 (OAuth 2.1) as the normative reference. The Authorization Server is Shield; the Resource Server is the component receiving the token (Vault, Nexus, Hub).

Scoped tokens

All scopes follow the pattern resource:action[:qualifier]. A token without the required scope receives a 403 at the Shield perimeter edge — the request never reaches the target component.

ScopeComponentPermitted action
vault:readVaultRead assets and resource handles
vault:write:tenantVaultCreate or update tenant-scoped assets
audit:exportChainExport signed trace logs
audit:readChainRead trace events (no export)
skill:execute:approvedNexusExecute skills in the approved catalog
skill:manageNexusAdd, version or deprecate skills
hub:readHubRead connector registry
hub:writeHubRegister or update connectors
admin:tenant:createShieldProvision a new tenant
admin:tenant:suspendShieldSuspend a tenant (requires 2-party approval)
Note · Additive, non-inheritingScopes are additive and non-inheriting. Granting vault:write:tenant does not imply vault:read. Each scope must be explicitly present in the token.

Least privilege by default

The four built-in RBAC roles ship with minimal scope sets. Operators may not grant scopes outside a role's permitted set without an architectural exception logged in Chain.

RoleScope setCan doCannot do
adminAll scopesFull system managementNothing
directoraudit:export, skill:manage, hub:readExport logs, manage skills, read connectorsCreate/suspend tenants, vault:write
operatorvault:read, audit:read, skill:execute:approved, hub:readDay-to-day reasoning, read logsManage skills, export logs, admin actions
vieweraudit:readRead-only trace inspectionAny write or execute

Privilege escalation requires: a director-or-above initiating the change, a Chain trace recording the intent, and a second director countersigning within 24 hours. No single-party escalation is possible for admin-level scopes.

Note · Provisioning onlyThe admin role exists for initial provisioning only. Cognitive Server recommends deactivating admin tokens immediately after tenant setup and operating exclusively under director/operator/viewer roles.