Documentation ¶
Overview ¶
Package secrets provides primitives for resolving secrets from external sources, such as Hashicorp Vault or Azure Key Vault, into Credential Sets and injecting them into bundle runtimes.
Index ¶
- Constants
- type Client
- type Plugin
- type Server
- type Set
- type Source
- func (s Source) MarshalJSON() ([]byte, error)
- func (s Source) MarshalRaw() interface{}
- func (s Source) MarshalYAML() (interface{}, error)
- func (s *Source) UnmarshalJSON(data []byte) error
- func (s *Source) UnmarshalRaw(raw map[string]interface{}) error
- func (s *Source) UnmarshalYAML(value *yaml.Node) error
- type Store
- type Strategy
Constants ¶
const PluginInterface = "secrets"
PluginInterface for the secrets. This first part of the three-part plugin key is only seen/used by the plugins when the host is communicating with the plugin and is not exposed to users.
const SourceSecret = "secret"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
Impl plugins.SecretsProtocol
}
Plugin is a generic type of plugin for working with any implementation of a secret store.
type Server ¶
type Server struct {
Impl plugins.SecretsProtocol
}
type Set ¶ added in v1.0.1
Set is an actual set of resolved values. This is the output of resolving a parameter or credential set file.
func (Set) IsValid ¶ added in v1.0.1
IsValid determines if the provided key (designating a name of a parameter or credential) is included in the provided set
func (Set) Merge ¶ added in v1.0.1
Merge merges a second Set into the base.
Duplicate names are not allow and will result in an error, this is the case even if the values are identical.
func (Set) ToCNAB ¶ added in v1.0.1
func (s Set) ToCNAB() valuesource.Set
ToCNAB converts this to a type accepted by the cnab-go runtime.
type Source ¶ added in v1.0.1
Source represents a strategy for loading a value from local host.
func (Source) MarshalJSON ¶ added in v1.0.1
func (Source) MarshalRaw ¶ added in v1.0.1
func (s Source) MarshalRaw() interface{}
func (Source) MarshalYAML ¶ added in v1.0.1
func (*Source) UnmarshalJSON ¶ added in v1.0.1
func (*Source) UnmarshalRaw ¶ added in v1.0.1
func (*Source) UnmarshalYAML ¶ added in v1.0.1
type Store ¶ added in v1.0.1
type Store interface { plugins.SecretsPlugin }
Store is the interface that Porter uses to interact with secrets.
type Strategy ¶ added in v1.0.1
type Strategy struct { // Name is the name of the parameter or credential. Name string `json:"name" yaml:"name"` // Source is the location of the value. // During resolution, the source will be loaded, and the result temporarily placed // into Value. Source Source `json:"source,omitempty" yaml:"source,omitempty"` // Value holds the parameter or credential value. // When a parameter or credential is loaded, it is loaded into this field. In all // other cases, it is empty. This field is omitted during serialization. Value string `json:"-" yaml:"-"` }
Strategy represents a strategy for determining the value of a parameter or credential
Directories ¶
Path | Synopsis |
---|---|
host
Package host provides a plugin implementing the original behavior of resolving secrets from the local host: environment variables, paths, commands and static values.
|
Package host provides a plugin implementing the original behavior of resolving secrets from the local host: environment variables, paths, commands and static values. |
in-memory
Package inmemory provides an in-memory implementation of a secret store suitable for unit testing.
|
Package inmemory provides an in-memory implementation of a secret store suitable for unit testing. |
Package pluginstore is an internal Porter package that implements the plugins.SecretsPlugin interface.
|
Package pluginstore is an internal Porter package that implements the plugins.SecretsPlugin interface. |