Documentation ¶
Overview ¶
Package aerospike implements a Vault database plugin for Aeropike.
Index ¶
- func New() (interface{}, error)
- func Run(apiTLSConfig *api.TLSConfig) error
- type Aerospike
- func (c Aerospike) Close() error
- func (c Aerospike) Connection(ctx context.Context) (interface{}, error)
- func (a *Aerospike) CreateUser(ctx context.Context, statements dbplugin.Statements, ...) (username string, password string, err error)
- func (c Aerospike) Init(ctx context.Context, conf map[string]interface{}, verifyConnection bool) (map[string]interface{}, error)
- func (c Aerospike) Initialize(ctx context.Context, conf map[string]interface{}, verifyConnection bool) error
- func (a *Aerospike) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, ...) error
- func (a *Aerospike) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
- func (a *Aerospike) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)
- func (a *Aerospike) SetCredentials(ctx context.Context, statements dbplugin.Statements, ...) (username, password string, err error)
- func (a *Aerospike) Type() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aerospike ¶
type Aerospike struct { credsutil.CredentialsProducer // contains filtered or unexported fields }
Aerospike is an implementation of Database interface.
func (Aerospike) Connection ¶
Connection creates or returns an existing a database connection. If the session fails on a ping check, the session will be closed and then re-created. This method does not lock the mutex and it is intended that this is the callers responsibility.
func (*Aerospike) CreateUser ¶
func (a *Aerospike) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, expiration time.Time) (username string, password string, err error)
CreateUser generates the username/password on the underlying Aerospike secret backend as instructed by the CreationStatement provided. The creation statement is a JSON blob that has a an array of roles.
JSON Example:
{ roles": ["read", "user-admin"] }
func (Aerospike) Init ¶
func (c Aerospike) Init(ctx context.Context, conf map[string]interface{}, verifyConnection bool) (map[string]interface{}, error)
Initialize parses connection configuration.
func (Aerospike) Initialize ¶
func (*Aerospike) RenewUser ¶
func (a *Aerospike) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, expiration time.Time) error
RenewUser is not supported on Aerospike, so this is a no-op.
func (*Aerospike) RevokeUser ¶
func (a *Aerospike) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
RevokeUser drops the specified user.
func (*Aerospike) RotateRootCredentials ¶
func (a *Aerospike) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)
RotateRootCredentials rotates the initial root database credentials. The new root password will only be known by Vault.
func (*Aerospike) SetCredentials ¶
func (a *Aerospike) SetCredentials(ctx context.Context, statements dbplugin.Statements, staticUser dbplugin.StaticUserConfig) (username, password string, err error)
SetCredentials uses provided information to set/create a user in the database. Unlike CreateUser, this method requires a username be provided and uses the name given, instead of generating a name. This is used for creating and setting the password of static accounts, as well as rolling back passwords in the database in the event an updated database fails to save in Vault's storage.