Skip to content
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

add secretstore.Plaintext convenience function #143

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

joeshaw
Copy link
Member

@joeshaw joeshaw commented Sep 25, 2024

This consolidates opening the store, getting the secret, and decrypting
the secret into a single call, making more a more convenient API for
getting secrets.

Update the integration test and example to use this, since it does
all the same stuff as before.

This consolidates opening the store, getting the secret, and decrypting
the secret into a single call, making more a more convenient API for
getting secrets.

Update the integration test and example to use this, since it does
all the same stuff as before.
// the given secret store and secret name.
//
// This is a convenience function that combines the functionality of
// [Open], [Store.Get], and [Secret.Plaintext].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add a caveat if that if you're obtaining multiple secrets from a store to actually call Open/Get/Plaintext etc instead of calling this repeatedly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we can skip it, but I'll add it if you feel strongly about it. There's very little overhead, basically just the open hostcall itself and copying a handle or error back into guest space.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, 🚲 🏠 ⚠️ but I prefer phrasing it as returns the secret value as a []byte for

Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can tweak doc wording later.

@joeshaw joeshaw merged commit 92fbb73 into main Sep 26, 2024
11 checks passed
@joeshaw joeshaw deleted the joeshaw/secretstore-convenience branch September 26, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants