You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(auth): namespace subjects of several issuers #509
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
fix(auth): limit the length of issuer namespaces