SCOTT WORLEY.

Independent work / Security engineering

Identity-aware infrastructure

Centralized authentication, trust boundaries and identity recovery

A multi-host Linux and macOS environment integrating centralized identity, passwordless authentication and route-specific application access through Traefik, OAuth2 Proxy and Pocket ID.

Authentication service responsibilities
  1. TraefikTLS termination and route selection
  2. ForwardAuthDelegated application access checks
  3. OAuth2 ProxySession management and OIDC integration
  4. Pocket IDIdentity provider and WebAuthn authentication

01 / Design objective

The objective was to centralize authentication for selected browser-facing applications without requiring each application to independently implement modern identity protocols.

My implementation combines a reverse proxy, an authentication gateway and an identity provider. These components have distinct responsibilities, allowing routing, identity verification and application access decisions to be investigated independently.

02 / Authentication architecture

Component Responsibility
Traefik HTTPS routing, TLS termination and middleware enforcement.
ForwardAuth Delegates access checks to an external authentication service before forwarding protected requests.
OAuth2 Proxy Manages authentication sessions and integrates with the OpenID Connect provider.
Pocket ID Provides centralized identity, OIDC client registration and passwordless authentication.
WebAuthn Public-key authentication using passkeys bound to the relying party.

For protected routes, Traefik delegates the access decision to OAuth2 Proxy. When authentication is required, the browser participates in an OIDC redirect flow with Pocket ID. Subsequent authorized requests can proceed using the established session.

TLS protects the transport, OpenID Connect communicates authenticated identity, and WebAuthn provides the passwordless authentication mechanism. These are complementary controls rather than interchangeable technologies.

03 / Route-specific access policy

Not every application or client can complete an interactive browser authentication flow. API consumers, native media clients and automated services may require their own authentication mechanisms.

I therefore apply centralized authentication selectively at the routing layer instead of indiscriminately placing every service behind the same interactive sign-in requirement.

This design requires explicit consideration of trust boundaries. Protected applications must not be unintentionally reachable through alternate routes that bypass the authentication middleware. Identity headers must also be accepted only from trusted infrastructure.

These are security design requirements, not a claim that every possible bypass path has been independently audited.

04 / Identity persistence incident

In November 2026, I investigated an authentication failure involving Pocket ID 2.19.2. Expected passkey and OIDC client registrations were absent, while OAuth2 Proxy reported client authentication errors.

The investigation required separating identity-provider availability, database integrity, persistent storage configuration and OAuth client registration.

0 Registered users in inspected database
0 Registered WebAuthn credentials
0 Registered OIDC clients
Diagnostic test Observed result
Database backup integrity Passed SQLite integrity verification.
Identity record inspection No expected user, credential or client registrations.
Persistent storage configuration Bind mount targeted a different directory from the active application data directory.
OAuth2 Proxy diagnostics Observed invalid_client authentication errors.
Administrative API request A subsequent authenticated request to the identity provider returned HTTP 200.

The database was structurally valid, but it did not contain the expected identity state. A successful integrity check therefore ruled out some forms of database corruption without establishing that the correct application data had been preserved.

Identified persistence configuration mismatch

Configured bind mount target:
  /app/backend/data

Active application data directory:
  /app/data

This mismatch explained how a running identity provider could expose an effectively fresh database despite having a persistent storage configuration.

05 / Remediation and verification

The corrective configuration targeted the application's actual data directory. Recovering the identity service also required addressing the relationship between the provider's client registrations and the credentials configured in OAuth2 Proxy.

I traced the proxy's client configuration to its shared environment configuration rather than assuming that the identity provider alone controlled the complete authentication flow.

The intended recovery sequence was to establish correct persistence, restore or recreate the necessary identity records, reconcile the OAuth client configuration and verify authentication across the complete request path.

06 / Security configuration review

A separate review of Traefik operational logs identified additional configuration concerns at the authentication boundary.

Finding Engineering consideration
Unbounded ForwardAuth response size Review response limits to reduce unnecessary resource exhaustion exposure.
Forwarded identity headers Establish explicit header trust and prevent untrusted identity assertions.
Encoded request path warnings Review path normalization and backend interpretation to avoid inconsistent routing decisions.
Middleware reference warning during startup Investigate dependency availability and initialization order separately from authentication failures.

These findings represent configuration review and risk identification. They are not evidence of successful exploitation or a completed security audit.

07 / Engineering contributions

  • Centralized identity integration using OpenID Connect and WebAuthn passkeys.
  • Route-specific access control using Traefik and OAuth2 Proxy.
  • Authentication failure isolation across service and protocol boundaries.
  • SQLite integrity verification and identity state inspection.
  • Container storage and identity persistence investigation.
  • OAuth client configuration tracing and reconciliation.
  • Security-oriented reverse proxy configuration review.

The central lesson was that authentication availability depends on more than a running identity provider. Persistent identity state, client registration, session management, routing policy and trusted communication must all remain consistent.

This work was performed within my independently operated environment using existing open-source infrastructure components.