feat(credentials): added a provider-plugable credentials handling mec… #33
+1,256
−50
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.
Proposal: Pluggable credentials support
The
credentials
package is designed to provide a pluggable interface for managing credentials across different services.The package is designed to be used in conjunction with provider instances. When required, it supports daisy-chaining of
multiple credential providers to provide a more complex credential resolution mechanism.
Goals
A simple example
Without credentials
With credentials
username/password
token
A more complex example using daisy-chained credentials
Credentials
[Schema]
[Supported credentials]
Kubernetes
Hashicorp
AWS
Schema
k8s_secret
Secret
namespace
,name
,key
k8s_cm
ConfigMap
namespace
,name
,key
vault
Vault
engine
,mount
,keys
aws_ssm
Systems Manager
decryption
,keys
aws_sm
Secrets Manager
path
,key
Common keywords
Note
All fetched credentials are automatically shared with other services via an internal
secret bus
.However, it is sometimes desirable to be able to consume and expose environment variables to downstream services.
This is by default not active but can be enabled by using
expose
field.path
key
key
will be extracted.target
expose
false
)keys
path
,key
,target
,expose
(and other additional fields when applicable) items allowing multiple secrets to be fetched/e at once.Note
Credential types can be daisy-chained together to provide a more complex credential resolution mechanism.
For example:
Supported credentials
Kubernetes Secret
expand me! ✨
Kubernetes ConfigMap
expand me! ✨
Hashicorp Vault
expand me! ✨
AWS Systems Manager
expand me! ✨
AWS Secrets Manager
expand me! ✨