dbplugin

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: MPL-2.0 Imports: 22 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPluginShutdown          = errors.New("plugin shutdown")
	ErrPluginStaticUnsupported = errors.New("database plugin does not support Static Accounts")
)

Functions

func RegisterDatabaseServer

func RegisterDatabaseServer(s *grpc.Server, srv DatabaseServer)

func Serve

func Serve(db Database, tlsProvider func() (*tls.Config, error))

Serve is called from within a plugin and wraps the provided Database implementation in a databasePluginRPCServer object and starts a RPC server.

func ServeConfig

func ServeConfig(db Database, tlsProvider func() (*tls.Config, error)) *plugin.ServeConfig

Types

type CreateUserRequest

type CreateUserRequest struct {
	Statements           *Statements          `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"`
	UsernameConfig       *UsernameConfig      `protobuf:"bytes,2,opt,name=username_config,json=usernameConfig,proto3" json:"username_config,omitempty"`
	Expiration           *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*CreateUserRequest) Descriptor

func (*CreateUserRequest) Descriptor() ([]byte, []int)

func (*CreateUserRequest) GetExpiration

func (m *CreateUserRequest) GetExpiration() *timestamp.Timestamp

func (*CreateUserRequest) GetStatements

func (m *CreateUserRequest) GetStatements() *Statements

func (*CreateUserRequest) GetUsernameConfig

func (m *CreateUserRequest) GetUsernameConfig() *UsernameConfig

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) Reset

func (m *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (m *CreateUserRequest) String() string

func (*CreateUserRequest) XXX_DiscardUnknown

func (m *CreateUserRequest) XXX_DiscardUnknown()

func (*CreateUserRequest) XXX_Marshal

func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateUserRequest) XXX_Merge

func (m *CreateUserRequest) XXX_Merge(src proto.Message)

func (*CreateUserRequest) XXX_Size

func (m *CreateUserRequest) XXX_Size() int

func (*CreateUserRequest) XXX_Unmarshal

func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error

type CreateUserResponse

type CreateUserResponse struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateUserResponse) Descriptor

func (*CreateUserResponse) Descriptor() ([]byte, []int)

func (*CreateUserResponse) GetPassword

func (m *CreateUserResponse) GetPassword() string

func (*CreateUserResponse) GetUsername

func (m *CreateUserResponse) GetUsername() string

func (*CreateUserResponse) ProtoMessage

func (*CreateUserResponse) ProtoMessage()

func (*CreateUserResponse) Reset

func (m *CreateUserResponse) Reset()

func (*CreateUserResponse) String

func (m *CreateUserResponse) String() string

func (*CreateUserResponse) XXX_DiscardUnknown

func (m *CreateUserResponse) XXX_DiscardUnknown()

func (*CreateUserResponse) XXX_Marshal

func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateUserResponse) XXX_Merge

func (m *CreateUserResponse) XXX_Merge(src proto.Message)

func (*CreateUserResponse) XXX_Size

func (m *CreateUserResponse) XXX_Size() int

func (*CreateUserResponse) XXX_Unmarshal

func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error

type Database

type Database interface {
	// Type returns the TypeName for the particular database backend
	// implementation. This type name is usually set as a constant within the
	// database backend implementation, e.g. "mysql" for the MySQL database
	// backend.
	Type() (string, error)

	// CreateUser is called on `$ vault read database/creds/:role-name` and it's
	// also the first time anything is touched from `$ vault write
	// database/roles/:role-name`. This is likely to be the highest-throughput
	// method for most plugins.
	CreateUser(ctx context.Context, statements Statements, usernameConfig UsernameConfig, expiration time.Time) (username string, password string, err error)

	// RenewUser is triggered by a renewal call to the API. In many database
	// backends, this triggers a call on the underlying database that extends a
	// VALID UNTIL clause on a user. However, if no such need exists, setting
	// this as a NO-OP means that when renewal is called, the lease renewal time
	// is pushed further out as appropriate, thus pushing out the time until the
	// RevokeUser method is called.
	RenewUser(ctx context.Context, statements Statements, username string, expiration time.Time) error

	// RevokeUser is triggered either automatically by a lease expiration, or by
	// a revocation call to the API.
	RevokeUser(ctx context.Context, statements Statements, username string) error

	// RotateRootCredentials is triggered by a root credential rotation call to
	// the API.
	RotateRootCredentials(ctx context.Context, statements []string) (config map[string]interface{}, err error)

	// GenerateCredentials returns a generated password for the plugin. This is
	// used in combination with SetCredentials to set a specific password for a
	// database user and preserve the password in WAL entries.
	GenerateCredentials(ctx context.Context) (string, error)

	// SetCredentials uses provided information to create or set the credentials
	// for a database user. Unlike CreateUser, this method requires both a
	// username and a password given instead of generating them. 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.
	SetCredentials(ctx context.Context, statements Statements, staticConfig StaticUserConfig) (username string, password string, err error)

	// Init is called on `$ vault write database/config/:db-name`, or when you
	// do a creds call after Vault's been restarted. The config provided won't
	// hold all the keys and values provided in the API call, some will be
	// stripped by the database engine before the config is provided. The config
	// returned will be stored, which will persist it across shutdowns.
	Init(ctx context.Context, config map[string]interface{}, verifyConnection bool) (saveConfig map[string]interface{}, err error)

	// Close attempts to close the underlying database connection that was
	// established by the backend.
	Close() error

	// DEPRECATED: Will be removed in a future plugin version bump.
	// Initialize is a backwards-compatible implementation that simply calls
	// Init, dropping the saveConfig, and returning the err.
	Initialize(ctx context.Context, config map[string]interface{}, verifyConnection bool) (err error)
}

Database is the interface that all database objects must implement.

func NewPluginClient

func NewPluginClient(ctx context.Context, sys pluginutil.RunnerUtil, pluginRunner *pluginutil.PluginRunner, logger log.Logger, isMetadataMode bool) (Database, error)

NewPluginClient returns a databaseRPCClient with a connection to a running plugin. The client is wrapped in a DatabasePluginClient object to ensure the plugin is killed on call of Close().

func PluginFactory

func PluginFactory(ctx context.Context, pluginName string, sys pluginutil.LookRunnerUtil, logger log.Logger) (Database, error)

PluginFactory is used to build plugin database types. It wraps the database object in a logging and metrics middleware.

type DatabaseClient

type DatabaseClient interface {
	Type(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TypeResponse, error)
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
	RenewUser(ctx context.Context, in *RenewUserRequest, opts ...grpc.CallOption) (*Empty, error)
	RevokeUser(ctx context.Context, in *RevokeUserRequest, opts ...grpc.CallOption) (*Empty, error)
	RotateRootCredentials(ctx context.Context, in *RotateRootCredentialsRequest, opts ...grpc.CallOption) (*RotateRootCredentialsResponse, error)
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
	Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	SetCredentials(ctx context.Context, in *SetCredentialsRequest, opts ...grpc.CallOption) (*SetCredentialsResponse, error)
	GenerateCredentials(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateCredentialsResponse, error)
	Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*Empty, error)
}

DatabaseClient is the client API for Database service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDatabaseClient

func NewDatabaseClient(cc *grpc.ClientConn) DatabaseClient

type DatabaseErrorSanitizerMiddleware

type DatabaseErrorSanitizerMiddleware struct {
	// contains filtered or unexported fields
}

DatabaseErrorSanitizerMiddleware wraps an implementation of Databases and sanitizes returned error messages

func NewDatabaseErrorSanitizerMiddleware

func NewDatabaseErrorSanitizerMiddleware(next Database, secretsFn func() map[string]interface{}) *DatabaseErrorSanitizerMiddleware

func (*DatabaseErrorSanitizerMiddleware) Close

func (mw *DatabaseErrorSanitizerMiddleware) Close() (err error)

func (*DatabaseErrorSanitizerMiddleware) CreateUser

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

func (*DatabaseErrorSanitizerMiddleware) GenerateCredentials added in v0.1.12

func (mw *DatabaseErrorSanitizerMiddleware) GenerateCredentials(ctx context.Context) (password string, err error)

func (*DatabaseErrorSanitizerMiddleware) Init

func (mw *DatabaseErrorSanitizerMiddleware) Init(ctx context.Context, conf map[string]interface{}, verifyConnection bool) (saveConf map[string]interface{}, err error)

func (*DatabaseErrorSanitizerMiddleware) Initialize

func (mw *DatabaseErrorSanitizerMiddleware) Initialize(ctx context.Context, conf map[string]interface{}, verifyConnection bool) error

func (*DatabaseErrorSanitizerMiddleware) RenewUser

func (mw *DatabaseErrorSanitizerMiddleware) RenewUser(ctx context.Context, statements Statements, username string, expiration time.Time) (err error)

func (*DatabaseErrorSanitizerMiddleware) RevokeUser

func (mw *DatabaseErrorSanitizerMiddleware) RevokeUser(ctx context.Context, statements Statements, username string) (err error)

func (*DatabaseErrorSanitizerMiddleware) RotateRootCredentials

func (mw *DatabaseErrorSanitizerMiddleware) RotateRootCredentials(ctx context.Context, statements []string) (conf map[string]interface{}, err error)

func (*DatabaseErrorSanitizerMiddleware) SetCredentials added in v0.1.12

func (mw *DatabaseErrorSanitizerMiddleware) SetCredentials(ctx context.Context, statements Statements, staticConfig StaticUserConfig) (username, password string, err error)

func (*DatabaseErrorSanitizerMiddleware) Type

type DatabasePluginClient

type DatabasePluginClient struct {
	sync.Mutex

	Database
	// contains filtered or unexported fields
}

DatabasePluginClient embeds a databasePluginRPCClient and wraps it's Close method to also call Kill() on the plugin.Client.

func (*DatabasePluginClient) Close

func (dc *DatabasePluginClient) Close() error

This wraps the Close call and ensures we both close the database connection and kill the plugin.

type DatabaseServer

DatabaseServer is the server API for Database service.

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type GRPCDatabasePlugin

type GRPCDatabasePlugin struct {
	Impl Database

	// Embeding this will disable the netRPC protocol
	plugin.NetRPCUnsupportedPlugin
}

GRPCDatabasePlugin is the plugin.Plugin implementation that only supports GRPC transport

func (GRPCDatabasePlugin) GRPCClient

func (GRPCDatabasePlugin) GRPCClient(doneCtx context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (GRPCDatabasePlugin) GRPCServer

func (d GRPCDatabasePlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

type GenerateCredentialsResponse added in v0.1.12

type GenerateCredentialsResponse struct {
	Password             string   `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GenerateCredentialsResponse) Descriptor added in v0.1.12

func (*GenerateCredentialsResponse) Descriptor() ([]byte, []int)

func (*GenerateCredentialsResponse) GetPassword added in v0.1.12

func (m *GenerateCredentialsResponse) GetPassword() string

func (*GenerateCredentialsResponse) ProtoMessage added in v0.1.12

func (*GenerateCredentialsResponse) ProtoMessage()

func (*GenerateCredentialsResponse) Reset added in v0.1.12

func (m *GenerateCredentialsResponse) Reset()

func (*GenerateCredentialsResponse) String added in v0.1.12

func (m *GenerateCredentialsResponse) String() string

func (*GenerateCredentialsResponse) XXX_DiscardUnknown added in v0.1.12

func (m *GenerateCredentialsResponse) XXX_DiscardUnknown()

func (*GenerateCredentialsResponse) XXX_Marshal added in v0.1.12

func (m *GenerateCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenerateCredentialsResponse) XXX_Merge added in v0.1.12

func (m *GenerateCredentialsResponse) XXX_Merge(src proto.Message)

func (*GenerateCredentialsResponse) XXX_Size added in v0.1.12

func (m *GenerateCredentialsResponse) XXX_Size() int

func (*GenerateCredentialsResponse) XXX_Unmarshal added in v0.1.12

func (m *GenerateCredentialsResponse) XXX_Unmarshal(b []byte) error

type InitRequest

type InitRequest struct {
	Config               []byte   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	VerifyConnection     bool     `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InitRequest) Descriptor

func (*InitRequest) Descriptor() ([]byte, []int)

func (*InitRequest) GetConfig

func (m *InitRequest) GetConfig() []byte

func (*InitRequest) GetVerifyConnection

func (m *InitRequest) GetVerifyConnection() bool

func (*InitRequest) ProtoMessage

func (*InitRequest) ProtoMessage()

func (*InitRequest) Reset

func (m *InitRequest) Reset()

func (*InitRequest) String

func (m *InitRequest) String() string

func (*InitRequest) XXX_DiscardUnknown

func (m *InitRequest) XXX_DiscardUnknown()

func (*InitRequest) XXX_Marshal

func (m *InitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InitRequest) XXX_Merge

func (m *InitRequest) XXX_Merge(src proto.Message)

func (*InitRequest) XXX_Size

func (m *InitRequest) XXX_Size() int

func (*InitRequest) XXX_Unmarshal

func (m *InitRequest) XXX_Unmarshal(b []byte) error

type InitResponse

type InitResponse struct {
	Config               []byte   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InitResponse) Descriptor

func (*InitResponse) Descriptor() ([]byte, []int)

func (*InitResponse) GetConfig

func (m *InitResponse) GetConfig() []byte

func (*InitResponse) ProtoMessage

func (*InitResponse) ProtoMessage()

func (*InitResponse) Reset

func (m *InitResponse) Reset()

func (*InitResponse) String

func (m *InitResponse) String() string

func (*InitResponse) XXX_DiscardUnknown

func (m *InitResponse) XXX_DiscardUnknown()

func (*InitResponse) XXX_Marshal

func (m *InitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InitResponse) XXX_Merge

func (m *InitResponse) XXX_Merge(src proto.Message)

func (*InitResponse) XXX_Size

func (m *InitResponse) XXX_Size() int

func (*InitResponse) XXX_Unmarshal

func (m *InitResponse) XXX_Unmarshal(b []byte) error

type InitializeRequest deprecated

type InitializeRequest struct {
	Config               []byte   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	VerifyConnection     bool     `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Deprecated: Do not use.

func (*InitializeRequest) Descriptor

func (*InitializeRequest) Descriptor() ([]byte, []int)

func (*InitializeRequest) GetConfig

func (m *InitializeRequest) GetConfig() []byte

func (*InitializeRequest) GetVerifyConnection

func (m *InitializeRequest) GetVerifyConnection() bool

func (*InitializeRequest) ProtoMessage

func (*InitializeRequest) ProtoMessage()

func (*InitializeRequest) Reset

func (m *InitializeRequest) Reset()

func (*InitializeRequest) String

func (m *InitializeRequest) String() string

func (*InitializeRequest) XXX_DiscardUnknown

func (m *InitializeRequest) XXX_DiscardUnknown()

func (*InitializeRequest) XXX_Marshal

func (m *InitializeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InitializeRequest) XXX_Merge

func (m *InitializeRequest) XXX_Merge(src proto.Message)

func (*InitializeRequest) XXX_Size

func (m *InitializeRequest) XXX_Size() int

func (*InitializeRequest) XXX_Unmarshal

func (m *InitializeRequest) XXX_Unmarshal(b []byte) error

type RenewUserRequest

type RenewUserRequest struct {
	Statements           *Statements          `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"`
	Username             string               `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Expiration           *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*RenewUserRequest) Descriptor

func (*RenewUserRequest) Descriptor() ([]byte, []int)

func (*RenewUserRequest) GetExpiration

func (m *RenewUserRequest) GetExpiration() *timestamp.Timestamp

func (*RenewUserRequest) GetStatements

func (m *RenewUserRequest) GetStatements() *Statements

func (*RenewUserRequest) GetUsername

func (m *RenewUserRequest) GetUsername() string

func (*RenewUserRequest) ProtoMessage

func (*RenewUserRequest) ProtoMessage()

func (*RenewUserRequest) Reset

func (m *RenewUserRequest) Reset()

func (*RenewUserRequest) String

func (m *RenewUserRequest) String() string

func (*RenewUserRequest) XXX_DiscardUnknown

func (m *RenewUserRequest) XXX_DiscardUnknown()

func (*RenewUserRequest) XXX_Marshal

func (m *RenewUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RenewUserRequest) XXX_Merge

func (m *RenewUserRequest) XXX_Merge(src proto.Message)

func (*RenewUserRequest) XXX_Size

func (m *RenewUserRequest) XXX_Size() int

func (*RenewUserRequest) XXX_Unmarshal

func (m *RenewUserRequest) XXX_Unmarshal(b []byte) error

type RevokeUserRequest

type RevokeUserRequest struct {
	Statements           *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"`
	Username             string      `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*RevokeUserRequest) Descriptor

func (*RevokeUserRequest) Descriptor() ([]byte, []int)

func (*RevokeUserRequest) GetStatements

func (m *RevokeUserRequest) GetStatements() *Statements

func (*RevokeUserRequest) GetUsername

func (m *RevokeUserRequest) GetUsername() string

func (*RevokeUserRequest) ProtoMessage

func (*RevokeUserRequest) ProtoMessage()

func (*RevokeUserRequest) Reset

func (m *RevokeUserRequest) Reset()

func (*RevokeUserRequest) String

func (m *RevokeUserRequest) String() string

func (*RevokeUserRequest) XXX_DiscardUnknown

func (m *RevokeUserRequest) XXX_DiscardUnknown()

func (*RevokeUserRequest) XXX_Marshal

func (m *RevokeUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RevokeUserRequest) XXX_Merge

func (m *RevokeUserRequest) XXX_Merge(src proto.Message)

func (*RevokeUserRequest) XXX_Size

func (m *RevokeUserRequest) XXX_Size() int

func (*RevokeUserRequest) XXX_Unmarshal

func (m *RevokeUserRequest) XXX_Unmarshal(b []byte) error

type RotateRootCredentialsRequest

type RotateRootCredentialsRequest struct {
	Statements           []string `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RotateRootCredentialsRequest) Descriptor

func (*RotateRootCredentialsRequest) Descriptor() ([]byte, []int)

func (*RotateRootCredentialsRequest) GetStatements

func (m *RotateRootCredentialsRequest) GetStatements() []string

func (*RotateRootCredentialsRequest) ProtoMessage

func (*RotateRootCredentialsRequest) ProtoMessage()

func (*RotateRootCredentialsRequest) Reset

func (m *RotateRootCredentialsRequest) Reset()

func (*RotateRootCredentialsRequest) String

func (*RotateRootCredentialsRequest) XXX_DiscardUnknown

func (m *RotateRootCredentialsRequest) XXX_DiscardUnknown()

func (*RotateRootCredentialsRequest) XXX_Marshal

func (m *RotateRootCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RotateRootCredentialsRequest) XXX_Merge

func (m *RotateRootCredentialsRequest) XXX_Merge(src proto.Message)

func (*RotateRootCredentialsRequest) XXX_Size

func (m *RotateRootCredentialsRequest) XXX_Size() int

func (*RotateRootCredentialsRequest) XXX_Unmarshal

func (m *RotateRootCredentialsRequest) XXX_Unmarshal(b []byte) error

type RotateRootCredentialsResponse

type RotateRootCredentialsResponse struct {
	Config               []byte   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RotateRootCredentialsResponse) Descriptor

func (*RotateRootCredentialsResponse) Descriptor() ([]byte, []int)

func (*RotateRootCredentialsResponse) GetConfig

func (m *RotateRootCredentialsResponse) GetConfig() []byte

func (*RotateRootCredentialsResponse) ProtoMessage

func (*RotateRootCredentialsResponse) ProtoMessage()

func (*RotateRootCredentialsResponse) Reset

func (m *RotateRootCredentialsResponse) Reset()

func (*RotateRootCredentialsResponse) String

func (*RotateRootCredentialsResponse) XXX_DiscardUnknown

func (m *RotateRootCredentialsResponse) XXX_DiscardUnknown()

func (*RotateRootCredentialsResponse) XXX_Marshal

func (m *RotateRootCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RotateRootCredentialsResponse) XXX_Merge

func (m *RotateRootCredentialsResponse) XXX_Merge(src proto.Message)

func (*RotateRootCredentialsResponse) XXX_Size

func (m *RotateRootCredentialsResponse) XXX_Size() int

func (*RotateRootCredentialsResponse) XXX_Unmarshal

func (m *RotateRootCredentialsResponse) XXX_Unmarshal(b []byte) error

type SetCredentialsRequest added in v0.1.12

type SetCredentialsRequest struct {
	Statements           *Statements       `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"`
	StaticUserConfig     *StaticUserConfig `protobuf:"bytes,2,opt,name=static_user_config,json=staticUserConfig,proto3" json:"static_user_config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*SetCredentialsRequest) Descriptor added in v0.1.12

func (*SetCredentialsRequest) Descriptor() ([]byte, []int)

func (*SetCredentialsRequest) GetStatements added in v0.1.12

func (m *SetCredentialsRequest) GetStatements() *Statements

func (*SetCredentialsRequest) GetStaticUserConfig added in v0.1.12

func (m *SetCredentialsRequest) GetStaticUserConfig() *StaticUserConfig

func (*SetCredentialsRequest) ProtoMessage added in v0.1.12

func (*SetCredentialsRequest) ProtoMessage()

func (*SetCredentialsRequest) Reset added in v0.1.12

func (m *SetCredentialsRequest) Reset()

func (*SetCredentialsRequest) String added in v0.1.12

func (m *SetCredentialsRequest) String() string

func (*SetCredentialsRequest) XXX_DiscardUnknown added in v0.1.12

func (m *SetCredentialsRequest) XXX_DiscardUnknown()

func (*SetCredentialsRequest) XXX_Marshal added in v0.1.12

func (m *SetCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetCredentialsRequest) XXX_Merge added in v0.1.12

func (m *SetCredentialsRequest) XXX_Merge(src proto.Message)

func (*SetCredentialsRequest) XXX_Size added in v0.1.12

func (m *SetCredentialsRequest) XXX_Size() int

func (*SetCredentialsRequest) XXX_Unmarshal added in v0.1.12

func (m *SetCredentialsRequest) XXX_Unmarshal(b []byte) error

type SetCredentialsResponse added in v0.1.12

type SetCredentialsResponse struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetCredentialsResponse) Descriptor added in v0.1.12

func (*SetCredentialsResponse) Descriptor() ([]byte, []int)

func (*SetCredentialsResponse) GetPassword added in v0.1.12

func (m *SetCredentialsResponse) GetPassword() string

func (*SetCredentialsResponse) GetUsername added in v0.1.12

func (m *SetCredentialsResponse) GetUsername() string

func (*SetCredentialsResponse) ProtoMessage added in v0.1.12

func (*SetCredentialsResponse) ProtoMessage()

func (*SetCredentialsResponse) Reset added in v0.1.12

func (m *SetCredentialsResponse) Reset()

func (*SetCredentialsResponse) String added in v0.1.12

func (m *SetCredentialsResponse) String() string

func (*SetCredentialsResponse) XXX_DiscardUnknown added in v0.1.12

func (m *SetCredentialsResponse) XXX_DiscardUnknown()

func (*SetCredentialsResponse) XXX_Marshal added in v0.1.12

func (m *SetCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetCredentialsResponse) XXX_Merge added in v0.1.12

func (m *SetCredentialsResponse) XXX_Merge(src proto.Message)

func (*SetCredentialsResponse) XXX_Size added in v0.1.12

func (m *SetCredentialsResponse) XXX_Size() int

func (*SetCredentialsResponse) XXX_Unmarshal added in v0.1.12

func (m *SetCredentialsResponse) XXX_Unmarshal(b []byte) error

type Statements

type Statements struct {
	// DEPRECATED, will be removed in 0.12
	CreationStatements string `protobuf:"bytes,1,opt,name=creation_statements,json=creationStatements,proto3" json:"creation_statements,omitempty"` // Deprecated: Do not use.
	// DEPRECATED, will be removed in 0.12
	RevocationStatements string `protobuf:"bytes,2,opt,name=revocation_statements,json=revocationStatements,proto3" json:"revocation_statements,omitempty"` // Deprecated: Do not use.
	// DEPRECATED, will be removed in 0.12
	RollbackStatements string `protobuf:"bytes,3,opt,name=rollback_statements,json=rollbackStatements,proto3" json:"rollback_statements,omitempty"` // Deprecated: Do not use.
	// DEPRECATED, will be removed in 0.12
	RenewStatements      string   `protobuf:"bytes,4,opt,name=renew_statements,json=renewStatements,proto3" json:"renew_statements,omitempty"` // Deprecated: Do not use.
	Creation             []string `protobuf:"bytes,5,rep,name=creation,proto3" json:"creation,omitempty"`
	Revocation           []string `protobuf:"bytes,6,rep,name=revocation,proto3" json:"revocation,omitempty"`
	Rollback             []string `protobuf:"bytes,7,rep,name=rollback,proto3" json:"rollback,omitempty"`
	Renewal              []string `protobuf:"bytes,8,rep,name=renewal,proto3" json:"renewal,omitempty"`
	Rotation             []string `protobuf:"bytes,9,rep,name=rotation,proto3" json:"rotation,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Statements) Descriptor

func (*Statements) Descriptor() ([]byte, []int)

func (*Statements) GetCreation

func (m *Statements) GetCreation() []string

func (*Statements) GetCreationStatements deprecated

func (m *Statements) GetCreationStatements() string

Deprecated: Do not use.

func (*Statements) GetRenewStatements deprecated

func (m *Statements) GetRenewStatements() string

Deprecated: Do not use.

func (*Statements) GetRenewal

func (m *Statements) GetRenewal() []string

func (*Statements) GetRevocation

func (m *Statements) GetRevocation() []string

func (*Statements) GetRevocationStatements deprecated

func (m *Statements) GetRevocationStatements() string

Deprecated: Do not use.

func (*Statements) GetRollback

func (m *Statements) GetRollback() []string

func (*Statements) GetRollbackStatements deprecated

func (m *Statements) GetRollbackStatements() string

Deprecated: Do not use.

func (*Statements) GetRotation added in v0.1.12

func (m *Statements) GetRotation() []string

func (*Statements) ProtoMessage

func (*Statements) ProtoMessage()

func (*Statements) Reset

func (m *Statements) Reset()

func (*Statements) String

func (m *Statements) String() string

func (*Statements) XXX_DiscardUnknown

func (m *Statements) XXX_DiscardUnknown()

func (*Statements) XXX_Marshal

func (m *Statements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Statements) XXX_Merge

func (m *Statements) XXX_Merge(src proto.Message)

func (*Statements) XXX_Size

func (m *Statements) XXX_Size() int

func (*Statements) XXX_Unmarshal

func (m *Statements) XXX_Unmarshal(b []byte) error

type StaticUserConfig added in v0.1.12

type StaticUserConfig struct {
	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Create               bool     `protobuf:"varint,3,opt,name=create,proto3" json:"create,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StaticUserConfig) Descriptor added in v0.1.12

func (*StaticUserConfig) Descriptor() ([]byte, []int)

func (*StaticUserConfig) GetCreate added in v0.1.12

func (m *StaticUserConfig) GetCreate() bool

func (*StaticUserConfig) GetPassword added in v0.1.12

func (m *StaticUserConfig) GetPassword() string

func (*StaticUserConfig) GetUsername added in v0.1.12

func (m *StaticUserConfig) GetUsername() string

func (*StaticUserConfig) ProtoMessage added in v0.1.12

func (*StaticUserConfig) ProtoMessage()

func (*StaticUserConfig) Reset added in v0.1.12

func (m *StaticUserConfig) Reset()

func (*StaticUserConfig) String added in v0.1.12

func (m *StaticUserConfig) String() string

func (*StaticUserConfig) XXX_DiscardUnknown added in v0.1.12

func (m *StaticUserConfig) XXX_DiscardUnknown()

func (*StaticUserConfig) XXX_Marshal added in v0.1.12

func (m *StaticUserConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StaticUserConfig) XXX_Merge added in v0.1.12

func (m *StaticUserConfig) XXX_Merge(src proto.Message)

func (*StaticUserConfig) XXX_Size added in v0.1.12

func (m *StaticUserConfig) XXX_Size() int

func (*StaticUserConfig) XXX_Unmarshal added in v0.1.12

func (m *StaticUserConfig) XXX_Unmarshal(b []byte) error

type TypeResponse

type TypeResponse struct {
	Type                 string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TypeResponse) Descriptor

func (*TypeResponse) Descriptor() ([]byte, []int)

func (*TypeResponse) GetType

func (m *TypeResponse) GetType() string

func (*TypeResponse) ProtoMessage

func (*TypeResponse) ProtoMessage()

func (*TypeResponse) Reset

func (m *TypeResponse) Reset()

func (*TypeResponse) String

func (m *TypeResponse) String() string

func (*TypeResponse) XXX_DiscardUnknown

func (m *TypeResponse) XXX_DiscardUnknown()

func (*TypeResponse) XXX_Marshal

func (m *TypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TypeResponse) XXX_Merge

func (m *TypeResponse) XXX_Merge(src proto.Message)

func (*TypeResponse) XXX_Size

func (m *TypeResponse) XXX_Size() int

func (*TypeResponse) XXX_Unmarshal

func (m *TypeResponse) XXX_Unmarshal(b []byte) error

type UnimplementedDatabaseServer

type UnimplementedDatabaseServer struct {
}

UnimplementedDatabaseServer can be embedded to have forward compatible implementations.

func (*UnimplementedDatabaseServer) Close

func (*UnimplementedDatabaseServer) CreateUser

func (*UnimplementedDatabaseServer) GenerateCredentials added in v0.1.12

func (*UnimplementedDatabaseServer) Init

func (*UnimplementedDatabaseServer) Initialize

func (*UnimplementedDatabaseServer) RenewUser

func (*UnimplementedDatabaseServer) RevokeUser

func (*UnimplementedDatabaseServer) RotateRootCredentials

func (*UnimplementedDatabaseServer) SetCredentials added in v0.1.12

func (*UnimplementedDatabaseServer) Type

type UsernameConfig

type UsernameConfig struct {
	DisplayName          string   `protobuf:"bytes,1,opt,name=DisplayName,proto3" json:"DisplayName,omitempty"`
	RoleName             string   `protobuf:"bytes,2,opt,name=RoleName,proto3" json:"RoleName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UsernameConfig) Descriptor

func (*UsernameConfig) Descriptor() ([]byte, []int)

func (*UsernameConfig) GetDisplayName

func (m *UsernameConfig) GetDisplayName() string

func (*UsernameConfig) GetRoleName

func (m *UsernameConfig) GetRoleName() string

func (*UsernameConfig) ProtoMessage

func (*UsernameConfig) ProtoMessage()

func (*UsernameConfig) Reset

func (m *UsernameConfig) Reset()

func (*UsernameConfig) String

func (m *UsernameConfig) String() string

func (*UsernameConfig) XXX_DiscardUnknown

func (m *UsernameConfig) XXX_DiscardUnknown()

func (*UsernameConfig) XXX_Marshal

func (m *UsernameConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UsernameConfig) XXX_Merge

func (m *UsernameConfig) XXX_Merge(src proto.Message)

func (*UsernameConfig) XXX_Size

func (m *UsernameConfig) XXX_Size() int

func (*UsernameConfig) XXX_Unmarshal

func (m *UsernameConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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