Repository navigation
fix(identity): login-bootstrap resolves by IdP source_type + external id, not email #1989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -193,6 +193,11 @@ metadata: | |
| type: Opaque | ||
| stringData: | ||
| APP__gears__authenticator__config__redis_url: {{ $redisUrl | quote }} | ||
| # The login-bootstrap resolve (GET /internal/persons/by-external-id / | ||
| # by-email-override) exists on identity-resolution only | ||
| # (constructorfabric/insight#1960). `insight.validate` (NOTES.txt) requires | ||
| # identityResolution.deploy=true whenever the authenticator is installed, | ||
| # so this is never a dangling host. | ||
| APP__gears__authenticator__config__identity_url: {{ printf "http://%s:8082" (include "insight.identityResolution.host" .) | quote }} | ||
| # Discovery/JWKS issuer served by the authn-tls sidecar. Downstream verifiers | ||
| # trust this over https; it is also the minted token `iss`. | ||
|
|
@@ -214,6 +219,13 @@ stringData: | |
| # on the per-user claim (fail closed when neither is present). | ||
| APP__gears__authenticator__config__idp__tenant_claim: {{ .Values.authenticator.oidc.tenantClaim | default "tenant_id" | quote }} | ||
| APP__gears__authenticator__config__idp__default_tenant_id: {{ .Values.authenticator.oidc.defaultTenantId | default (default "" (default dict .Values.global).tenantDefaultId) | quote }} | ||
| # The identity-resolution source_type this IdP is seeded under (e.g. | ||
| # "ms-entra") — required; drives the login-bootstrap person lookup | ||
| # (GET /internal/persons/by-external-id?source_type=...&external_id=...). | ||
| APP__gears__authenticator__config__idp__source_type: {{ required "authenticator.oidc.sourceType is required" .Values.authenticator.oidc.sourceType | quote }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not forget to put proper values to the gitlab gitops |
||
| # id_token claim carrying the IdP's stable external user id for source_type | ||
| # (Entra: "oid"; the generic OIDC "sub" is not the same directory-stable id). | ||
| APP__gears__authenticator__config__idp__external_id_claim: {{ .Values.authenticator.oidc.externalIdClaim | default "sub" | quote }} | ||
| {{- with .Values.authenticator.oidc.scopes }} | ||
| # Requested OIDC scopes (space-delimited; the gear splits on space/comma). | ||
| # `offline_access` is what makes the IdP issue a refresh token — required for | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -47,6 +47,10 @@ authenticator: | |||||||||||||||||||||||||||||||||||||||||||
| issuerUrl: 'http://{{ .Release.Name }}-fakeidp.{{ .Release.Namespace }}.svc.cluster.local:8084' | ||||||||||||||||||||||||||||||||||||||||||||
| clientId: "insight-authenticator" | ||||||||||||||||||||||||||||||||||||||||||||
| redirectUri: "http://localhost/auth/callback" | ||||||||||||||||||||||||||||||||||||||||||||
| # fakeidp's `sub` claim IS the stable per-user id (see users.yaml) — no | ||||||||||||||||||||||||||||||||||||||||||||
| # real connector backs it, but the persons-seed fixtures used in this | ||||||||||||||||||||||||||||||||||||||||||||
| # environment key their `value_type='id'` rows on this made-up source_type. | ||||||||||||||||||||||||||||||||||||||||||||
| sourceType: "fakeidp" | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| fakeidp: | ||||||||||||||||||||||||||||||||||||||||||||
| deploy: true | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -58,3 +62,13 @@ analytics: | |||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| identityResolution: | ||||||||||||||||||||||||||||||||||||||||||||
| deploy: true | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| # The authenticator's login-bootstrap resolve (GET /internal/persons/ | ||||||||||||||||||||||||||||||||||||||||||||
| # by-external-id / by-email-override) is Rust-only — the frozen .NET | ||||||||||||||||||||||||||||||||||||||||||||
| # `identity` twin above never gained it (constructorfabric/insight#1960) — so | ||||||||||||||||||||||||||||||||||||||||||||
| # identity-resolution must ALSO be deployed here, and the authenticator talks | ||||||||||||||||||||||||||||||||||||||||||||
| # to it unconditionally (deploy/gitops/scripts/compose-app-secrets.sh enforces | ||||||||||||||||||||||||||||||||||||||||||||
| # this at apply time regardless of what `.identityUrl` — analytics' own | ||||||||||||||||||||||||||||||||||||||||||||
| # .NET<->Rust switch — is set to). | ||||||||||||||||||||||||||||||||||||||||||||
| identityResolution: | ||||||||||||||||||||||||||||||||||||||||||||
| deploy: true | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
63
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win Remove the duplicated
🐛 Proposed fix📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.37.1)[error] 73-73: duplication of key "identityResolution" in mapping (key-duplicates) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.