Skip to content

Webhook form: has_secret, Remove secret; SSO masked-secret hints - #210

Merged
mpge merged 1 commit into
mainfrom
fix/webhook-secret-has-secret
Oct 22, 2026
Merged

mpge merged 1 commit into
mainfrom
fix/webhook-secret-has-secret

Conversation

@mpge

@mpge mpge commented Oct 22, 2026

Copy link
Copy Markdown
Member

Frontend half of the stored-secrets fix (escalated-laravel #258).

Webhooks form (Admin/Webhooks/Form)

  • When the webhook prop carries has_secret, the secret field starts blank and, if a secret is stored, says "A secret is set. Leave blank to keep it." with a Remove secret button. Remove posts clear_secret: true (with Keep secret to undo); otherwise the form posts clear_secret: false, and a blank secret keeps the stored one on the backend.
  • Backends that still send secret (no has_secret key) behave exactly as before: the field is filled in, posted back as it is, and clear_secret is never sent.
  • Shows form.errors.secret if the backend returns one.

SSO settings (Admin/Settings/SsoSettings)

  • When the JWT shared secret or OAuth client secret arrives masked (********), a hint says a secret is set and that leaving the field alone keeps it. The mask is posted back unchanged, which backends now treat as "keep". Inputs get autocomplete="new-password" so browsers do not autofill a saved password into them.

Tests: tests/pages/AdminStoredSecrets.test.js (10 cases: has_secret blank/keep/replace/remove/undo, no stored secret, legacy secret backend, create, SSO masked hints and post-back). Full vitest suite green locally except tests/packaging.test.js, which fails identically on main locally (npm pack environment issue) and runs in CI.

The webhook form leaves the secret blank when the backend sends has_secret,
says a secret is set, and offers Remove secret (clear_secret: true). Backends
that still send secret keep the old behaviour. The SSO page says when a
masked secret is stored.
@mpge
mpge merged commit 32b6ce6 into main Oct 22, 2026
11 checks passed
@mpge mpge mentioned this pull request Oct 22, 2026
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