Documentation ¶
Index ¶
Constants ¶
const CredentialsGlobalKey = "global/ipmi"
CredentialsGlobalKey is the Vault key used to access MEDS global
credentials
const CredentialsKeyPrefix = "meds-cred"
CredentialsKeyPrefix is the base of the Vault key for credentials
This is the default and the actual one comes from values.yaml
const CredentialsSSHKey = "bmc-ssh-creds"
Vault Key used for BMC SSH key info
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MedsCredStore ¶
type MedsCredStore struct { CCPath string SS sstorage.SecureStorage }
A MedsCredStore holds the connection to a Vault and the base path
used to formulate keys
func NewMedsCredStore ¶
func NewMedsCredStore(keyPath string, ss sstorage.SecureStorage) (mcs *MedsCredStore)
Create a new MedsCredStore struct that uses a SecureStorage backing store.
func (*MedsCredStore) FindBMCSSHCredentials ¶
func (mcs *MedsCredStore) FindBMCSSHCredentials(xname string) (sshCreds MedsSSHCredentials, err error)
func (*MedsCredStore) FindGlobalCredentials ¶
func (mcs *MedsCredStore) FindGlobalCredentials() (medsCred MedsCredentials, err error)
Fetch the global credentials for Mountain blade BMCs from Vault.
func (*MedsCredStore) StoreGlobalCredentials ¶
func (mcs *MedsCredStore) StoreGlobalCredentials(medsCred MedsCredentials) (err error)
Store the global credentials for Mountain blade BMCs into Vault.
type MedsCredentials ¶
A MedsCredentials represents a username/password pair
func (MedsCredentials) String ¶
func (medsCred MedsCredentials) String() string
Due to the sensitive nature of the data in MedsCredentials, make a custom String function to prevent passwords from being printed directly (accidentally) to output.
type MedsSSHCredentials ¶
type MedsSSHCredentials struct { Username string `json:"username"` Password string `json:"password"` AuthorizedKey string `json:"authorizedkey"` }
BMC SSH creds