cds-snc / notification-planning-core

Project planning for GC Notify Core Team
0 stars 0 forks source link

Resigning data at rest when SECRET_KEY changes #96

Open sastels opened 1 year ago

sastels commented 1 year ago

Description

As a Notify developer, I need to be able to easily rotate our signing key

WHY are we building?

Need to be able to rotate our signing key without downtime

WHAT are we building?

Code to allow the signing key to be rotated and any signed database fields resigned.

VALUE created by our solution

Can rotate the signing key without downtime

Acceptance Criteria

QA Steps

sastels commented 1 year ago

Made some improvements to the code and in particular the testing. Ready for exhaustive local testing.

sastels commented 1 year ago

Found a problem with get_api_key_by_secret() when you've rotated keys but not resigned the database yet. Fixed. Continuing with testing...

sastels commented 1 year ago

changed the resigner tests to leave the CryptoSigners in their original state. Needed to get some other tests to pass (and a good practice)

sastels commented 1 year ago

https://github.com/cds-snc/notification-api/pull/1789 tested locally

jimleroyer commented 1 year ago

@ben851 to QA pair with @sastels

ben851 commented 1 year ago
ben851 commented 1 year ago

Validated locally with @sastels, approved PR.