Documentation
¶
Overview ¶
This is a vault database plugin for OpenDistro. It is based on the official elasticsearch plugin. See https://github.com/hashicorp/vault-plugin-database-elasticsearch.
Index ¶
- func New() (interface{}, error)
- func Run(apiTLSConfig *api.TLSConfig) error
- type Opendistro
- func (o *Opendistro) Close() error
- func (o *Opendistro) CreateUser(ctx context.Context, statements dbplugin.Statements, ...) (string, string, error)
- func (o *Opendistro) GenerateCredentials(ctx context.Context) (string, error)
- func (o *Opendistro) Init(ctx context.Context, config map[string]interface{}, verifyConnection bool) (map[string]interface{}, error)
- func (o *Opendistro) Initialize(ctx context.Context, config map[string]interface{}, verifyConnection bool) error
- func (o *Opendistro) RenewUser(_ context.Context, _ dbplugin.Statements, _ string, _ time.Time) error
- func (o *Opendistro) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
- func (o *Opendistro) RotateRootCredentials(ctx context.Context, _ []string) (map[string]interface{}, error)
- func (o *Opendistro) SecretValues() map[string]interface{}
- func (o *Opendistro) SetCredentials(ctx context.Context, statements dbplugin.Statements, ...) (username string, password string, err error)
- func (o *Opendistro) Type() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Opendistro ¶
type Opendistro struct {
// contains filtered or unexported fields
}
func NewOpendistro ¶
func NewOpendistro() *Opendistro
func (*Opendistro) Close ¶
func (o *Opendistro) Close() error
func (*Opendistro) CreateUser ¶
func (o *Opendistro) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, _ time.Time) (string, string, error)
func (*Opendistro) GenerateCredentials ¶
func (o *Opendistro) GenerateCredentials(ctx context.Context) (string, error)
GenerateCredentials returns a generated password
func (*Opendistro) Initialize ¶
func (*Opendistro) RenewUser ¶
func (o *Opendistro) RenewUser(_ context.Context, _ dbplugin.Statements, _ string, _ time.Time) error
func (*Opendistro) RevokeUser ¶
func (o *Opendistro) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error
func (*Opendistro) RotateRootCredentials ¶
func (*Opendistro) SecretValues ¶
func (o *Opendistro) SecretValues() map[string]interface{}
SecretValues is used by some error-sanitizing middleware in Vault that basically replaces the keys in the map with the values given so they're not leaked via error messages.
func (*Opendistro) SetCredentials ¶
func (o *Opendistro) SetCredentials(ctx context.Context, statements dbplugin.Statements, staticConfig dbplugin.StaticUserConfig) (username string, password string, err error)
SetCredentials is used to set the credentials for a database user to a specific username and password. This is not currently supported by the elastic search plugin, but is needed to conform to the dbplugin.Database interface
func (*Opendistro) Type ¶
func (o *Opendistro) Type() (string, error)