Repository navigation
feat(keyservice): add managed HSM runtime client - #86
Draft
crisfiorini-oss wants to merge 2 commits into
Draft
crisfiorini-oss wants to merge 2 commits into
crisfiorini-oss wants to merge 2 commits into
Conversation
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.
Summary
Add the managed-key runtime client needed by a hosted consumer that requires purpose-bound encryption, stable MAC lookup and wrapped signing material. The client uses Azure Managed HSM through the official Azure SDK; no Vault server or replacement proxy is introduced.
Changes
Classification: fix at the provider owner. This is source implementation, not a live backend deployment.
Testing
cd keyservice && go test -race ./... && go vet ./...: passed against a controlled service transport using the actual Azure SDK and AES-GCM/HMAC.Open questions / Next steps
Consumer integration follows the existing generic Host key-service interface. Infrastructure must supply an activated HSM, recovery custody, exact grants and key versions before live qualification. This PR does not provision an HSM or choose a recovery quorum. Related owner gap: codefly-dev/cli#924.
Live-protocol correction at
a6c7256b: Azure Managed HSM rejected a caller-supplied GCM nonce. Encryption now accepts and validates the nonce generated by the HSM; decryption retains the framed nonce. Controlled SDK transport tests reject a supplied encryption nonce and cover roundtrip/tamper behavior. The analogous infrastructure signing-seed wrap succeeded against the live HSM; this is protocol evidence, not yet an Accounts workload or HMAC qualification.Current CI gate (2026-10-28)
The branch is already based on current main. The upstream pull-request workflows require maintainer approval; the contributor cannot approve those runs.
An unchanged-head draft fork validation PR ran the full workflows (run 40717181840). The managed-key client and shared build passed. Both lifecycle/test lanes fail at
TestVaultImageAuditagainst the existing canonicalruntime-v2.0.3-patched.16image, not in the managed-key client tests.The image audit reports CVE-2026-116587 in go-jose/v3 3.0.5 and go-jose/v4 4.1.4. The upstream advisory publishes a v4 fix in 4.1.6 and no patched v3 release. The runtime image owner must supply a remediated, published image and pin before these lanes can pass. Changing only the Dockerfile does not repair CI, which audits the published digest. No audit exception or weakened gate has been introduced. Keep this PR draft until the upstream workflows and runtime-image audit pass.