Isolated employer providers

Configure employer-local providers without transferring identity proof or custody.

An isolated employer never inherits the installation's upstream clients, credentials, subject associations or trust pins. Its own owner can register an existing Google, Microsoft or Okta application through POST /org/<id>/api/auth/organizations/providers, using an employer-local hardware-passkey session and local email confirmation younger than ten minutes. An installation session confers no authority here.

The JSON configuration supports id, label, preset, clientId, tokenAuthMethod, clientSecret, optional Microsoft tenant, optional Okta issuer, and the existing reviewed subjectEmails associations where the preset requires them. Only the three existing presets and their existing verification rules are supported. The shared verifier validates the complete configuration before storage. Configuration is encrypted under an employer-bound label, excluded from exports and archives and erased with its employer; secrets never appear in a response or audit.

The response supplies the exact callback to register with the provider: <Auth origin>/org/<id>/auth/oidc/<provider-id>/callback. Root callbacks cannot stand in for employer callbacks. Each employer owner must independently configure and authorize its provider application; matching email, domain or upstream issuer and subject does not create a link or transfer proof. Each callback validates its own browser-bound, one-use state against its own physical employer store. Sign-in, enrollment, email step-up, recovery, administrator decisions and organization switching retain their local gates.

At most eight registrations are accepted per employer. IDs and configurations are immutable in this v1 door: an existing registration cannot be silently replaced. Existing scoped provider enabled or disabled controls remain available through the ordinary administrator API for a registered provider. Disabling immediately invalidates its outstanding proofs. Replacement trust and broad federation management remain AUTH-FEDERATION-001 work; this door adds no generic or custom provider or shared installation-operated trust.

The security test suite (security.test.mjs in the tests for auth) ("organizations isolate every existing HTTP family, admit expiring memberships and switch only between proven sessions") exercises two independently configured employers with the same email and the identical Google issuer and subject, proves different local people, refuses cross-callback and session transplant and root provider inheritance, then continues through local passkey, step-up, recovery, approval, directory API, export and switch boundaries. Network-edge signed Google responses are allowed under the repository's acceptance rules; no live-provider qualification is claimed here.

NextErasure and separate identities