entities

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AnonymousRole = "anonymous"

Variables

This section is empty.

Functions

This section is empty.

Types

type OpAction

type OpAction string
var ActionDelete OpAction = "delete"
var ActionDestroy OpAction = "destroy"
var ActionEncrypt OpAction = "encrypt"
var ActionProxy OpAction = "proxy"
var ActionRead OpAction = "read"
var ActionSign OpAction = "sign"
var ActionWrite OpAction = "write"

type OpResource

type OpResource string
var ResourceAlias OpResource = "aliases"
var ResourceEthAccount OpResource = "ethereum"
var ResourceKey OpResource = "keys"
var ResourceNode OpResource = "nodes"
var ResourceSecret OpResource = "secrets"
var ResourceStore OpResource = "stores"

type Operation

type Operation struct {
	Action   OpAction
	Resource OpResource
}

type Permission

type Permission string
const DeleteAlias Permission = "delete:aliases"
const DeleteEth Permission = "delete:ethereum"
const DeleteKey Permission = "delete:keys"
const DeleteSecret Permission = "delete:secrets"
const DestroyEth Permission = "destroy:ethereum"
const DestroyKey Permission = "destroy:keys"
const DestroySecret Permission = "destroy:secrets"
const EncryptEth Permission = "encrypt:ethereum"
const EncryptKey Permission = "encrypt:keys"
const ProxyNode Permission = "proxy:nodes"
const ReadAlias Permission = "read:aliases"
const ReadEth Permission = "read:ethereum"
const ReadKey Permission = "read:keys"
const ReadSecret Permission = "read:secrets"
const SignEth Permission = "sign:ethereum"
const SignKey Permission = "sign:keys"
const WriteAlias Permission = "write:aliases"
const WriteEth Permission = "write:ethereum"
const WriteKey Permission = "write:keys"
const WriteSecret Permission = "write:secrets"

func ListPermissions

func ListPermissions() []Permission

func ListWildcardPermission

func ListWildcardPermission(p string) []Permission

type Role

type Role struct {
	Name        string
	Permissions []Permission
}

type RoleSpecs

type RoleSpecs struct {
	Permissions []Permission `json:"permission"`
}

type UserClaims

type UserClaims struct {
	Tenant      string
	Permissions []string
	Roles       []string
}

UserClaims represent raw claims extracted from an authentication method

type UserInfo

type UserInfo struct {
	// AuthMode records the mode that succeeded to Authenticate the request ('tls', 'api-key', 'oidc' or ”)
	AuthMode string

	// Tenant belonged by the user
	Tenant string

	// Tenant identifies the user
	Username string

	// Roles indicates the user's membership
	Roles []string

	// Permissions specify
	Permissions []Permission
}

func NewAnonymousUser

func NewAnonymousUser() *UserInfo

func NewWildcardUser

func NewWildcardUser() *UserInfo

Jump to

Keyboard shortcuts

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