acl

package
v0.0.0-...-9b598c7 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptedOrganisations

type AcceptedOrganisations []string

func (AcceptedOrganisations) IsOrganisationAccepted

func (acceptedOrganisations AcceptedOrganisations) IsOrganisationAccepted(orgId string) bool

type AccessControlListConfig

type AccessControlListConfig struct {
	DenyList             DeniedUsers
	AccessList           AcceptedOrganisations
	DenyListConfigFile   string
	AccessListConfigFile string
	EnableDenyList       bool
	EnableAccessList     bool
}

func NewAccessControlListConfig

func NewAccessControlListConfig() *AccessControlListConfig

func (*AccessControlListConfig) AddFlags

func (c *AccessControlListConfig) AddFlags(fs *pflag.FlagSet)

func (*AccessControlListConfig) ReadFiles

func (c *AccessControlListConfig) ReadFiles() (err error)

type AccessControlListMiddleware

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

func NewAccessControlListMiddleware

func NewAccessControlListMiddleware(accessControlListConfig *AccessControlListConfig) *AccessControlListMiddleware

func (*AccessControlListMiddleware) Authorize

func (middleware *AccessControlListMiddleware) Authorize(next http.Handler) http.Handler

Middleware handler to authorize users based on the provided ACL configuration

type DeniedUsers

type DeniedUsers []string

func (DeniedUsers) IsUserDenied

func (deniedAccounts DeniedUsers) IsUserDenied(username string) bool

Jump to

Keyboard shortcuts

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