Skip to content

fix(auth): namespace subjects of several issuers #509

Closed

Description

@uniqueg

Part of #503.

Why?

sub is only unique per issuer (OIDC Core §2), but access control identifies users by the identity claim alone (get_current_subject()). With two trusted issuers, a user of issuer B whose sub equals that of a user of issuer A gets that user's roles and owned resources.

What?

  • Entries of security.auth.issuers may be objects (issuer, namespace) besides plain URLs. Plain URLs keep working.
  • With more than one trusted issuer, subjects are namespaced as <namespace>|<sub>. The namespace defaults to the issuer URL and can be configured per issuer.
    • The namespacing applies to get_current_subject(), and so to policies, ownership records and plugin principals.
    • Users that service clients act for get the namespace of the client's issuer.
  • An empty namespace keeps bare subjects for that issuer. Deployments that add a second issuer later keep their existing policies, ownership records and stored subjects by leaving the first issuer un-namespaced.
  • Two issuers with the same namespace are rejected when the configuration is loaded, and so is more than one issuer with an empty namespace.
  • Single-issuer deployments behave as before.
  • The docs describe the migration from one issuer to several: what changes for stored subjects, and how to keep the old issuer un-namespaced.

Acceptance criteria

  • Equal sub values from different trusted issuers never map to the same subject.
  • Single-issuer apps behave as before.
  • Adding a second issuer with the first one's namespace set to empty keeps existing records valid.

Activity

  1. added
    priority: high
    status: in progress
    type: auth
    type: security
    workload: days
    on Oct 26, 2026
  2. added this to the v0.18.0 milestone on Oct 26, 2026
  3. removed
    status: in progress
    on Oct 26, 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

    priority: hightype: authtype: securityworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions