Skip to content

fix(pangolin): gate converge-created resources with SSO by default (#238) - #239

Merged
ChrisonSimtian merged 1 commit into
mainfrom
feat/pangolin-sso-on-create-238
Jul 12, 2026
Merged

fix(pangolin): gate converge-created resources with SSO by default (#238)#239
ChrisonSimtian merged 1 commit into
mainfrom
feat/pangolin-sso-on-create-238

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Description

Closes the core of #238. Correction to the original issue: the EE / *.lab public-ingress model, the rollout fixes, and the wildcard grey-cloud A-record converge are already in main (#215 / #216 / #219 / #221 / #223) — the "unmerged branches" premise in #238 was stale. What actually remained was a latent security bug plus codifying the one live resource that was created out-of-band.

The bug

ReconcileResourcesAsync set ssl on resource create but never set sso. The Pangolin integration-API create defaults sso to null (OPEN), so a from-scratch converge would create every admin UI with no auth gate — publicly reachable — directly contradicting the "gated by Pangolin auth (badger)" contract in the stack yaml. Confirmed via the code path + the sso:null observed when power.lab was created by hand through the same PUT /resource call.

The fix

  • Set sso explicitly on create: default ON, with a per-resource sso: false opt-out for native clients that can't render the SSO interstitial (Plex, audiobookshelf — the case flagged in the media-exposure notes).
  • Extracted the decision to ResourceSsoEnabled + a theory test.
  • Codified the live power.lab.chrison.dev resource (PowerOrchestrator dashboard + Wake/Sleep/Arm control API, Demand-driven node power management — auto sleep/wake Proxmox nodes (WoL + presence) #191) into the declarative resources: so it survives converge. The add-only reconcile skips the already-live one, so no disruption.

Testing

  • dotnet test96 passed, incl. the new Pangolin_Resource_SsoDefaultsOn_UnlessOptedOut theory (5 cases).
  • Live power.lab.chrison.dev already verified end-to-end (valid LE cert + SSO 302).

Out of scope (remaining #238 follow-ups)

  • UniFi WAN :443 port-forward is still hand-managed — already documented in pangolin.lxc.yaml and gated on BL-011: UniFi write path + network shapes #102 (UniFi write path).
  • Legacy CT-2012 retirement (the pre-EE native install) — retire once nothing rides it.
  • Update-existing / prune — the reconcile stays add-only (create-by-fullDomain); it won't retrofit sso onto resources created before this fix (none are open today — traefik.lab and power.lab are both gated).

🤖 Generated with Claude Code

)

ReconcileResourcesAsync set `ssl` on create but never `sso`, and the
integration-API create defaults `sso` to null (OPEN). So a from-scratch
converge would create admin UIs with NO auth gate — publicly reachable —
contradicting the "gated by Pangolin auth" contract. Set sso explicitly on
create: default ON, with a per-resource `sso: false` opt-out for native
clients that can't render the SSO interstitial (Plex, audiobookshelf).

Also codify the live `power.lab.chrison.dev` resource (PowerOrchestrator
dashboard + Wake/Sleep/Arm control API, #191) declaratively so it survives
converge; the add-only reconcile skips the already-live one.

Extracted the sso decision to ResourceSsoEnabled + a theory test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 5ab78c8 into main Jul 12, 2026
6 checks passed
@ChrisonSimtian
ChrisonSimtian deleted the feat/pangolin-sso-on-create-238 branch July 12, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant