-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add Support for Control Your Own Key (CYOK) and Bring Your Own Key (BYOK) Features with New EncryptionKeyManager
#435
Add Support for Control Your Own Key (CYOK) and Bring Your Own Key (BYOK) Features with New EncryptionKeyManager
#435
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #435 +/- ##
=======================================
Coverage 95.64% 95.64%
=======================================
Files 48 49 +1
Lines 8081 8158 +77
=======================================
+ Hits 7729 7803 +74
- Misses 235 238 +3
Partials 117 117 ☔ View full report in Codecov by Sentry. |
EncryptionKeyManager
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.
other than the default: coming first in switch statements, which seems odd, it looks pretty good.
🔧 Changes
This PR introduces a new
EncryptionKeyManager
to manage encryption keys using the Auth0 Management API, with added support for Control Your Own Key (CYOK) and Bring Your Own Key (BYOK) features. The following methods have been added:📚 References
Create: Creates a new encryption key.
List: Lists all existing encryption keys.
Read: Reads an encryption key by its key ID.
Rekey: Performs a rekeying operation on the key hierarchy.
Delete: Deletes an encryption key by its key ID.
ImportWrappedKey: Imports wrapped key material and activates the encryption key.
CreatePublicWrappingKey: Creates a public wrapping key to wrap encryption key material.
Each method integrates directly with the Auth0 Management API, allowing for full lifecycle management of encryption keys.
🔬 Testing
Test Summaries for
EncryptionKeyManager
TestEncryptionKeyManager_Create: Verifies that an encryption key can be created successfully.
TestEncryptionKeyManager_List: Confirms that the
List
method retrieves all encryption keys.TestEncryptionKeyManager_Read: Ensures that an encryption key can be read by its key ID.
TestEncryptionKeyManager_Rekey: Validates that the
Rekey
method correctly rekeys the key hierarchy.TestEncryptionKeyManager_Delete: Tests that an encryption key can be deleted and its state becomes "destroyed."
TestEncryptionKeyManager_CreatePublicWrappingKey: Checks that a public wrapping key is generated successfully.
TestEncryptionKeyManager_ImportWrappedKey: Confirms that wrapped key material can be imported and activated.
📝 Checklist