Documentation ¶
Index ¶
- Constants
- func CheckTSHSupported(w *Wrapper) error
- func GetDestination(botConfig *config.BotConfig, cf *config.CLIConf) (*config.DestinationConfig, error)
- func GetDestinationPath(destination *config.DestinationConfig) (string, error)
- func GetEnvForTSH(destination *config.DestinationConfig) (map[string]string, error)
- func GetIdentityTemplate(destination *config.DestinationConfig) (*config.TemplateIdentity, error)
- func GetTLSCATemplate(destination *config.DestinationConfig) (*config.TemplateTLSCAs, error)
- func GetTSHVersion(w *Wrapper) (*semver.Version, error)
- func LoadIdentity(identityPath string) (*tlsca.Identity, error)
- type Wrapper
Constants ¶
const ( // TSHVarName is the name of the environment variable that can override the // tsh path that would otherwise be located on the $PATH. TSHVarName = "TSH" // TSHMinVersion is the minimum version of tsh that supports Machine ID // proxies. TSHMinVersion = "9.3.0" )
Variables ¶
This section is empty.
Functions ¶
func CheckTSHSupported ¶
CheckTSHSupported checks if the current tsh supports Machine ID.
func GetDestination ¶
func GetDestination(botConfig *config.BotConfig, cf *config.CLIConf) (*config.DestinationConfig, error)
GetDestination attempts to select an unambiguous destination, either from CLI or YAML config. It returns an error if the selected destination is invalid.
func GetDestinationPath ¶
func GetDestinationPath(destination *config.DestinationConfig) (string, error)
GetDestinationPath returns a path to a filesystem destination.
func GetEnvForTSH ¶
func GetEnvForTSH(destination *config.DestinationConfig) (map[string]string, error)
GetEnvForTSH returns a map of environment variables needed to properly wrap tsh so that it uses our Machine ID certificates where necessary.
func GetIdentityTemplate ¶
func GetIdentityTemplate(destination *config.DestinationConfig) (*config.TemplateIdentity, error)
GetIdentityTemplate returns the identity template for the given destination. This is a required template so it _should_ never fail.
func GetTLSCATemplate ¶
func GetTLSCATemplate(destination *config.DestinationConfig) (*config.TemplateTLSCAs, error)
GetTLSCATemplate returns the TLS CA template for the given destination. It's a required template so this should never fail.
func GetTSHVersion ¶
GetTSHVersion queries the system tsh for its version.