Documentation
¶
Index ¶
- Constants
- func ContextCanViewFlow(ctx context.Context) bool
- func ContextCanViewOAS(ctx context.Context) bool
- func ContextHasPermission(ctx context.Context, permissionID int64) bool
- func ContextIsAdminUserMgmtAdmin(ctx context.Context) bool
- func ContextIsAdminUserMgmtViewer(ctx context.Context) bool
- func ContextIsBasicAuthAdmin(ctx context.Context) bool
- func ContextIsBasicAuthViewer(ctx context.Context) bool
- func ContextSessionValid(ctx context.Context) bool
- func IsSuperUserContext(ctx context.Context) bool
- func RequireSessionMiddleware() adminapigen.StrictMiddlewareFunc
- func SessionMiddleware(ssi adminapigen.StrictServerInterface) adminapigen.StrictMiddlewareFunc
- type Admin
- type Opts
Constants ¶
const ( PermissionIDFlowViewer = int64(1) PermissionIDOASViewer = int64(2) PermissionIDBasicAuthOrgAdmin = int64(3) PermissionIDBasicAuthOrgViewer = int64(4) PermissionIDAdminUserMgmtAdmin = int64(5) PermissionIDAdminUserMgmtViewer = int64(6) PermissionNameFlowViewer = "flowviewer" PermissionNameOASViewer = "oasviewer" PermissionNameBasicAuthOrgAdmin = "basicauthorgadmin" PermissionNameBasicAuthOrgViewer = "basicauthorgviewer" PermissionNameAdminUserMgmtAdmin = "adminusermgmtadmin" PermissionNameAdminUserMgmtViewer = "adminusermgmtviewer" )
Variables ¶
This section is empty.
Functions ¶
func ContextCanViewFlow ¶ added in v0.9.0
ContextCanViewFlow reports whether the calling admin user has the flowviewer permission.
func ContextCanViewOAS ¶ added in v0.9.0
ContextCanViewOAS reports whether the calling admin user has the oasviewer permission.
func ContextHasPermission ¶ added in v0.9.0
ContextHasPermission reports whether the calling admin user holds the given permission. Superusers implicitly hold all permissions.
func ContextIsAdminUserMgmtAdmin ¶ added in v0.9.0
ContextIsAdminUserMgmtAdmin reports whether the calling admin user has the adminusermgmtadmin permission.
func ContextIsAdminUserMgmtViewer ¶ added in v0.9.0
ContextIsAdminUserMgmtViewer reports whether the calling admin user has the adminusermgmtviewer permission.
func ContextIsBasicAuthAdmin ¶ added in v0.9.0
ContextIsBasicAuthAdmin reports whether the calling admin user has the basicauthorgadmin permission.
func ContextIsBasicAuthViewer ¶ added in v0.9.0
ContextIsBasicAuthViewer reports whether the calling admin user has the basicauthorgviewer permission.
func ContextSessionValid ¶ added in v0.8.1
func IsSuperUserContext ¶ added in v0.8.1
func RequireSessionMiddleware ¶ added in v0.8.1
func RequireSessionMiddleware() adminapigen.StrictMiddlewareFunc
func SessionMiddleware ¶ added in v0.8.1
func SessionMiddleware( ssi adminapigen.StrictServerInterface, ) adminapigen.StrictMiddlewareFunc
SessionMiddleware provides context population of administration session information. If put in front of a handler, the context to the handler will contain information that can be used to determine if a KRB admin made the call, or if it was external.
Types ¶
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
func (*Admin) RegisterAPIProvider ¶ added in v0.8.1
func (a *Admin) RegisterAPIProvider(apiProvider adminext.APIProvider) error
RegisterAPIProvider registers an API provider with the admin API. All adminext.APIProvider implementations must be registered using this method in order for their routes to be served by the admin API.
func (*Admin) SetFlowFetcher ¶ added in v0.8.1
func (a *Admin) SetFlowFetcher(ff adminext.FlowFetcher)
SetFlowFetcher sets the flow fetcher for the admin component. This allows the admin API to serve flow metadata API calls.
func (*Admin) SetOASBackend ¶ added in v0.8.1
func (a *Admin) SetOASBackend(backend adminext.OASBackend)
SetOASBackend sets the OAS backend for the admin component. This allows the admin API to serve OAS to clients per backend providing an OAS.