Skip to content

[Design]: Support Safe Authentication Mode Transitions #186

Backlog

Description

@mckaragoz

Overview

UltimateAuth provides four authentication modes under a unified programming model, allowing applications to evolve their authentication architecture without rewriting their integration.

While changing the configured authentication mode is straightforward, existing sessions and tokens may not be compatible with the target mode.

Introduce a dedicated transition mechanism to make authentication mode changes safe, predictable, and operationally simple.

Motivation

Applications should be able to evolve from centralized session-based authentication to distributed or selectively stateless authentication as their requirements grow.

Changing the authentication strategy should feel like a configuration change rather than an authentication migration project.

Proposed capabilities

  • Validate source and target authentication mode compatibility.
  • Provide a transition plan before applying credential changes.
  • Support safe invalidation of existing sessions and tokens.
  • Preserve compatible session lineage where possible.
  • Reissue credentials appropriate for the target mode.
  • Support controlled transition periods where security guarantees can be preserved.
  • Coordinate transitions across UAuthHub and Resource APIs.
  • Support application-profile-specific transitions.
  • Provide transition diagnostics and audit events.

Potential transition strategies

  • RequireReauthentication: Retire existing credentials and require users to authenticate again.
  • PreserveCompatibleSessions: Preserve compatible session lineage and replace credentials where necessary.
  • GracefulTransition: Allow a controlled transition period for eligible existing credentials.

Security requirements

  • Never weaken the target authentication mode's security guarantees.
  • Never treat metadata-only identifiers as authentication credentials.
  • Prevent unintended session resurrection and credential replay.
  • Respect device binding, tenant isolation, expiration, and revocation.
  • Account for previously issued stateless access tokens.
  • Ensure consistent behavior across distributed deployments.
  • Fail closed when a transition cannot be performed safely.

Acceptance criteria

  • Applications using unified UltimateAuth APIs require no mode-specific authentication code changes.
  • Supported mode transitions are explicitly documented and tested.
  • Incompatible credentials are safely retired.
  • Compatible authentication state can be preserved where supported.
  • User accounts, long-term credentials, roles, and permissions remain unaffected.
  • Distributed deployments can perform coordinated transitions without inconsistent authentication behavior.

Design goal

Change the authentication strategy, not the application architecture.

Authentication mode selection should remain an adaptable configuration decision throughout the application's lifetime.

Activity

  1. added this to the v0.5.0 milestone on Dec 2, 2026
  2. added theissue type on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions