Repository navigation
feat(auth): OIDC-only mode with IdP group admin roles - #966
Merged
Merged
Conversation
…nnot parse (fclairamb/solidping-business#95) A sign-up with a malformed address (double dot, space, double @) got 200 "check your inbox" while enqueueEmail (service.go, email.ValidAddress) dropped the confirmation mail. Service.Register only matched the address against registration_email_pattern. Register and CreateInvitation now trim the address and require a single plain parseable one (plainSendableAddress, email_change.go) before anything is stored, answering 422 VALIDATION_ERROR on the email field. A link-only invitation (no address) still works. Tests in handler_test.go fail before the fix (200 and a stored pending entry). Closes fclairamb/solidping-business#95 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… nested in returnTo (fclairamb/solidping-business#99) A provider sign-in refused server-side (e.g. no verified email) showed no error: redirectOAuthError (join_policy.go) appends error/error_description to the post-login destination, which needs a session, so the guard bounced to the login page with the error nested in returnTo, while the login page only read its own error_description (orgs/$org/login.tsx validateSearch). The login page now lifts the error out of returnTo (oauthErrorFromReturnTo) and drops it from the retry destination. Vitest and e2e login.spec.ts guard it; the e2e test fails on the previous build (no login-error banner). Closes fclairamb/solidping-business#99 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fclairamb/solidping-business#98) With Chrome auto-translating the dashboard into a language the app does not ship, nearly every navigation crashed into the route error boundary (NotFoundError on insertBefore/removeChild): the translator moves React-owned text nodes into <font> wrappers, and the <html lang> fix in i18n.ts only stops the offer for shipped languages. main.tsx now installs, before React mounts, a guard (lib/translator-dom-guard.ts) that turns those two calls into a logged no-op when the node is no longer a child, so translation stays available. translator-dom-guard.test.ts fails without the guard (both calls throw). Closes fclairamb/solidping-business#98 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fclairamb/solidping-business#96, fclairamb/solidping-business#97) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mb/solidping-business#96) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Adds the clone-of-a-clone numbering test (-copy, -copy-2, -copy-3); the check-clone-slug E2E passes against a fresh database; the react-hooks set-state-in-effect errors in check-form.tsx are pre-existing at BASE. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…/solidping-business#97) When the abandon timer fires, the watchdog keeps listening on the outcome channel for 250 ms: a checker that honoured its context but needed a few ms to unwind after a process pause returns a normal timeout result. An abandonment whose timer fired more than twice past its budget (execTimeout + grace) is classified reason=process_paused and logged at WARN; ignored_context stays for a real hang. Both abandon lines now carry elapsed and exec_timeout. New metric reason value: solidping_check_runner_abandoned_total{reason="process_paused"}. Closes fclairamb/solidping-business#97 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#960) The Docker install page only showed a TCP SP_DB_URL; socket users had no example since the fix of #939 (the reference page had one, docker.md did not). It now shows a docker run with the mounted socket directory, the `&port=5433` note and why a percent-encoded host fails. dsn_docs_test.go checks that both pages show a socket DSN that DriverDSN turns into a socket file; it failed before this change. Closes #960 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Converted from issue #958: no provider repo exists yet, sp apply only manages checks. Needs a new repo, migrations and new apply endpoints. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds slug/managed_by columns (migration 039), the multi-kind apply orchestrator, POST /orgs/:org/apply and GET /orgs/:org/export, and `sp checks export --all-kinds`. Refs #958 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…d widen sp apply past checks (Part B) Part A (provider repo) is tracked in #965 and not implemented here. Refs #958 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… widen sp apply past checks
…stgres Unix-socket docs (#964) Stacked on #959: merge it first. Closes #960 Closes #958 ## What changed - **Docs: PostgreSQL over its Unix socket** (#960): a subsection on the Docker install page (mounted socket, working `SP_DB_URL`, `&port=5433` for a non-default port, why percent-encoded hosts fail), linking to the configuration reference. A test checks both pages carry a socket DSN the driver resolves to a socket path. - **`sp apply` beyond checks** (#958, Part B): a manifest can now hold `channels`, `maintenanceWindows` and `statusPages` next to `checks`, cross-referencing checks by slug. One orchestrator plans and applies them in dependency order (checks → channels → windows → pages, prune in reverse) under a single deletion cap; plan entries carry a `kind`. - Migration 039 (Postgres + SQLite): optional per-org-unique `slug` on channels and maintenance windows, `managed_by` on channels, windows and status pages. Prune only deletes rows owned by the manifest. - New admin-only routes `POST /orgs/:org/apply` and `GET /orgs/:org/export`; `POST /checks/apply` keeps working through the orchestrator. - CLI: `sp apply` prints a KIND column; `sp checks export --all-kinds` bootstraps a full manifest from a live org. - Docs (config-as-code, CLI) and OpenAPI updated. - The Terraform/OpenTofu provider itself (Part A) moved to #965: it needs a new repo, a GPG key and registry accounts. ## Decided by autopilot - 2026-11-21-01, order of delivery: `sp apply` (Part B) first, provider next in its own repo (#965). - 2026-11-21-01, who creates and signs the provider release: Florent (repo, GPG key in gopass, registries), tracked in #965. - 2026-11-21-01, identity for channels and maintenance windows: new optional per-org-unique `slug` column. - Implementation: channel `${env:…}` secrets are resolved at apply time and stored encrypted like any channel secret (the notification senders cannot resolve references); rotating one means re-applying. Values are never printed in the plan. - Implementation: a slug-less channel (same name and type) or window (same title) is adopted when exactly one matches, so `export --all-kinds` then `apply` doesn't create duplicates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ly first boot) (#942) Converted issue #942 to a spec: touches authorization scope (claim-granted super admin), new system parameters, the startup seeding job and the login UI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… password admin) - auth.local_login.enabled (SP_LOCAL_LOGIN_ENABLED, default true): when false, password and LDAP login, register, confirm-registration, password reset and password change answer 403 LOCAL_LOGIN_DISABLED. Read per request (env > DB > config), fails open with a boot warning while no SSO provider is enabled; the system parameter API refuses false in that case. GET /auth/providers gains localLogin. - auth.oidc.groups_claim / super_admin_groups / org_admin_groups: groups from the verified ID token (plus userinfo) grant super admin (synced both ways for claim grants only, users.super_admin_source = 'oidc', last super admin never revoked) and org admin in the login org (grant-only). New audit event auth.super_admin_changed. - OIDC-only first boot: no password admin, default org left empty for the first super-admin group member (owner). Break-glass: restart with SP_LOCAL_LOGIN_ENABLED=true and SP_ADMIN_PASSWORD. Closes #942 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ields The login page hides the email/password form, the forgot-password and sign-up links when /auth/providers says localLogin is false; the security page drops the password card. The super-admin auth settings get a local login switch and the OIDC groups claim / super-admin groups / org-admin groups fields. New audit event auth.super_admin_changed is labelled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…gin switch Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ay in: no local login, admins granted by an IdP group claim, no seeded password admin Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ics, invite refuses passwords while local login is off - organization_members.role_source (039 unreleased section, Postgres + SQLite): the org-admin claim records 'oidc_group' on what it grants and demotes it to user at the next login out of the group; never an owner, a locally set role, or the last owner/admin. Any role change naming no source writes NULL (a local grant). - roleChanges login diagnostics on POST /auth/handoff/exchange (carried by the OIDC callback's handoff code), next to the log line and audit. - POST /auth/accept-invite answers 403 LOCAL_LOGIN_DISABLED while local login is off when it would create or use a password; an SSO-signed-in invitee still accepts. - Tests: 200 when on for register and password reset, accept-invite both ways, org admin revoke/last admin/owner, role diagnostics, dialect contract for role_source. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ay in: no local login, admins granted by an IdP group claim, no seeded password admin Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ch gate) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…eat/todos-2026-11-21 # Conflicts: # server/internal/db/postgres/migrations/039_v0_53_0.tx.down.sql # server/internal/db/postgres/migrations/039_v0_53_0.tx.up.sql # server/internal/db/sqlite/migrations/039_v0_53_0.tx.down.sql # server/internal/db/sqlite/migrations/039_v0_53_0.tx.up.sql
# Conflicts: # server/internal/db/postgres/migrations/039_v0_53_0.tx.down.sql # server/internal/db/postgres/migrations/039_v0_53_0.tx.up.sql # server/internal/db/sqlite/migrations/039_v0_53_0.tx.down.sql # server/internal/db/sqlite/migrations/039_v0_53_0.tx.up.sql # server/internal/handlers/auth/handler.go
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #966 +/- ##
==========================================
+ Coverage 90.85% 90.87% +0.02%
==========================================
Files 1399 1405 +6
Lines 144671 145221 +550
==========================================
+ Hits 131436 131972 +536
- Misses 13227 13241 +14
Partials 8 8
🚀 New features to boost your workflow:
|
…fixes; Postgres host= for the listener (#969) Stacked on #966: merge it first. Closes #941 Closes #961 Closes #965 Closes #945 ## What changed - **Bulk delete of checks (#941)**: the checks list gets row checkboxes, a select-all (loaded rows) and a bulk bar (Delete, Set regions, Automatic placement, Clear). Delete first shows a dry run listing the checks it would skip and why, and asks to type the count above 10 checks. New API `DELETE /api/v1/orgs/:org/checks` (`{checkUids, dryRun}`, up to 1000), with the same guards as a single delete (managed, internal, read-only, tunnel in use, other org). Tested on SQLite and Postgres, plus Playwright. - **Postgres DSN (#961)**: the lib/pq LISTEN notifier now honours the `host=` socket parameter when the URL also has a host (the pgx pool already did). Startup logs when the socket overrides the URL host; documented in the database and docker docs. - **Terraform provider, Step 1 (#965)**: `wiki/terraform-provider-api-audit.md` now audits maintenance windows. Step 2 (the provider repo, release and registries) needs operator setup and moved to #970. - **AUR package `solidping-bin` (#945)**: `deploy/aur/` (PKGBUILD from the per-arch `solidping-linux-*.gz` release assets, systemd unit, sysusers, `update.sh`, `test.sh`), CI job `aur-package` (tests it in an Arch container, outside the `ci` gate) and `aur-publish` (on stable tags, a no-op without the `AUR_SSH_PRIVATE_KEY` secret). Docs in `wiki/distribution/aur.md`. Publishing needs an AUR account: #971. - **Maintenance windows, gaps found by that audit**: - `PATCH /maintenance-windows/:uid` clears `description` / `recurrenceEnd` on an explicit `null` (an absent key still means unchanged). - `PUT /maintenance-windows/:uid/checks` rejects unknown or other-org check and group uids with a 422 `VALIDATION_ERROR` (before: a 500, or a cross-tenant link), and dedupes repeated uids. - Batch gate: fixed `checks-index-host-view` e2e for the new checkbox column. `TestSilentAgentIsClosedAfterTwoMissedProbes` (agentws) flaked once under load, unrelated to this batch. ## Decided by autopilot - #945: added to this frozen batch (two frozen batches open, the newest takes new work). AUR account and SSH key are operator setup, moved to #971. - terraform-provider-repo, Q1 (prerequisites): implement Step 1 (API audit) here; Step 2 moved to issue #970, assigned to Florent. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
fclairamb
enabled auto-merge (squash)
November 21, 2026 19:05
Merged
fclairamb
added a commit
that referenced
this pull request
Nov 22, 2026
🤖 I have created a release *beep* *boop* --- ## [0.53.0](v0.52.0...v0.53.0) (2026-11-22) ### Features * **auth:** OIDC-only mode with IdP group admin roles ([#966](#966)) ([1b51f89](1b51f89)) * **service:** install writes config.env, unit loads it via EnvironmentFile ([#948](#948)) ([e4b7fc4](e4b7fc4)) ### Bug Fixes * **aggregation:** drain the raw backlog in one run and log lag ([#978](#978)) ([26b93cd](26b93cd)) * **deps:** update github.com/dop251/goja digest to 79d6ad3 ([#972](#972)) ([02c6821](02c6821)) * **deps:** update go dependencies (non-major) ([#955](#955)) ([7dfbcd6](7dfbcd6)) * **deps:** update go dependencies (non-major) ([#968](#968)) ([6c09bae](6c09bae)) * **deps:** update go dependencies (non-major) ([#979](#979)) ([ee088b6](ee088b6)) * **deps:** update module github.com/oapi-codegen/oapi-codegen/v2 to v2.9.0 ([#975](#975)) ([1121e2e](1121e2e)) * **deps:** update module go.mongodb.org/mongo-driver/v2 to v2.10.1 ([#950](#950)) ([9e684c4](9e684c4)) * email validation, OAuth error display, translator crash guard, clone slugs, watchdog pauses ([#959](#959)) ([a20f951](a20f951)) * log OAuth code-exchange failures, show a refused sign-in on the invitation page ([#974](#974)) ([c4a8dca](c4a8dca)) * retry SMTP 4xx, 503 on agent auth DB errors, scope checkGroupUid to the org ([#973](#973)) ([88179aa](88179aa)) * **security:** block WebRTC around the browser egress proxy, survive an invalid status page ?lang= ([#957](#957)) ([79bdc82](79bdc82)) * **security:** keep OIDC-group admin grants revocable, mask resolved channel references, contain browser popups ([#976](#976)) ([6e0f09e](6e0f09e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Closes #942
What changed
auth.local_login.enabled(SP_LOCAL_LOGIN_ENABLED, on by default) turns off password login, register, password reset, change-password, LDAP login, and accepting an invite with a password. Those endpoints then answer 403LOCAL_LOGIN_DISABLED. Passkeys and SSO still work. The login and security pages hide the password UI, and the super-admin auth settings page has the switch.auth.oidc.groups_claim,auth.oidc.super_admin_groupsandauth.oidc.org_admin_groupsgive super admin and org admin to members of those IdP groups.users.super_admin_sourceandorganization_members.role_source, in the unreleased 039 migration.auth.super_admin_changed) and returned asroleChangeson/auth/handoff/exchange.SP_LOCAL_LOGIN_ENABLED=trueandSP_ADMIN_PASSWORDto get a super admin back.wiki/features/sso.md, the errors, auth and DB-model wiki pages, and OpenAPI.main(with fix: email validation, OAuth error display, translator crash guard, clone slugs, watchdog pauses #959). The 039 migration keeps both sections;handleInvitationErrorkeeps both the local-login-disabled and invalid-email cases.Decided by autopilot
auth.ldap.enabledstays the way to run LDAP-only.users.super_admin_sourcecolumn. The org-admin role gets the same treatment withorganization_members.role_source.SP_LOCAL_LOGIN_ENABLED=true+SP_ADMIN_PASSWORDat restart, documented, with no hidden back door.🤖 Generated with Claude Code