feat: add networkACLKeys handler for HMAC signature key management - #1480
Open
ankita10119 wants to merge 1 commit into
Open
feat: add networkACLKeys handler for HMAC signature key management#1480ankita10119 wants to merge 1 commit into
ankita10119 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1480 +/- ##
==========================================
- Coverage 80.81% 80.16% -0.66%
==========================================
Files 163 166 +3
Lines 7805 7905 +100
Branches 1741 1761 +20
==========================================
+ Hits 6308 6337 +29
- Misses 797 863 +66
- Partials 700 705 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Adds support for managing Network ACL HMAC signing keys (
/api/v2/keys/network-acls) as a newnetworkACLKeysresource type.New handler (
networkACLKeys)createanddelete, keys are immutable after creation so detected updates are treated as no-ops@order(60), beforenetworkACLs(@order(65)), ensuring keys exist before ACL rules that reference themvalue(raw key material) is write-only and never returned by the API, it is not exported and is optional in config; supply at deploy time via keyword replacement (e.g.##HMAC_KEY_VALUE##), if absent, creation is skipped with a warning rather than failingclient.keys.networkAcls as any).delete(id)pendingdelete()being added toNetworkAclsClientin node-auth0Updated networkACLs handler
http_message_signaturetoMatchSchemaso ACL rules can reference HMAC keys by idhttp_message_signatureis not yet present onNetworkAclMatchin node-auth0 6.3.0, the schema change works at runtime today and the TODO comment will be removed in the next SDK releaseSupporting changes
networkACLKeys(stripsvalue,created_at,updated_aton export; keepsidandfingerprintfor reference)NETWORK_ACL_KEYS_DIRECTORY: 'network-acl-keys'constantnetworkACLKeysadded toAssets,AssetTypes, and all handler index files📚 References
🔬 Testing
Unit tests: All 1449 existing tests pass. The
mockMgmtClientintest/utils.jswas extended withkeys.networkAcls.listto cover the new handler path.E2E tests (lockdown mode):
GET /api/v2/keys/network-aclsnock entries added to all four relevant recordings. The handler is exercised in every E2E deploy/dump flow (Retrieving networkACLKeys data from Auth0 visible in logs). 4 pre-existing failures unrelated to this change (Deploy CLI client PATCH mismatch present on master before this PR).Manual test against real tenant:
tenant_acl_hmac_signature+tenant_acl_management_apiflags activea0deploy import- created key, confirmed present viaGET /api/v2/keys/network-aclswith correct fingerprinta0deploy export- wrotename,alg,fingerprintonly (valuecorrectly stripped)📝 Checklist