Multiple providers
Read the Identity overview first for the IdentityProvider
resource, userInfoPrefix, and claim mappings. This page covers what changes
once you register more than one.
You can register any number of IdentityProvider resources. Every provider's
tokens are accepted at the token-exchange endpoint, so a second provider is the
normal way to admit CI and workload identities alongside your human IdP. Only
one provider drives the browser-redirect login (redirect.browserLogin: true).
Uniqueness rules across providers
Hub enforces three rules whenever you create or update a provider. Each is checked against every other registered provider, so the error you get names the one you collided with.
- One browser-login provider. Setting
redirect.browserLogin: truewhile another provider holds it is rejected. - Issuer URLs can't be shared. Two providers may not register the same
validation.issuer.url. If you need two audiences against one issuer, add both toissuer.audienceson a single provider rather than creating a second one. - Prefixes can't overlap. Hub rejects a
userInfoPrefixthat is a leading prefix of an existing provider's, or that an existing one is a leading prefix of. Ending every prefix with a separator sidesteps this entirely:corp:andcorp-eu:coexist, but the separator-lesscorpandcorp-eucollide.
Hub also refuses to delete the provider that currently drives browser login. Clear the flag first, then delete.
Replacing the browser-login provider
Moving browser login from one provider to another is more than a flag swap, because two things don't carry over:
userInfoPrefixis immutable and prefixes every username and group value, so role bindings written against the old provider (old:admins) don't match the new one (new:admins).- No provider drives browser login between clearing the flag and setting it, so new browser sign-ins fail for that window. Tokens already issued keep working until you delete the old provider.
To migrate:
- Create the new provider with
browserLoginunset. - Duplicate your role bindings under the new prefix. An
OrganizationRoleBindingonold:adminsneeds a counterpart onnew:admins. Leave the old bindings in place for now. - Clear
browserLoginon the old provider and set it on the new one. - Sign in through the new provider and confirm your groups resolve with
kubectl auth whoami(see Verifying your identity). - Delete the old provider, then the role bindings that referenced its prefix.
Step 3 is safe to ship as a single change when both providers come from the bootstrap directory. Hub reconciles that directory as a retry loop rather than a single ordered pass, so the file claiming the flag can fail on the first round and succeed once the file clearing it has applied — the outcome doesn't depend on filename order. A provider that exists only through the API has no such safety net: clear the old flag before setting the new one.
A provider created through the API and never written to the bootstrap directory
has nothing to restore it. validation.issuer.url is immutable, so a wrong
issuer means deleting and recreating the provider — and if that provider drives
browser login, you need a working login to do it. Define anything you depend on
for administrator access in the bootstrap directory, where the five-minute
reconcile repairs it.
Related resources
- Identity overview — the
IdentityProviderresource itself. - Installing Hub — supplying providers through
hub-core.bootstrap.filesinstead of the single-provider sample layer. - Access management — the role bindings that reference each provider's prefixed subjects.