Repository navigation
fix(otdfctl): DSPX-1561 pass the default assertion verification key to the SDK - #4304
Draft
dmihalcik-virtru wants to merge 1 commit into
Draft
dmihalcik-virtru wants to merge 1 commit into
dmihalcik-virtru wants to merge 1 commit into
Conversation
…o the SDK The decrypt command's assertion verification keys file accepts a "defaultKey" alongside "keys", but that key was never converted from its PEM or secret text, so the SDK could not use it. Convert it like the per-ID keys. Report with reason=configuration-error a key that cannot be used, an HS256 key given as PEM text, and any top-level member other than "keys" and "defaultKey". Also stop dereferencing a nil key when an RSA PRIVATE KEY block fails to parse, and document defaultKey. Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 9, 2026
Contributor
Benchmark results, click to expandBulk Benchmark Results
TDF3 Benchmark Results
|
Contributor
|
Contributor
dmihalcik-virtru
marked this pull request as draft
November 17, 2026 04:55
Member
Author
|
Converting to draft until the xtest is merged |
This branch has not been deployed
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.
Proposed Changes
decryptassertion verification keys file acceptsdefaultKeyalongsidekeys, but the default key was never converted from its PEM or secret text, so the SDK could not use it. It is now converted like per-ID keys (HS256: the string's UTF-8 bytes; RS256: a PEM key).reason=configuration-error: an unknown top-level member (e.g.default_key;DefaultKeyis still accepted), an HS256 key given as PEM text, or a key that cannot be read.RSA PRIVATE KEYblock fails to parse.defaultKey, and notes that it also applies to payload-key assertions (such as thesystem-metadataassertion Java writers add), so those files fail; list specific assertions underkeysinstead.The Go SDK already uses
DefaultKeyfor assertions without a per-ID key; this change only fixes the CLI. No new SDK API is used.Split out of #4301 (draft; the complete change). Cross-SDK counterparts: opentdf/java-sdk#435, opentdf/web-sdk#1138.
Compatibility: keys files with unknown top-level members, or HS256 keys given as PEM text, are now rejected instead of being silently ignored or misused.
Checklist
Testing Instructions
cd otdfctl && go test ./... -race(new cases inpkg/handlers/tdf_test.go).