Repository navigation
Backlog
Backlog
Copy link
Milestone
Description
Background
UltimateAuth currently supports two Resource API authentication paths:
- Session-based authentication using remote session validation through UAuthHub.
- Stateless JWT authentication in PureJwt mode.
Although Hybrid mode issues JWT access tokens alongside stateful sessions and refresh tokens, Resource APIs currently authenticate Hybrid requests using opaque session credentials rather than JWT access tokens.
This limits the effectiveness of Hybrid mode in distributed applications and creates a dependency on session cookie availability across application boundaries.
Objective
Enable Resource APIs to authenticate Hybrid requests using JWT access tokens while preserving UltimateAuth's stateful session security guarantees.
Hybrid authentication should combine cryptographic JWT validation with authoritative session lifecycle validation.
Proposed implementation
- Accept JWT access tokens through the standard
Authorization: Bearerheader. - Validate token signatures, issuer, audience, lifetime, algorithm and token type locally.
- Require a valid session binding in Hybrid JWTs.
- Validate the associated session through the trusted UAuthHub instance.
- Verify tenant, subject and device binding consistency between the JWT and the session.
- Reject expired, revoked, invalid or otherwise unauthorized sessions.
- Define authoritative identity, role and permission resolution to prevent stale authorization claims.
- Fail closed when required remote session validation is unavailable.
- Preserve existing session-based authentication as an explicitly supported transport.
- Avoid forwarding session and refresh cookies when using JWT-based Resource API authentication.
- Prevent credential fallback from bypassing failed JWT validation.
Security considerations
- Hybrid JWTs must not be accepted as PureJwt credentials.
- PureJwt tokens must not be accepted as session-bound Hybrid credentials.
- JWT validation must succeed before remote session validation is attempted.
- Session revocation and user status changes must remain enforceable.
- Resource APIs must communicate only with explicitly trusted authentication servers.
Acceptance criteria
- Blazor WASM applications can access Hybrid Resource APIs using JWT access tokens without sharing authentication cookies.
- Valid session-bound JWTs authenticate successfully.
- Invalid, expired, tampered and incorrectly bound tokens are rejected.
- Revoked sessions cannot access protected resources using previously issued JWTs.
- Tenant, subject and device mismatches are rejected.
- Existing PureOpaque and PureJwt authentication behavior remains unchanged.
- Unit and integration tests cover successful authentication, failure scenarios and session lifecycle enforcement.
- Documentation and distributed application samples are updated.
Metadata
Metadata
Assignees
Labels
No labels
Activity