dynusers

package
v1.38.16 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.New("bad request")

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(dynUser *apikey.DBUser, namespaces usecasesNamespaces.Exister, namespacesEnabled bool, logger logrus.FieldLogger) *Manager

func (*Manager) ActivateUser

func (m *Manager) ActivateUser(c *cmd.ApplyRequest) error

func (*Manager) CheckUserIdentifierExists

func (m *Manager) CheckUserIdentifierExists(req *cmd.QueryRequest) ([]byte, error)

func (*Manager) CreateUser

func (m *Manager) CreateUser(c *cmd.ApplyRequest) error

func (*Manager) CreateUserWithKeyRequest added in v1.30.10

func (m *Manager) CreateUserWithKeyRequest(c *cmd.ApplyRequest) error

func (*Manager) DeleteUser

func (m *Manager) DeleteUser(c *cmd.ApplyRequest) error

func (*Manager) DeleteUsersInNamespace added in v1.38.0

func (m *Manager) DeleteUsersInNamespace(c *cmd.ApplyRequest) error

func (*Manager) ExportUsers added in v1.38.13

func (m *Manager) ExportUsers(req *cmd.QueryRequest) ([]byte, error)

func (*Manager) GetUsers

func (m *Manager) GetUsers(req *cmd.QueryRequest) ([]byte, error)

func (*Manager) Restore added in v1.30.7

func (m *Manager) Restore(snapshot []byte) error

func (*Manager) RestoreFromBackup added in v1.38.12

func (m *Manager) RestoreFromBackup(req *cmd.RestoreRolesAndUsersRequest) error

RestoreFromBackup replaces every user with the ones from the backup and saves them to disk. Not to be confused with Restore, which loads users when a node starts up. Restore must not write to disk, because a failed write would stop the node from starting.

func (*Manager) RotateKey

func (m *Manager) RotateKey(c *cmd.ApplyRequest) error

func (*Manager) Snapshot added in v1.30.7

func (m *Manager) Snapshot() ([]byte, error)

func (*Manager) SuspendUser

func (m *Manager) SuspendUser(c *cmd.ApplyRequest) error

func (*Manager) ValidateBackupSnapshot added in v1.38.12

func (m *Manager) ValidateBackupSnapshot(req *cmd.RestoreRolesAndUsersRequest, ns usecasesNamespaces.Exister) error

ValidateBackupSnapshot checks the backup's users without changing anything. If this cluster uses namespaces, every namespace the users name must exist and not be deleting. Suspended and resuming namespaces are accepted because they keep their rows, so restoring those rows is legal and must not block a cluster-wide restore.

Jump to

Keyboard shortcuts

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