Repository navigation
feat(sso): full Dex integration (connector pinning, tested LDAP/local/upstream, compose profile) - #431
Merged
Conversation
Coverage
Go by area
Web by area (lines)
|
OpenArtifact documented Dex as the way to sign in with LDAP, but nothing exercised it. A testcontainers integration test now runs OpenLDAP and Dex (the same images and config the compose profile ships) and drives the browser flow against an in-process server: claims and scopes, group provisioning through group_mapping, wrong password, link_by_email on and off, and logout. - docker/docker-compose.yml: opt-in `dex` profile (openldap + dex, digest-pinned, loopback port); default `compose up` unchanged - docker/dex/: Dex config and LDIF seed (alice, bob, two groups) - docs/security/sso.md: Dex row in the vendor table; observed behaviour (email_verified always true for LDAP, groups only with the groups scope, opaque sub from idAttr + connector id, local-only logout); "Try it locally"
Add oidc_config.dex_connector_id: OpenArtifact sends connector_id so Dex skips its chooser, defaults scopes to openid email profile groups federated:id, and denies a login whose ID token's federated_claims.connector_id differs (a user cannot strip the hint and sign in through another connector of the same Dex). Web UI gets a Dex option (11 locales). The Dex integration test now runs three connectors (ldap, password database, oidc to a second Dex) with one provider each, and the compose dex profile gains a password-database user. Docs: new Dex section with per-connector setup, claim and email_verified behaviour.
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dex is now a first-class way to sign in to OpenArtifact, not just a generic OIDC issuer.
Connector pinning (
oidc_config.dex_connector_id)github/oauth2);[A-Za-z0-9_-], 1–64 chars.connector_id, so Dex skips its connector chooser.openid email profile groups federated:id; explicit scopes must includefederated:id.federated_claims.connector_idmust equal the pin, otherwisesso_login_denied(reason logged server-side only). Stops a user from stripping the hint and authenticating through another connector of the same Dex.openapi.json, generated web types and API reference updated.Web UI
Tests
tests/integration/dex_sso_integration_test.go(testcontainers: OpenLDAP + Dex + a second Dex as upstream OIDC): claims per connector, groups →group_mapping, wrong password,link_by_emailon/off, logout, pinned login vialdap/local/upstream, unpinned provider shows the chooser, hint-stripping denied for three provider/connector pairs.Compose
dexprofile (OpenLDAP + Dex, digest-pinned, loopback only); defaultdocker compose upunchanged.Docs
docs/security/sso.md: Dex row in the vendor table; Dex section (when to use it vs native providers, one client/many providers, claims,email_verifiedcaveats, connector examples, SAML connector warning, local-only logout, Try it locally).Observed with Dex v2.46.1
email_verifiedistruefor LDAP, password DB and upstream-OIDC users.groupsonly with thegroupsscope;federated_claimsonly withfederated:id.end_session_endpoint: logout ends the OpenArtifact session only.Verification
make lint,make deadcode,make dup,go mod tidy -diff,make test,reuse lint,make docs-check.-race.bun test(2313 pass), i18n:check, build.connector_idand finished through the password DB → generic denial, log showsID token comes from Dex connector "local", the provider is pinned to "ldap".