Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Decrypt sends decryption requests to pald for every secret specified in the // configuration for this Client. Upon success, the decrypted plaintexts are // stored for use in a future call to Exec. Decrypt() error // Exec executes the given command with the given environment. It additonally // injects any secrets decrypted with a previous call to Decrypt. Exec(arg, env []string) error }
Client represents a PAL client capable of issuing deryption requests and executing a subprocess with a provided set of environment variables. It provides the core functionality for the 'pal' command line tool, and is implemented by the ClientV1 and ClientV2 types.
func NewClientV1 ¶
NewClientV1 constructs a new Client that implements version 1 of the PAL protocol. r is a PAL YAML configuration, socketAddr is the file path to the pald socket, and appEnv is the environment from the config to use.
If there is an error reading or parsing r, NewClientV1 will abort the process.
func NewClientV2 ¶
NewClientV2 constructs a new Client that implements version 2 of the PAL protocol. r is a PAL YAML configuration, socketAddr is the file path to the pald socket, and appEnv is the environment from the config to use.
If there is an error reading or parsing r, NewClientV2 will abort the process.
type ConfigEntry ¶
type ConfigEntry struct { Envs map[string]string `yaml:"env,omitempty"` Files map[string]string `yaml:"file,omitempty"` EntryPoint string `yaml:"entrypoint,omitempty"` Command string `yaml:"command,omitempty"` }
ConfigEntry represents a parsed PAL client YAML configuration entry. Note that this is not the schema for a PAL client YAML configuration file. Instead, a PAL client YAML configuration file is itself a map where the keys are environment names, and each value is a single entry (represented by this type). In other words, the full parsed config file is represented by map[string]*ConfigEntry
The following is an example configuration file:
dev: entrypoint: env env: TESTVAR: ro:4VUfu2xX0KGcvRmP76e4VkdESQziR1S4kh7/TRoNOVJ
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a PAL server capable of servicing deryption requests. It provides the core functionality for the 'pald' daemon.
func NewServer ¶
func NewServer(config *ServerConfigEntry) (s *Server, err error)
NewServer constructs a new Server that supports versions 1 and 2 of the PAL protocol.
type ServerConfigEntry ¶
type ServerConfigEntry struct { ROServer string `yaml:"roserver,omitempty"` CABundle string `yaml:"ca,omitempty"` User string `yaml:"ro_user,omitempty"` Password string `yaml:"ro_password,omitempty"` PGPKeyRingPath string `yaml:"pgp_keyring_path,omitempty"` PGPCipher string `yaml:"pgp_cypher,omitempty"` PGPPassphrase string `yaml:"pgp_passphrase,omitempty"` PGPHash string `yaml:"pgp_hash,omitempty"` LabelsEnabled bool `yaml:"labels_enabled,omitempty"` LabelsRetriever string `yaml:"labels_retriever,omitempty"` NotaryTrustServer string `yaml:"notary_trust_server,omitempty"` NotaryTrustDir string `yaml:"notary_trust_dir,omitempty"` }
ServerConfigEntry represents a parsed PAL server YAML configuration entry. Note that this is not the schema for a PAL server YAML configuration file. Instead, a PAL server YAML configuration file is itself a map where the keys are environment names, and each value is a single entry (represented by this type). In other words, the full parsed config file is represented by map[string]*ServerConfigEntry
The following is an example configuration file:
dev: entrypoint: env env: TESTVAR: ro:4VUfu2xX0KGcvRmP76e4VkdESQziR1S4kh7/TRoNOVJ
func LoadServerConfigEntry ¶
func LoadServerConfigEntry(r io.Reader, environment string) (*ServerConfigEntry, error)
LoadServerConfigEntry reads and parses r as a PAL server YAML configuration file, and returns the entry corresponding to the given environment name.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
pal
pal is a client program you can use as your Docker entrypoint to communicate with pald daemon on the host.
|
pal is a client program you can use as your Docker entrypoint to communicate with pald daemon on the host. |
pald
pald is the daemon running on the host responsible for decrypting secrets.
|
pald is the daemon running on the host responsible for decrypting secrets. |
palpgpenc
palpgpenc is a helper utilty to help generate pgp-encrypted secrets.
|
palpgpenc is a helper utilty to help generate pgp-encrypted secrets. |