cds-snc / cds-snc/platform-forms-client

Clean up shared accounts within Cognito / Shift alarm trigger

Open
#6,000 2 comments 0 reactions 0 assignees View on GitHub
data enhancement tech debt
Dominant language
TypeScript
Stars
46
Forks
16
Avg merge
1d 8h
Merged PRs (30d)
85

Description

## Description

We've had a few instances of getting alerted in #forms-production-events with sev2 alarms:

> Flagged new GC Forms account
Potential shared access email address: {{{suspected email address}}}
Review and deactivate account if it's a shared inbox
Severity level: 2

However, it's not possible to review and deactivate them as they've not validated / confirmed the email address with multi-factor authentication.

## Current state

Currently this gets triggered before users confirm their security code. The account not actually being created. It shows up in Cognito, but if users don't enter the confirmation code then their account doesn't get created in the database (only Cognito).

We also have a check when users request to unlock publishing.

## Proposed

Potentially streamline process:

- Once account is created automate comms, alert client early, invite them to delete the account themselves?
- After 2 days, if they haven't yet unlocked publishing , alert client that we will be manually deactivating shared account immediately.
- Once requesting publishing, also alert client that we will be manually deactivating shared account immediately.
- Clean these up from Cognito periodically, or have a mechanism to tidy up orphaned Cognito accounts with no corresponding User record in our db?
- Could also migrate accounts to Zitadel and this would clean things up?

## Examples

https://gcdigital.slack.com/archives/C05G766KW49/p1755109547901439
https://gcdigital.slack.com/archives/C05G766KW49/p1755089917143039
https://gcdigital.slack.com/archives/C05G766KW49/p1755046403060999
https://gcdigital.slack.com/archives/C05G766KW49/p1753811215745839
https://gcdigital.slack.com/archives/C05G766KW49/p1755111601994179
https://gcdigital.slack.com/archives/C05G766KW49/p1755176382135859
https://gcdigital.slack.com/archives/C05G766KW49/p1755120677717299
https://gcdigital.slack.com/archives/C05G766KW49/p1755111601994179
https://gcdigital.slack.com/archives/C05G766KW49/p1755180841942479
https://gcdigital.slack.com/archives/C05G766KW49/p1755277412683789
https://gcdigital.slack.com/archives/C05G766KW49/p1755277917972839
https://gcdigital.slack.com/archives/C05G766KW49/p1755534236912369
etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.