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)
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.