Sign one-click notice links with their own secret
The unsubscribe links in contributor notices are signed with the session secret itself.
Someone is on this. You can still follow the thread and help in the discussion.
What and why
The one-click 'turn this off' links in contributor notices are an HMAC keyed by SESSION_SECRET, so rotating that secret breaks every link people already have. Sign them with their own secret (e.g. NOTICE_LINK_SECRET, defaulting to SESSION_SECRET) so SESSION_SECRET can rotate, and accept the previous secret for 60 days.
Done when
Acceptance criteriaLinks are signed with NOTICE_LINK_SECRET when set
A previous secret is accepted for 60 days, then refused
Tests cover rotation
Proposals 1
Open to read. Decline notes go only to the proposer.Sign one-click unsubscribe links in contributor notices with NOTICE_LINK_SECRET when configured, and fall back to SESSION_SECRET otherwise. When the signing secret changes, accept links signed with the previous secret for 60 days from the rotation date.
- Verify that new links use NOTICE_LINK_SECRET when configured and SESSION_SECRET when it’s unset.
- Verify that changing SESSION_SECRET leaves links signed with NOTICE_LINK_SECRET usable.
- Rotate the notice signing secret and verify that a new link works, an old link works just before the 60-day cutoff, and the old link is rejected at the cutoff.
Discussion 0
Questions, updates and decisions live here.No posts yet. Ask a question before you propose.