Skip to main content

Access Control Architecture

PropertyValue
ControlsSID-AUTH-02, SID-HARD-03, SID-HARD-05, SID-CRYPTO-02
ISO 27001A.8.1 (User endpoint devices), A.8.2 (Privileged access rights), A.8.18 (Use of privileged utility programs)

Purpose

This document describes the access control architecture across the SIROS ID platform: authentication mechanisms per endpoint, the tenant isolation model, privileged (admin) access controls, and rate limiting. It addresses the finding that platform-level endpoint protection exists but formal documentation of the admin token lifecycle and operator-side device/access policies was incomplete.

Authentication Mechanisms

User Authentication (JWT)

All user-facing API requests are authenticated via HMAC-signed JWT bearer tokens issued after WebAuthn login.

Propertygo-wallet-backendfacetec-api
AlgorithmHS256HS256/384/512
Claimsuser_id, did, tenant_id, jti, exp, iss, audtenant_id, optional iss
RevocationIn-memory JTI blacklistNone (expiry only)
RefreshRotating refresh tokenN/A
SourceWebAuthn login flowExternal provisioning

Admin Authentication (Bearer Token)

The go-wallet-backend admin API uses a pre-shared bearer token on a separate port:

PropertyValue
Token size32 bytes (256 bit), hex-encoded
Generationcrypto/rand.Read() via GenerateAdminToken()
ComparisonConstant-time (crypto/subtle.ConstantTimeCompare)
SourcesWALLET_SERVER_ADMIN_TOKEN env, admin_token_path file, server.admin_token config, or auto-generated at startup
ScopeFull admin API access (tenant/user/issuer/verifier CRUD)

OIDC Gate

Registration and login can be gated by OIDC identity provider validation:

  • Per-tenant OIDC provider configuration (issuer, audience, JWKS URI)
  • Two gate types: GateTypeRegistration (new users), GateTypeLogin (returning users)
  • Validator instances cached per issuer with JWKS auto-refresh
  • Optional bind_identity mode: binds OIDC subject to user record

vc Platform Authentication

MechanismScopeDetails
Basic Authapigw restricted routesUsername/password map for credential notification endpoints
JWT + SPOCPapigw authorised routesECDSA-signed JWTs with S-expression policy engine for fine-grained path/method/subject authorisation
Per-credential auth_methodCredential issuanceEach credential type references an auth method (basic or pid_auth); pid_auth requires presenting a valid PID credential
Admin GUI sessionRegistry adminForm login with encrypted cookie session (HttpOnly, Path=/admin, MaxAge=3600)

go-trust (AuthZEN PDP)

The AuthZEN evaluation endpoint (POST /evaluation) is unauthenticated. Security relies on:

  • Network-level controls (deploy behind reverse proxy or service mesh)
  • go-wallet-backend's SPOCP-authorised proxy firewall (fail-closed in production)

Tenant Isolation Model

Key properties:

  • JWT tenant_id claim is authoritative — if X-Tenant-ID header differs, JWT wins
  • Disabled tenants receive 403 regardless of valid JWT
  • User-tenant membership optionally verified via TenantMembershipMiddleware
  • Cross-tenant login prevented by tenant hash verification in WebAuthn userHandle (v1 format)
  • facetec-api: JWT tenant_id selects per-tenant policy engine and issuer parameters

Privileged Access Controls

Admin API Separation

The admin API runs on a separate port (default 8081) with its own http.Server instance:

PropertyValue
Default bindConfigurable (0.0.0.0 or loopback) — security enforced by deployment network policy
DisableSet admin_port: 0
Unauthenticated routes/admin/status (health check only)
Authenticated routesAll other /admin/* — tenant CRUD, user management, issuer/verifier config, invite management

Admin Token Lifecycle

Operator responsibilities:

  • Configure explicit admin token via environment variable or file path for production
  • Restrict admin port to management plane using Kubernetes Service/Ingress scope and NetworkPolicy
  • Establish token rotation schedule (no built-in rotation mechanism)
  • Ensure DEBUG-level logs are not shipped to broadly-accessible log aggregators

SPOCP Authorization Firewall

The go-wallet-backend includes a SPOCP (S-expression) authorization layer that gates AuthZEN evaluation queries forwarded to the trust PDP:

  • Fail-closed in production: refuses to start with NoOpAuthorizer when GIN_MODE=release
  • Policy rules define allowed (api (service)(method)(path)(subject)) patterns
  • Ensures only expected query patterns reach the unauthenticated PDP

Rate Limiting

ComponentScopeMechanismDefault
go-wallet-backend (auth)WebAuthn registration/login, token refreshPer-identifier sliding window with lockout10 attempts/60s, 300s lockout; failed attempts cost 2 tokens
go-wallet-backend (registry)VCTM registry queriesPer-tenant (auth) + shared anonymous poolConfigurable RPM; privacy-preserving (no IP tracking for anonymous)
facetec-apiBiometric endpointsPer-IP sliding window + concurrency semaphoreConfigurable RPM + MaxConcurrentBiometric; 503 when full; 10 MB body cap
go-trustAll API endpointsPer-IP token bucketConfigurable RPS + burst (optional)
vc (verifier)Token/authorize/registerPer-IP token bucket20/min for token endpoint

Public (Unauthenticated) Endpoints

These endpoints are accessible without authentication and should be protected at the network level:

ComponentEndpointsPurpose
go-wallet-backend/health, /status, /readyzKubernetes probes
go-wallet-backend/api/v1/tenants/:id/configPublic tenant configuration
go-wallet-backendWebAuthn begin/finish (register, login)User authentication flows (rate-limited, OIDC-gated)
facetec-api/livez, /readyz, /healthzKubernetes probes
facetec-api/metricsPrometheus scraping
go-trust/readyz, /livezKubernetes probes
go-trust/.well-known/authzen-configurationAuthZEN discovery
go-trust/evaluationAuthZEN trust evaluation

Operator Responsibilities

The platform provides the authentication and authorization mechanisms above. Operators must additionally:

ResponsibilityGuidance
Network-restrict admin portTreat admin API as management-plane only: enforce ClusterIP/private ingress scope plus Kubernetes NetworkPolicy
Network-restrict go-trustDeploy behind service mesh or reverse proxy; do not expose evaluation endpoint publicly
Network-restrict metrics/healthEnsure /metrics endpoints are only reachable by Prometheus/monitoring infrastructure
Manage admin token rotationUse file-based token source (admin_token_path) for rotation without restart
Configure CORS for productionSet explicit AllowedOrigins list; do not use wildcard with credentials enabled
Manage device policiesImplement endpoint device management policies per organisational requirements (outside platform scope)