acl

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// const for ldap configuration
	ConsoleLDAPEnabled = "CONSOLE_LDAP_ENABLED"
)

Variables

This section is empty.

Functions

func GetActionsStringFromPolicy

func GetActionsStringFromPolicy(policy *iampolicy.Policy) []string

GetActionsStringFromPolicy extract the admin/s3 actions from a given policy and return them in []string format

ie:

{
	"Version": "2012-10-17",
	"Statement": [{
			"Action": [
				"admin:ServerInfo",
				"admin:CreatePolicy",
				"admin:GetUser"
			],
			...
		},
		{
			"Action": [
				"s3:ListenBucketNotification",
				"s3:PutBucketNotification"
			],
			...
		}
	]
}

Will produce an array like: ["admin:ServerInfo", "admin:CreatePolicy", "admin:GetUser", "s3:ListenBucketNotification", "s3:PutBucketNotification"]\

func GetAuthorizedEndpoints

func GetAuthorizedEndpoints(actions []string) []string

GetAuthorizedEndpoints return a list of allowed endpoint based on a provided *iampolicy.Policy ie: pages the user should have access based on his current privileges

func GetLDAPEnabled added in v0.6.2

func GetLDAPEnabled() bool

func GetOperatorMode

func GetOperatorMode() bool

GetOperatorMode gets Console Operator mode status set on env variable or default one

Types

type ConfigurationActionSet

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

Jump to

Keyboard shortcuts

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