feat(credentials): added a provider-plugable credentials handling mec…#33
Open
pcanilho wants to merge 4 commits intoisometry:mainfrom
Open
feat(credentials): added a provider-plugable credentials handling mec…#33pcanilho wants to merge 4 commits intoisometry:mainfrom
pcanilho wants to merge 4 commits intoisometry:mainfrom
Conversation
isometry
reviewed
Dec 21, 2024
Comment on lines
9
to
+13
| "github.com/fsnotify/fsnotify" | ||
| "github.com/mitchellh/mapstructure" | ||
| "github.com/spf13/viper" | ||
|
|
||
| "github.com/isometry/platform-health/pkg/provider" | ||
| "github.com/isometry/platform-health/pkg/utils" | ||
| "github.com/mitchellh/mapstructure" | ||
| "github.com/spf13/viper" |
Owner
There was a problem hiding this comment.
My style is three import blocks: stdlib => third-party => local
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.
Proposal: Pluggable credentials support
The
credentialspackage 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/passwordtokenA more complex example using daisy-chained credentials
Credentials
[Schema]
[Supported credentials]
KubernetesHashicorpAWSSchema
k8s_secretSecretnamespace,name,keyk8s_cmConfigMapnamespace,name,keyvaultVaultengine,mount,keysaws_ssmSystems Managerdecryption,keysaws_smSecrets Managerpath,keyCommon 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
exposefield.pathkeykeywill be extracted.targetexposefalse)keyspath,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 Secretexpand me! ✨
Kubernetes ConfigMapexpand me! ✨
Hashicorp Vaultexpand me! ✨
AWS Systems Managerexpand me! ✨
AWS Secrets Managerexpand me! ✨