Versions in this module Expand all Collapse all v1 v1.0.0 Jul 30, 2024 Changes in this version + const AuthTypeHeader + const Consul + const CreatePolicyPath + const CreateTokenAPI + const GenerateConsulTokenAPI + const HealthAPI + const InitAPI + const KeyValue + const ListAccessorsAPI + const LookupAccessorAPI + const LookupSelfAPI + const MountsAPI + const NamespaceHeader + const RevokeAccessorAPI + const RevokeSelfAPI + const RootTokenControlAPI + const RootTokenRetrievalAPI + const UnsealAPI + const UsernamePasswordAuthMethod + func GetMockTokenServer(tokenDataMap *sync.Map) *httptest.Server + type Accessor struct + Accessor string + type Client struct + Config types.SecretConfig + HttpCaller pkg.Caller + func NewClient(config types.SecretConfig, requester pkg.Caller, forSecrets bool, ...) (*Client, error) + func NewSecretsClient(ctx context.Context, config types.SecretConfig, lc logger.LoggingClient, ...) (*Client, error) + func (c *Client) BindUserToIdentity(token string, identityId string, authHandle string, username string) error + func (c *Client) CheckAuthMethodEnabled(token string, mountPoint string, authType string) (bool, error) + func (c *Client) CheckIdentityKeyExists(token string, keyName string) (bool, error) + func (c *Client) CheckSecretEngineInstalled(token string, mountPoint string, engine string) (bool, error) + func (c *Client) ConfigureConsulAccess(secretStoreToken string, bootstrapACLToken string, consulHost string, ...) error + func (c *Client) CreateNamedIdentityKey(token string, keyName string, algorithm string) error + func (c *Client) CreateOrUpdateIdentity(secretStoreToken string, name string, metadata map[string]string, ...) (string, error) + func (c *Client) CreateOrUpdateIdentityRole(token string, roleName string, keyName string, template string, ...) error + func (c *Client) CreateOrUpdateUser(token string, mountPoint string, username string, password string, ...) error + func (c *Client) CreateRole(secretStoreToken string, consulRole types.ConsulRole) error + func (c *Client) CreateToken(token string, parameters map[string]interface{}) (map[string]interface{}, error) + func (c *Client) DeleteIdentity(secretStoreToken string, name string) error + func (c *Client) DeleteUser(token string, mountPoint string, username string) error + func (c *Client) EnableConsulSecretEngine(token string, mountPoint string, defaultLeaseTTL string) error + func (c *Client) EnableKVSecretEngine(token string, mountPoint string, kvVersion string) error + func (c *Client) EnablePasswordAuth(token string, mountPoint string) error + func (c *Client) GenerateConsulToken(serviceKey string) (string, error) + func (c *Client) GetSecret(secretName string, keys ...string) (map[string]string, error) + func (c *Client) GetSecretNames() ([]string, error) + func (c *Client) GetSelfJWT(serviceKey string) (string, error) + func (c *Client) HealthCheck() (int, error) + func (c *Client) Init(secretThreshold int, secretShares int) (types.InitResponse, error) + func (c *Client) InstallPolicy(token string, policyName string, policyDocument string) error + func (c *Client) InternalServiceLogin(token string, authEngine string, username string, password string) (map[string]interface{}, error) + func (c *Client) IsJWTValid(jwt string) (bool, error) + func (c *Client) ListTokenAccessors(token string) ([]string, error) + func (c *Client) LookupAuthHandle(token string, mountPoint string) (string, error) + func (c *Client) LookupIdentity(secretStoreToken string, name string) (string, error) + func (c *Client) LookupToken(token string) (types.TokenMetadata, error) + func (c *Client) LookupTokenAccessor(token string, accessor string) (types.TokenMetadata, error) + func (c *Client) RegenRootToken(keys []string) (string, error) + func (c *Client) RevokeToken(token string) error + func (c *Client) RevokeTokenAccessor(token string, accessor string) error + func (c *Client) SetAuthToken(ctx context.Context, newToken string) error + func (c *Client) StoreSecret(secretName string, secrets map[string]string) error + func (c *Client) Unseal(keysBase64 []string) error + type CreateEntityAliasRequest struct + CanonicalID string + MountAccessor string + Name string + type CreateNamedKeyRequest struct + Algorithm string + AllowedClientIDs []string + type CreateOrUpdateIdentityRoleRequest struct + ClientID string + Key string + Template *string + TokenTTL string + type CreateOrUpdateUserRequest struct + Password string + TokenPeriod string + TokenPolicies []string + type CreateOrUpdateUserResponse struct + Data JsonID + type CreateUpdateEntityRequest struct + Metadata map[string]string + Policies []string + type CreateUpdateEntityResponse struct + Data JsonID + type EnableAuthMethodRequest struct + Type string + type EnableSecretsEngineRequest struct + Config *SecretsEngineConfig + Description string + Options *SecretsEngineOptions + Type string + type ErrCaRootCert struct + func (e ErrCaRootCert) Error() string + type ErrHTTPResponse struct + ErrMsg string + StatusCode int + func (err ErrHTTPResponse) Error() string + type InitRequest struct + SecretShares int + SecretThreshold int + type JsonID struct + ID string + type ListAuthMethodsResponse struct + Data map[string]Accessor + type ListNamedKeysResponse struct + Data struct{ ... } + type ListSecretEnginesResponse struct + Data map[string]struct{ ... } + type ListTokenAccessorsResponse struct + Data struct{ ... } + type LookupAccessorRequest struct + Accessor string + type ReadEntityByNameResponse struct + Data JsonID + type RequestArgs struct + AuthToken string + BodyReader io.Reader + ExpectedStatusCode int + JSONObject interface{} + Method string + OperationDescription string + Path string + ResponseObject interface{} + type RevokeTokenAccessorRequest struct + Accessor string + type RootTokenControlResponse struct + Complete bool + Nonce string + Otp string + type RootTokenRetrievalRequest struct + Key string + Nonce string + type RootTokenRetrievalResponse struct + Complete bool + EncodedToken string + type SecretsEngineConfig struct + DefaultLeaseTTLDuration string + type SecretsEngineOptions struct + Version string + type TokenLookupResponse struct + Data types.TokenMetadata + type UnsealRequest struct + Key string + Reset bool + type UnsealResponse struct + N int + Progress int + Sealed bool + T int + type UpdateACLPolicyRequest struct + Policy string + type UserPassLoginRequest struct + Password string