-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-3797] Client changes to use new key rotation process #6881
Conversation
82a5755
to
4417214
Compare
b3f4ff3
to
0664ced
Compare
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
953e7d4
to
9620161
Compare
0664ced
to
88a064c
Compare
9620161
to
2c4a5d6
Compare
88a064c
to
b834845
Compare
- wasn't caught as rename since diff is too different
- use old request model and endpoint for new key rotation - return empty arrays instead of null when building request - call new send service logic for getRotatedKeys
b834845
to
59f6a0a
Compare
New Issues
Fixed Issues
|
59f6a0a
to
45985a8
Compare
45985a8
to
f7b2d82
Compare
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.
A mighty improvement. Excellent work.
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.
Just one nit ⛏️ . Thank you for documenting the new function! ❤️
}); | ||
|
||
it("throws if the new user key is null", async () => { | ||
await expect(sendService.getRotatedKeys(null)).rejects.toThrow(); |
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.
⛏️ The throw should check to ensure that the message is correct.
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.
Added!
throw new Error("New user key is required for rotation."); | ||
} | ||
|
||
return await Promise.all( |
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.
Sorry. Took a closer look and found one more nit:
⛏️ Could you break out the result of the promise.all(...) call into a separate variable? The combination of asynchronous code and the inlined map call will make this a little difficult to step through with a debugger.
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 point, I've definitely had frustrating debugging sessions dealing with the same thing. Updated!
- add easier debuggin - check for specific error in tests
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.
Thanks! Great work! 👍🏻
Type of change
Objective
Final Client changes for Key Rotation Improvements.
KeyRotationService
that is responsible for owning rotation process.Send
re-encryption to theSendService
(KeyRotationService
shouldn't have knowledge about how domains are encrypted).EmergencyAccess
re-encryption to theEmergencyAccessService
.AccountRecoveryService
toOrganizationUserResetPasswordService
after feedback from Admin ConsoleCode changes
Auth
EmergencyAccess
re-encryption to theEmergencyAccessService
. Add deprecated method for legacy key rotations if feature flag is offAdmin Console
AccountRecoveryService
toOrganizationUserResetPasswordService
AccountRecoveryService
toOrganizationUserResetPasswordService
Tools
Other
postAccountKey
toKeyRotationApiService
Screenshots
Before you submit