decryptor

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BizAppAuthToken

func BizAppAuthToken() string

func CommandExecutorID

func CommandExecutorID() string

func IsCloudRunner

func IsCloudRunner() bool

func ReaperURL

func ReaperURL() string

Types

type Decryptor

type Decryptor interface {
	DecryptArguments([]string) ([]string, error)
}

func NewDecryptor

func NewDecryptor() Decryptor

func NewNoopDecryptor

func NewNoopDecryptor() Decryptor

func NewReaperDecryptor

func NewReaperDecryptor(url, signingKey, commandExecutorID string) Decryptor

NewReaperDecryptor returns a Decryptor implementation that will call out to the reaper service to decrypt any encrypted arguments.

type NoopDecryptor

type NoopDecryptor struct{}

func (*NoopDecryptor) DecryptArguments

func (n *NoopDecryptor) DecryptArguments(args []string) ([]string, error)

type ReaperDecryptor

type ReaperDecryptor struct {
	BaseURL           string
	SigningKey        []byte
	CommandExecutorID string
}

ReaperDecryptor will call out to the reaper service to decrypt arguments passed into a BizApp. It will use a one-off signing key to handle authorizing a request to decrypt arguments associated with a particular CommandExecutor. The reaper will return a list of decrypted arguments, given a list of arguments in the body of the request

func (*ReaperDecryptor) DecryptArguments

func (r *ReaperDecryptor) DecryptArguments(args []string) ([]string, error)

DecryptArguments replaces any encrypted values with their decrypted values using the reaper service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL