Documentation ¶
Overview ¶
Package vault provides methods for commonly used vault actions that are used in end-to-end tests.
Index ¶
- func CreateKvPasswordCredential(t testing.TB, secretPath string, user string, kvPolicyFilePath string) (secretName string, password string)
- func CreateKvPrivateKeyCredential(t testing.TB, secretPath string, user string, keyPath string, ...) string
- func Setup(t testing.TB) (vaultAddr string, boundaryPolicyName string, kvPolicyFilePath string)
- func WritePolicy(t testing.TB, ctx context.Context, policyFilePath string) string
- type CreateTokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKvPasswordCredential ¶
func CreateKvPasswordCredential(t testing.TB, secretPath string, user string, kvPolicyFilePath string) (secretName string, password string)
CreateKvPasswordCredential creates a username/password credential in vault and creates a vault policy to be able to read that credential. Returns the name of the policy
func CreateKvPrivateKeyCredential ¶
func CreateKvPrivateKeyCredential(t testing.TB, secretPath string, user string, keyPath string, kvPolicyFilePath string) string
CreateKvPrivateKeyCredential creates a private key credential in vault and creates a vault policy to be able to read that credential. Returns the name of the policy.
Types ¶
type CreateTokenResponse ¶
type CreateTokenResponse struct { Auth struct { Client_Token string } }
CreateTokenResponse parses the json response from running `vault token create`
Click to show internal directories.
Click to hide internal directories.