Repository navigation
Conversation
Signed-off-by: Andrea Luzzardi <[email protected]>
This was referenced Sep 16, 2022
Closed
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
|
This PR was closed because it has been stalled for 7 days with no activity. |
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.
[NOTE: for discussion only, not meant to be merged]
This PR introduces the concept of "secret providers".
Example:
{ core { image(ref: "alpine") { exec(input: { secretEnv: {name:"SECRET", id:"env://MY_SECRET"}, args: ["printenv", "SECRET"]} ) { stdout } } } }In this basic example,
env://MY_VARIABLEcan be passed in place of anySecretID.How does it work?
Secrets are retrieved just in time, when buildkit requests them (through the secrets gRPC "callback")
Cloak's secret provider turns around and issues a query against the API to resolve the secret, like so:
e.g. For a given
<protocol>://<key>SecretID, the query becomescore { secrets { <protocol>(name: <key>) }Extensions
Let's imagine a hypothetical
vaultextension.All the extension would have to do is extend
Secretswith the new provider, like this:Then, automatically,
vault://my_tokenwill be a validSecretIDout of the box.Cloak has a few built-in providers (
env,file, ...) and extensions can add more on top.Caveats
extend type Secrets) is quick and dirtyQueryFor instance, this might work:
cloak can then scan the schema for types that implement
SecretsProvider, query them for theirprotocol, and just-in-time resolveplaintextwhen a secret is needed.