cds-snc / notification-planning-core

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

Ensure Redis buffer queues are signed correctly based on the new keys #88

Open sastels opened 1 year ago

sastels commented 1 year ago

Description

As a Notify dev, I need to be able to ensure that the notifications buffered in redis are correctly signed

WHY are we building?

When we rotate signing secrets we want to be able to verify that the redis buffers can still be read.

WHAT are we building?

A script to verify the notifications in the redis inboxes and inflights

VALUE created by our solution

Assurance that we are not going to lose notifications we've accepted

Acceptance Criteria

Given some context, when (X) action occurs, then (Y) outcome is achieved.

QA Steps

sastels commented 1 year ago

https://github.com/cds-snc/notification-attic/pull/32

jimleroyer commented 1 year ago

I will test today.

sastels commented 1 year ago

I'll see if I can quickly change to grabbing a few at a time rather than the entire inbox at once.

sastels commented 1 year ago

changed to reading in chunks, and added a few flags, see https://github.com/cds-snc/notification-attic/pull/32

jimleroyer commented 1 year ago

I tested the script in staging and unfortunately, it resigned some keys but the wrongly signed notifications went through to the db save celery task where it's too late in the data pipeline to resign and get these processed correctly. The logic then produces errors on these badly signed notifications. This probably require a better testing plan maybe from my part; will sync with @sastels .

jimleroyer commented 1 year ago

Opened a new PR with updated scripts to use the inflight queues instead. Also added a preview mode. https://github.com/cds-snc/notification-attic/pull/34

ben851 commented 1 year ago

@sastels to review