Skip to main content

Architecture

VoxKey is built around three core concepts: Realms for multi-tenancy, OAuth2/OIDC for authentication, and RBAC for authorization.

System overview

Realms (multi-tenancy)

A Realm is an isolated authentication domain. Each realm has its own:

  • Users and sessions
  • OAuth2 applications (clients)
  • Authentication providers (social, password, passkeys)
  • RSA keypair for JWT signing
  • RBAC roles and API resource scopes
  • Branding and configuration

All OAuth2 endpoints are realm-scoped: /oauth2/{realmUUID}/...

See Realms for details.

OAuth2/OIDC layer

VoxKey implements the following OAuth2/OIDC standards:

StandardDescription
OAuth 2.0 Authorization CodePrimary grant type for user authentication
PKCE (RFC 7636)Mandatory for public clients (SPA)
Client CredentialsM2M authentication
Refresh TokenLong-lived sessions
Token Introspection (RFC 7662)Server-side token validation
Token Revocation (RFC 7009)Invalidate tokens
OIDC DiscoveryAuto-discovery of endpoints
JWKSPublic key distribution

RBAC model

Authorization is managed through three entities:

  1. API Resources -- represent your protected APIs (identified by an audience URI)
  2. Scopes -- permissions belonging to an API Resource (e.g. read:posts)
  3. Roles -- group scopes together, assigned to users or M2M applications

When a token is issued, VoxKey resolves the user's roles, collects granted scopes, and intersects them with the requested scopes.

See Authorization for details.

Tech stack

ComponentTechnology
BackendPHP 8.4+, Laravel 11, Laravel Octane (RoadRunner)
DatabaseMariaDB 10.11
FrontendReact 18, Ant Design, Vite
OAuth2league/oauth2-server
WebAuthnweb-auth/webauthn-lib
AdminFilament 4