authenticator: Zeroize ValidatedClaims and OidcClaims on drop#35704
Draft
jasonhernandez wants to merge 2 commits intomainfrom
Draft
authenticator: Zeroize ValidatedClaims and OidcClaims on drop#35704jasonhernandez wants to merge 2 commits intomainfrom
jasonhernandez wants to merge 2 commits intomainfrom
Conversation
|
Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone. PR title guidelines
Pre-merge checklist
|
e9bc8be to
1c8aafa
Compare
1308d53 to
9b3927b
Compare
Base automatically changed from
jasonhernandez/sec-115-ore-zeroize-feature
to
main
March 31, 2026 17:30
Implement Zeroize for OidcClaims (issuer, audience, unknown claims) and Zeroize + ZeroizeOnDrop for ValidatedClaims (user identity string). Document that OidcDecodingKey wraps an opaque foreign type and cannot be zeroized, and that borrowed JWT token strings are the caller's responsibility. Part of SEC-115. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1c8aafa to
eb68d55
Compare
Adding `Drop` to `ValidatedClaims` prevents moving fields out directly. Use `std::mem::take` to extract values while leaving empty defaults for the Drop impl to zeroize. Fixes: mz-pgwire and mz-environmentd build failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Motivation
Defense-in-depth: zero user identity and JWT claim data from memory after use.
Description
Zeroize+ZeroizeOnDropforValidatedClaims(user identity string)ZeroizeforOidcClaims(issuer, audience, timestamps, unknown claims)OidcDecodingKeywraps opaquejsonwebtoken::DecodingKeyand cannot be zeroized&strparameters are the caller's responsibilityNo public API changes.
Depends on
ore::securemodule)Part of SEC-115.