Closed developerkunal closed 2 months ago
Attention: Patch coverage is 96.10390%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 95.64%. Comparing base (
88dff30
) to head (fc9c263
).
Files | Patch % | Lines |
---|---|---|
management/encryption_key.go | 91.17% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
π§ 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