fix(sso): show the saved client secret as a masked fact with an explicit Replace action - #6321
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview API: UI: A new Tests: Reviewed by Cursor Bugbot for commit 707c675. Configure here. |
Greptile SummaryThe PR changes stored OIDC client secrets from visible sentinel values to masked, explicitly replaceable UI state while preserving unchanged secrets during edits.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/auth/sso/providers/route.ts | Adds a length-gated, four-character display hint while continuing to redact the stored client secret. |
| apps/sim/ee/sso/components/sso-settings.tsx | Implements masked saved-secret state, explicit replacement, required replacement validation, and sentinel-based preservation. |
| apps/sim/ee/sso/components/sso-settings.test.tsx | Adds regression coverage for the saved-secret UI and submission paths. |
Reviews (5): Last reviewed commit: "fix(sso): clear the required-error when ..." | Re-trigger Greptile
…icit Replace action
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 707c675. Configure here.
Summary
[REDACTED]. It now renders empty with a••••••••••••placeholder, and says a secret is savedThe API deliberately never returns the secret:
GET /api/auth/sso/providerssubstitutesREDACTED_MARKER, and the register route treats that same sentinel on the way back in as "keep what is stored". That contract is correct and is unchanged here — the bug was purely that the client dropped the sentinel straight into a visible input, so the field read[REDACTED]and an admin re-saving had no way to tell whether their secret was intact.Note on the eye toggle: it reveals what the admin types, not the stored secret. Revealing the saved value would require sending it to the browser, which is exactly what the obfuscation work removed — so it is deliberately not done here.
Type of Change
Testing
Typecheck, lint, and
bunx vitest run app/api/auth/sso app/api/organizations(106 passed) all clean. The SSO settings form has no test suite; this change is UI-only and needs a visual check against a configured OIDC provider.Checklist