Documentation ¶
Index ¶
- Constants
- func GetIdentity(ctx context.Context) string
- func Init(store *configstore.Store) error
- func IsAdmin(ctx context.Context) error
- func IsAllowedResolver(ctx context.Context, tt *tasktemplate.TaskTemplate, ...) error
- func IsGlobalResolverUser(u string) bool
- func IsResolver(ctx context.Context, r *resolution.Resolution) error
- func WithIdentity(ctx context.Context, id string) context.Context
Constants ¶
View Source
const IdentityProviderCtxKey = "__identity_provider_key"
IdentityProviderCtxKey is the key used to store/retrieve identity data from Context
Variables ¶
This section is empty.
Functions ¶
func GetIdentity ¶
GetIdentity returns identity data stored in context
func Init ¶
func Init(store *configstore.Store) error
Init reads authorization from configstore, bootstraps values used to handle authorization
func IsAllowedResolver ¶
func IsAllowedResolver(ctx context.Context, tt *tasktemplate.TaskTemplate, extendedResolverUsernames []string) error
IsAllowedResolver asserts that identity data found in context represents an authorized resolver user, for a given template and task
func IsGlobalResolverUser ¶
IsGlobalResolverUser asserts that a given user is universally allowed to resolve any task
func IsResolver ¶
func IsResolver(ctx context.Context, r *resolution.Resolution) error
IsResolver asserts that identity data found in context is the actual resolver of a given resolution
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.