-
Notifications
You must be signed in to change notification settings - Fork 10
ATO-2107: Handle single factor account deletion journey in auth callback (part 1) #7504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| attachLogFieldToLogs(CLIENT_ID, clientId); | ||
|
|
||
| // Validation | ||
| boolean reauthRequested = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I ask why you added the validation comment? just because we haven't done that elsewhere and there is more validation throughout this method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, that was just a placeholder while I was figuring out the handler. I'll remove that!
| auditService.submitAuditEvent( | ||
| OrchestrationAuditableEvent.AUTH_CALLBACK_RESPONSE_RECEIVED, clientId, user); | ||
| var errorCode = input.getQueryStringParameters().get("error"); | ||
| if (configurationService.isSingleFactorAccountDeletionEnabled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a log somewhere in this if to say new sessions etc have been generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout, the logging is a bit sparse. I've added a bunch more!
8217098 to
32a191b
Compare
- SFAD = Single Factor Account Deletion - If we are on a reauth journey and get an SFAD error, we want to redirect to the auth error page. - Error code is subject to change
32a191b to
474f394
Compare
|



Wider context of change
We would like to handle a journey where a user can delete their account if they do not have access to their MFA methods. From an orch perspective this involves waiting for a specific error from auth in the AuthenticationCallbackHandler, generating a new session and client session, and redirecting back to auth to start a new journey. We have split this work into 2 major parts, the first being creating a new feature flag, handling the single factor account deletion (SFAD) error from auth, and generating new sessions. The second part would be to redirect to auth to start a new journey..
What’s changed
This PR is the first part of the single factor account deletion changes. It adds a feature flag for SFAD enabled (only in dev at the moment), checks to see if there is an oauth error from auth (Note: we are using a placeholder error for the time being), and generates a new session and client session if the feature flag is enabled and the error is present.
If the user is on a reauth journey they will be redirected to the auth frontend error page, as this will not be supported in the new SFAD journey.
At the moment, the successful SFAD journey ends by redirecting to the frontend error page, and updating the new session cookies. This will be changed in a later issue.
Manual Testing
Tested an auth journey in dev which completed successfully.
Checklist