authz

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthStatusCode

func AuthStatusCode(ctx context.Context) int

func CheckAccess

func CheckAccess(recordResources []string, userResources []string) bool

CheckAccess verifies if a user has access to a record based on RBAC resources. A record is accessible if: 1. It has NO required resources (public). 2. OR the user has at least one of the resources listed on the record.

func GetUserAuthz

func GetUserAuthz(ctx context.Context) []string

GetUserAuthz returns the list of resources the user is authorized to access. If not found, returns empty list (no access to protected resources).

func GetUserPrivileges

func GetUserPrivileges(ctx context.Context) map[string]map[string]bool

func HasAnyMethodAccess

func HasAnyMethodAccess(ctx context.Context, resources []string, methods ...string) bool

func HasAnyServiceMethodAccess added in v0.3.1

func HasAnyServiceMethodAccess(ctx context.Context, resources []string, service string, methods ...string) bool

func HasAuthHeader

func HasAuthHeader(ctx context.Context) bool

func HasMethodAccess

func HasMethodAccess(ctx context.Context, method string, resources []string) bool

func HasObjectMethodAccess added in v0.2.8

func HasObjectMethodAccess(ctx context.Context, method string, resources []string) bool

func HasScopedBucketAccess

func HasScopedBucketAccess(ctx context.Context, scope models.BucketScope, methods ...string) bool

HasScopedBucketAccess checks if a user has access to a specific bucket based on a project/org scope.

func HasServiceMethodAccess added in v0.3.1

func HasServiceMethodAccess(ctx context.Context, service, method string, resources []string) bool

func IsAuthzEnforced added in v0.2.8

func IsAuthzEnforced(ctx context.Context) bool

func IsGen3Mode

func IsGen3Mode(ctx context.Context) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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