Skip to content

BUGFIX: EventParticipantSecretV2Service - Override Redacted Secret From Storage On Modify - #728

Merged
cjdutoit merged 3 commits into
mainfrom
users/cjdutoit/bugfix-eventparticipantsecretv2-modify-override-secret
Jul 18, 2026
Merged

cjdutoit merged 3 commits into
mainfrom
users/cjdutoit/bugfix-eventparticipantsecretv2-modify-override-secret

Conversation

@cjdutoit

@cjdutoit cjdutoit commented Jul 18, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes a regression introduced by the #13 secret-hash redaction (#726). Once the client redacts Secret to null on reads, the foundation Modify rejected it — the structural "Secret required" rule and the against-storage "must match" rule both fail on a null secret. The Operations Portal re-reads the redacted secret and passes it to Modify, so editing a secret's lifecycle (activate/deactivate, active-from/to) failed with "Unable to save the secret." — reproduced end-to-end.

Fix

  • Foundation — Modify no longer requires Secret, and ModifyEventParticipantSecretV2Async overrides the incoming Secret with the stored value before the against-storage validation. The secret stays immutable (any supplied value is ignored), lifecycle-only edits succeed, and the must-match-storage rule passes automatically.
  • Guard test — the previous "SecretNotSameAsStorage throws" test is repurposed to assert the override (a differing secret is overridden and Modify succeeds); if the override is ever removed, this test flips back to a failure and catches it.
  • Portal — the participant secret grid renders ***** for the redacted column (Admin + My Account pages); the Edit flow is unchanged.

Verification

  • 3028 unit + 63 acceptance (SQL Server + Postgres in CI) + 130 Portal tests green.
  • End-to-end in the Portal: deactivated then reactivated a secret — both saved with no error, ***** shown throughout.

closes #727

@cjdutoit
cjdutoit merged commit 0d21284 into main Jul 18, 2026
9 checks passed
@cjdutoit
cjdutoit deleted the users/cjdutoit/bugfix-eventparticipantsecretv2-modify-override-secret branch July 18, 2026 07:00
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.

BUGFIX: EventParticipantSecretV2Service - Override Redacted Secret From Storage On Modify

1 participant