Add support for multiple secret namespaces#96
Merged
Merged
Conversation
By adding support for multiple namespaces, it is possible to provide access control for larger groups where a single namespace either becomes too verbose, or simply allows visibility to information that would be hidden by preference. Using different Vault policies will allow both of these to be addressed. * Added `--namespace` option to allow for filtering when multiple namespaces are available to the user, adding `config.Settings.NameSpace` to store it at runtime. * Updated `cmd.getVersion` to display the configured `SecretPath` items in verbose mode * Added `cmd.getSecretPath` to iterate namespaces and updated references to call it in place of using `cfg.SecretPath` * Updated `cmd.getConnections` to accept a slice of secrets * Updated `vault.ListSecrets` to iterate over the available namespaces, returning a slice of secrets instead of a single secret * Minor formatting & linting Resolves #83
By adding support for multiple namespaces, it is possible to provide access control for larger groups where a single namespace either becomes too verbose, or simply allows visibility to information that would be hidden by preference. Using different Vault policies will allow both of these to be addressed. * Added `--namespace` option to allow for filtering when multiple namespaces are available to the user, adding `config.Settings.NameSpace` to store it at runtime. * Updated `cmd.getVersion` to display the configured `SecretPath` items in verbose mode * Added `cmd.getSecretPath` to iterate namespaces and updated references to call it in place of using `cfg.SecretPath` * Updated `cmd.getConnections` to accept a slice of secrets * Updated `vault.ListSecrets` to iterate over the available namespaces, returning a slice of secrets instead of a single secret * Minor formatting & linting Resolves #83
When multiple namespaces are configured, it is possible that a user does not have access to all namespaces. In such a scenario, so long as at least one is successful, we will skip over the failures. * Updated `vault.ListSecret` to return secrets _and_ errors when an error exists, allowing a check on number of secrets * Updated `cmd.getConnections` to check the number of secrets when listing
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.
By adding support for multiple namespaces, it is possible to provide
access control for larger groups where a single namespace either
becomes too verbose, or simply allows visibility to information that
would be hidden by preference. Using different Vault policies will
allow both of these to be addressed.
--namespaceoption to allow for filtering when multiplenamespaces are available to the user, adding
config.Settings.NameSpaceto store it at runtime.cmd.getVersionto display the configuredSecretPathitems in verbose mode
cmd.getSecretPathto iterate namespaces and updatedreferences to call it in place of using
cfg.SecretPathcmd.getConnectionsto accept a slice of secretsvault.ListSecretsto iterate over the availablenamespaces, returning a slice of secrets instead of a single
secret
vault.ListSecretto return secrets and errors whenan error exists, allowing a check on number of secrets
cmd.getConnectionsto check the number of secrets whenlisting
Resolves #83