rbac

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RBAC

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

RBAC contains all the scoping rules for services across the platform.

func New

func New(client client.Client, namespace string) *RBAC

New creates a new RBAC client.

func (*RBAC) GetACL added in v0.1.23

func (r *RBAC) GetACL(ctx context.Context, permissions *rbac.Permissions, organization string) (*rbac.ACL, error)

GetACL returns a granualr set of permissions for a user based on their scope. This is used for API leval access control and UX.

func (*RBAC) UserExists

func (r *RBAC) UserExists(ctx context.Context, email string) (bool, error)

UserExists is an optimized version of the permissions builder that is used to authorize authentication requests. Failure here means the user need to signup and register themselves with an organization uing a back-channel.

func (*RBAC) UserPermissions added in v0.1.14

func (r *RBAC) UserPermissions(ctx context.Context, email string) (*rbac.Permissions, error)

UserPermissions builds up a hierarchy of permissions for a user, this is used both internally and given out to resource servers via token introspection.

Jump to

Keyboard shortcuts

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