Skip to main content

Authentication

Bunker uses OpenID Connect (OIDC) for user authentication.

Overview​

Authentication is centralized via a dedicated OIDC server that manages:

  • User identification
  • Session management
  • Access token delivery

Architecture​

Authentication Flow​

1. Login​

  1. User accesses the Console
  2. Console redirects to the OIDC server
  3. User enters credentials
  4. OIDC server issues a token
  5. Console stores the token for subsequent requests

2. Token Usage​

Each request to the Control Plane includes the token:

Authorization: Bearer eyJhbGciOiJSUzI1NiIs...

3. Renewal​

Tokens have a limited lifespan. The Console automatically renews tokens via the refresh token.

Technologies​

ComponentTechnology
ProtocolOpenID Connect
Serveroidc-provider (Node.js)
Clientoidc-client-ts

Tokens​

TypeDurationUsage
Access Token1 hourAPI Authentication
Refresh Token7 daysRenewal
ID Token1 hourUser information

Security​

Implemented Best Practices​

  • PKCE: Protection against code interception
  • Token rotation: Automatic renewal
  • HTTPS required: Encrypted communications

Token Storage​

Tokens are stored securely in the browser:

  • No localStorage storage (XSS vulnerable)
  • Use of HttpOnly cookies when possible
  • Automatic cleanup on logout

API Integration​

The Control Plane exposes a gRPC API, detailed in the API reference.

Next Steps​