couchbase

package module
v0.0.0-...-3ff937f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

README

vault-plugin-database-couchbase

An attempt to write a vault plugin to manage couchbase username / passwords

More to follow

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (interface{}, error)

New implements builtinplugins.BuiltinFactory

func Run

func Run(apiTLSConfig *api.TLSConfig) error

Run instantiates a CouchbaseDB object, and runs the RPC server for the plugin

Types

type CouchbaseDB

type CouchbaseDB struct {
	credsutil.CredentialsProducer
	// contains filtered or unexported fields
}

func (CouchbaseDB) Close

func (c CouchbaseDB) Close() error

func (CouchbaseDB) Connection

func (c CouchbaseDB) Connection(_ context.Context) (interface{}, error)

func (*CouchbaseDB) CreateUser

func (c *CouchbaseDB) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, expiration time.Time) (username string, password string, err error)

func (CouchbaseDB) Init

func (c CouchbaseDB) Init(ctx context.Context, config map[string]interface{}, verifyConnection bool) (saveConfig map[string]interface{}, err error)

func (CouchbaseDB) Initialize

func (c CouchbaseDB) Initialize(ctx context.Context, config map[string]interface{}, verifyConnection bool) error

func (*CouchbaseDB) RenewUser

func (p *CouchbaseDB) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, expiration time.Time) error

RenewUser is not supported by Couchbase, so this is a no-op.

func (*CouchbaseDB) RevokeUser

func (p *CouchbaseDB) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error

func (*CouchbaseDB) RotateRootCredentials

func (c *CouchbaseDB) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)

func (*CouchbaseDB) SetCredentials

func (c *CouchbaseDB) 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.

func (*CouchbaseDB) Type

func (c *CouchbaseDB) Type() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL