Documentation
¶
Overview ¶
Copyright (C) 2021-2023, Kubefirst
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Index ¶
Constants ¶
const ( // Name for the Secret that gets created that contains root auth data VaultSecretName string = "vault-unseal-secret" // Namespace that Vault runs in VaultNamespace string = "vault" RecoveryShares int = 5 // number of recovery keys for Vault RecoveryThreshold int = 3 SecretShares = 5 // number of secret threshold Vault unseal SecretThreshold = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HealthResponse ¶
type HealthResponse struct {
Initialized bool `json:"initialized"`
Sealed bool `json:"sealed"`
Standby bool `json:"standby"`
PerformanceStandby bool `json:"performance_standby"`
ReplicationPerformanceMode string `json:"replication_performance_mode"`
ReplicationDRMode string `json:"replication_dr_mode"`
ServerTimeUTC int `json:"server_time_utc"`
Version string `json:"version"`
ClusterName string `json:"cluster_name"`
ClusterID string `json:"cluster_id"`
}
HealthResponse specifies the content of a health response from a vault API https://developer.hashicorp.com/vault/api-docs/system/health#sample-response
type InitRequest ¶
type InitRequest struct {
SecretThreshold int `json:"secret_threshold"`
}
InitRequest specifies the content of an `init` operation against a vault API https://developer.hashicorp.com/vault/api-docs/system/init#sample-payload
type InitResponse ¶
type InitResponse struct {
Keys []string `json:"keys"`
KeysBase64 []string `json:"keys_base64"`
RootToken string `json:"root_token"`
}
InitResponse specifies the content of an `init` operation response from a vault API https://developer.hashicorp.com/vault/api-docs/system/init#sample-response-1
type RaftJoinRequest ¶
type RaftJoinRequest struct {
LeaderAPIAddress string `json:"leader_api_addr"`
}
type RaftJoinResponse ¶
type RaftJoinResponse struct {
}
type UnsealRequest ¶
type UnsealRequest struct {
Key string `json:"key"`
}
UnsealRequest specifies the content of an `unseal` operation against a vault API https://developer.hashicorp.com/vault/api-docs/system/unseal#sample-payload
type UnsealResponse ¶
type UnsealResponse struct {
Sealed bool `json:"sealed"`
T int `json:"t"`
N int `json:"n"`
Progress int `json:"progress"`
Version string `json:"version"`
ClusterName string `json:"cluster_name"`
ClusterID string `json:"cluster_id"`
}
UnsealResponse specifies the content of an `unseal` operation response from a vault API t holds the threshold and n holds the number of shares https://developer.hashicorp.com/vault/api-docs/system/unseal#sample-response
type VaultConfiguration ¶
var Conf VaultConfiguration = VaultConfiguration{ Config: NewVault(), }
func (*VaultConfiguration) AutoUnseal ¶
func (conf *VaultConfiguration) AutoUnseal() (*vaultapi.InitResponse, error)
func (*VaultConfiguration) GetUserPassword ¶
func (conf *VaultConfiguration) GetUserPassword(endpoint string, token string, username string, key string) (string, error)
GetUserPassword retrieves the password for a Vault user at the users mount path