Documentation ¶
Index ¶
- Variables
- func CanGetUsageDetails() echo.MiddlewareFunc
- func InitTheLastBootClusterHeartbeat()
- func TheLastBootClusterHeartbeat() *time.Time
- type MiscAuthZ
- type MiscAuthZBasic
- func (a *MiscAuthZBasic) CanGetMasterConfig(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZBasic) CanGetMasterLogs(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZBasic) CanGetSensitiveAgentInfo(ctx context.Context, curUrser *model.User) (permErr error, err error)
- func (a *MiscAuthZBasic) CanGetUsageDetails(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZBasic) CanUpdateAgents(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZBasic) CanUpdateMasterConfig(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZBasic) CanViewExternalJobs(ctx context.Context, curUser *model.User) (permErr error, err error)
- type MiscAuthZPermissive
- func (a *MiscAuthZPermissive) CanGetMasterConfig(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZPermissive) CanGetMasterLogs(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZPermissive) CanGetSensitiveAgentInfo(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZPermissive) CanGetUsageDetails(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZPermissive) CanUpdateAgents(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZPermissive) CanUpdateMasterConfig(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZPermissive) CanViewExternalJobs(ctx context.Context, curUser *model.User) (permErr error, err error)
- type MiscAuthZRBAC
- func (a *MiscAuthZRBAC) CanGetMasterConfig(ctx context.Context, curUser *model.User) (permErr error, error error)
- func (a *MiscAuthZRBAC) CanGetMasterLogs(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZRBAC) CanGetSensitiveAgentInfo(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZRBAC) CanGetUsageDetails(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZRBAC) CanModifyGlobalConfigPolicies(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZRBAC) CanUpdateAgents(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZRBAC) CanUpdateMasterConfig(ctx context.Context, curUser *model.User) (permErr error, error error)
- func (a *MiscAuthZRBAC) CanViewExternalJobs(ctx context.Context, curUser *model.User) (permErr error, err error)
- func (a *MiscAuthZRBAC) CanViewGlobalConfigPolicies(ctx context.Context, curUser *model.User) (permErr error, err error)
Constants ¶
This section is empty.
Variables ¶
var AuthZProvider authz.AuthZProviderType[MiscAuthZ]
AuthZProvider is the authz registry for Notebooks, Shells, and Commands.
Functions ¶
func CanGetUsageDetails ¶
func CanGetUsageDetails() echo.MiddlewareFunc
CanGetUsageDetails returns an echo middleware that checks if the user has permission to get usage details.
func InitTheLastBootClusterHeartbeat ¶
func InitTheLastBootClusterHeartbeat()
InitTheLastBootClusterHeartbeat preserves the last boot heartbeat for applications that need it after the master has been running for some time (e.g. open allocation reattachment).
func TheLastBootClusterHeartbeat ¶
TheLastBootClusterHeartbeat returns the last known heartbeat time from the previous master boot.
Types ¶
type MiscAuthZ ¶
type MiscAuthZ interface { // CanUpdateAgents returns an error if the user is not authorized to manipulate agents. CanUpdateAgents( ctx context.Context, curUser *model.User, ) (permErr error, err error) // CanGetSensitiveAgentInfo returns an error if the user is not authorized to view // sensitive subset of agent info. CanGetSensitiveAgentInfo( ctx context.Context, curUrser *model.User, ) (permErr error, err error) // CanGetMasterLogs returns an error if the user is not authorized to get master logs. CanGetMasterLogs( ctx context.Context, curUser *model.User, ) (permErr error, err error) // CanGetMasterConfig returns an error if the user is not authorized to get master configs. CanGetMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, err error) // CanUpdateMasterConfig returns an error if the user is not authorized to update master configs. CanUpdateMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, err error) // CanGetHistoricalUsage returns an error if the user is not authorized to get usage // related information. CanGetUsageDetails( ctx context.Context, curUser *model.User, ) (permErr error, err error) // CanViewExternalJobs returns an error if the user is not authorized to view external jobs. CanViewExternalJobs( ctx context.Context, curUser *model.User, ) (permErr error, err error) }
MiscAuthZ describes authz methods for misc actions.
type MiscAuthZBasic ¶
type MiscAuthZBasic struct{}
MiscAuthZBasic is basic OSS controls.
func (*MiscAuthZBasic) CanGetMasterConfig ¶
func (a *MiscAuthZBasic) CanGetMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetMasterConfig checks if user has access to master configs.
func (*MiscAuthZBasic) CanGetMasterLogs ¶
func (a *MiscAuthZBasic) CanGetMasterLogs( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetMasterLogs returns nil and nil error.
func (*MiscAuthZBasic) CanGetSensitiveAgentInfo ¶
func (a *MiscAuthZBasic) CanGetSensitiveAgentInfo( ctx context.Context, curUrser *model.User, ) (permErr error, err error)
CanGetSensitiveAgentInfo returns nil and nil error.
func (*MiscAuthZBasic) CanGetUsageDetails ¶
func (a *MiscAuthZBasic) CanGetUsageDetails( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetUsageDetails returns nil and nil error.
func (*MiscAuthZBasic) CanUpdateAgents ¶
func (a *MiscAuthZBasic) CanUpdateAgents( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanUpdateAgents checks if the user has access to update agents.
func (*MiscAuthZBasic) CanUpdateMasterConfig ¶
func (a *MiscAuthZBasic) CanUpdateMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanUpdateMasterConfig checks if user has access to update master configs.
func (*MiscAuthZBasic) CanViewExternalJobs ¶
func (a *MiscAuthZBasic) CanViewExternalJobs( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanViewExternalJobs returns nil and nil error.
type MiscAuthZPermissive ¶
type MiscAuthZPermissive struct{}
MiscAuthZPermissive is permissive implementation of the MiscAuthZ interface.
func (*MiscAuthZPermissive) CanGetMasterConfig ¶
func (a *MiscAuthZPermissive) CanGetMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetMasterConfig returns calls the RBAC implementation but always allows access.
func (*MiscAuthZPermissive) CanGetMasterLogs ¶
func (a *MiscAuthZPermissive) CanGetMasterLogs( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetMasterLogs returns calls the RBAC implementation but always allows access.
func (*MiscAuthZPermissive) CanGetSensitiveAgentInfo ¶
func (a *MiscAuthZPermissive) CanGetSensitiveAgentInfo( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetSensitiveAgentInfo calls the RBAC implementation but always allows access.
func (*MiscAuthZPermissive) CanGetUsageDetails ¶
func (a *MiscAuthZPermissive) CanGetUsageDetails( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetUsageDetails calls the RBAC implementation but always allows access.
func (*MiscAuthZPermissive) CanUpdateAgents ¶
func (a *MiscAuthZPermissive) CanUpdateAgents( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanUpdateAgents calls the RBAC implementation but always allows access.
func (*MiscAuthZPermissive) CanUpdateMasterConfig ¶
func (a *MiscAuthZPermissive) CanUpdateMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanUpdateMasterConfig returns calls the RBAC implementation but always allows access.
func (*MiscAuthZPermissive) CanViewExternalJobs ¶
func (a *MiscAuthZPermissive) CanViewExternalJobs( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanViewExternalJobs calls the RBAC implementation but always allows access.
type MiscAuthZRBAC ¶
type MiscAuthZRBAC struct{}
MiscAuthZRBAC is the RBAC implementation of the MiscAuthZ interface.
func (*MiscAuthZRBAC) CanGetMasterConfig ¶
func (a *MiscAuthZRBAC) CanGetMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, error error)
CanGetMasterConfig checks if the user has permission to view master configs.
func (*MiscAuthZRBAC) CanGetMasterLogs ¶
func (a *MiscAuthZRBAC) CanGetMasterLogs( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetMasterLogs checks if the user has permission to view master logs.
func (*MiscAuthZRBAC) CanGetSensitiveAgentInfo ¶
func (a *MiscAuthZRBAC) CanGetSensitiveAgentInfo( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetSensitiveAgentInfo checks if the user can view sensitive subset of agent info.
func (*MiscAuthZRBAC) CanGetUsageDetails ¶
func (a *MiscAuthZRBAC) CanGetUsageDetails( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanGetUsageDetails checks if the user can get usage related details.
func (*MiscAuthZRBAC) CanModifyGlobalConfigPolicies ¶
func (a *MiscAuthZRBAC) CanModifyGlobalConfigPolicies( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanModifyGlobalConfigPolicies checks if the user can modify global task config policies.
func (*MiscAuthZRBAC) CanUpdateAgents ¶
func (a *MiscAuthZRBAC) CanUpdateAgents( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanUpdateAgents checks if the user can update agents.
func (*MiscAuthZRBAC) CanUpdateMasterConfig ¶
func (a *MiscAuthZRBAC) CanUpdateMasterConfig( ctx context.Context, curUser *model.User, ) (permErr error, error error)
CanUpdateMasterConfig checks if the user has permission to view master configs.
func (*MiscAuthZRBAC) CanViewExternalJobs ¶
func (a *MiscAuthZRBAC) CanViewExternalJobs( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanViewExternalJobs checks if the user can view external jobs.
func (*MiscAuthZRBAC) CanViewGlobalConfigPolicies ¶
func (a *MiscAuthZRBAC) CanViewGlobalConfigPolicies( ctx context.Context, curUser *model.User, ) (permErr error, err error)
CanViewGlobalConfigPolicies checks if the user can view global task config policies.