-
Notifications
You must be signed in to change notification settings - Fork 24
feat(policy): Update simple kas key #2378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to decode the PEM from base64 directly in the SQL query using
CONVERT_FROM(DECODE(kask.public_key_ctx ->> 'pem', 'base64'), 'UTF8')is a good simplification for the Go unmarshalling logic.Could you confirm if
kask.public_key_ctx ->> 'pem'is always guaranteed to contain a valid base64 encoded string as per data insertion/update logic? If it could ever be non-base64 or malformed, theDECODEfunction might cause the query to error out.Assuming the data integrity ensures it's always valid base64 (as suggested by the
PublicKeyCtxproto definition which states thepemfield is base64 encoded), this approach is robust.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we have a check in the key creation RPC that verifies the public key is base64.