rbac

package
v1.38.13 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: BSD-3-Clause Imports: 15 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(authZ *rbac.Manager, authNconfig config.Authentication, logger logrus.FieldLogger) *Manager

func (*Manager) AddRolesForUser

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

func (*Manager) DeleteRoles

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

func (*Manager) GetRoles

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

func (*Manager) GetRolesForUserOrGroup added in v1.32.5

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

func (*Manager) GetUsersForRole

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

func (*Manager) GetUsersOrGroupsWithRoles added in v1.32.5

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

func (*Manager) HasPermission

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

func (*Manager) RemovePermissions

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

func (*Manager) Restore added in v1.28.13

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

func (*Manager) RestoreFromBackup added in v1.38.12

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

RestoreFromBackup replaces every role with the ones from the backup. Not to be confused with Restore, which loads roles when a node starts up.

func (*Manager) RevokeRolesForUser

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

func (*Manager) Snapshot added in v1.28.13

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

func (*Manager) UpsertRolesPermissions

func (m *Manager) UpsertRolesPermissions(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 roles without changing anything. If this cluster uses namespaces, every namespace the roles 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