Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultClientDir is the default dir where blessclient will look for a config and cache DefaultClientDir = "~/.blessclient" // DefaultConfigFile is the default file where blessclient will look for its config DefaultConfigFile = "~/.blessclient/config.yml" // DefaultCacheDir is a default cache dir DefaultCacheDir = "~/.blessclient/cache" // DefaultKMSAuthCache is the default kmsauth cache DefaultKMSAuthCache = "kmsauth" // DefaultAWSProfile is the default bless aws profile DefaultAWSProfile = "bless" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bastion ¶
type Bastion struct {
Host `yaml:",inline"`
Hosts []Host `yaml:"hosts"`
IdentityFile string `yaml:"identity_file"`
User string `yaml:"user"`
}
Bastion is an internet accessibly server used to "jump" to other servers
type ClientConfig ¶
type ClientConfig struct {
ClientDir string `json:"client_dir" yaml:"client_dir"`
ConfigFile string `json:"config_file" yaml:"config_file"`
CacheDir string `json:"cache_dir" yaml:"cache_dir"`
KMSAuthCacheDir string `json:"kmsauth_cache_dir" yaml:"kmsauth_cache_dir"`
SSHPrivateKey string `json:"ssh_private_key" yaml:"ssh_private_key"`
// cert related
CertLifetime Duration `json:"cert_lifetime" yaml:"cert_lifetime,inline"`
RemoteUsers []string `json:"remote_users" yaml:"remote_users"`
BastionIPS []string `json:"bastion_ips" yaml:"bastion_ips"`
}
ClientConfig is the client config
type Config ¶
type Config struct {
Version int `json:"version" yaml:"version"`
ClientConfig ClientConfig `json:"client_config" yaml:"client_config"`
LambdaConfig LambdaConfig `json:"lambda_config" yaml:"lambda_config"`
SSHConfig *SSHConfig `json:"ssh_config,omitempty" yaml:"ssh_config,omitempty"`
}
Config is a blessclient config
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig generates a config with some defaults
type Duration ¶
Duration is a wrapper around Duration to marshal/unmarshal
func (Duration) AsDuration ¶
AsDuration returns as duration
func (Duration) MarshalJSON ¶
MarshalJSON marshals to json
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON unmarshals
type Host ¶
type Host struct {
Pattern string `yaml:"pattern"`
}
Host represents a Host block in an ssh config
type LambdaConfig ¶
type LambdaConfig struct {
// RoleARN used to assume and invoke bless lambda
RoleARN string `json:"role_arn" yaml:"role_arn"`
FunctionName string `json:"function_name" yaml:"function_name"`
Regions []Region `json:"regions,omitempty" yaml:"regions,omitempty"`
}
LambdaConfig is the lambda config
type Region ¶
type Region struct {
AWSRegion string `json:"aws_region" yaml:"aws_region"`
KMSAuthKeyID string `json:"kms_auth_key_id" yaml:"kms_auth_key_id"`
}
Region is an aws region
Click to show internal directories.
Click to hide internal directories.