Versions in this module Expand all Collapse all v0 v0.12.7 Aug 22, 2026 Changes in this version + const InteractiveWatchdogFreshnessSec + const InteractiveWatchdogPollSec + var ErrAuthorizationPending = &fosite.RFC6749Error + var ErrExpiredToken = &fosite.RFC6749Error + var ErrSlowDown = &fosite.RFC6749Error + func AuthenticatedViaAPIKey(ctx context.Context) bool + func ConfigureSecurityForCollectorPing(token, serverName string) (*security.SecurityConfig, error) + func ConfigureSecurityForToken(token string) (*security.SecurityConfig, error) + func ConfigureSecurityForTokenWithCache(token string, sessionCache *security.SessionCache) (*security.SecurityConfig, error) + func ConfigureSecurityForTokenWithCacheAndFallback(token string, sessionCache *security.SessionCache, allowFSFallback bool) (*security.SecurityConfig, error) + func ContainsScope(ctx context.Context, scope string) bool + func DefaultIDPSession(username string) *openid.DefaultSession + func DefaultOpenIDConnectSession(username string) *openid.DefaultSession + func GenerateSigningKey() ([]byte, error) + func GetScheddWithToken(ctx context.Context, schedd *htcondor.Schedd) (*htcondor.Schedd, error) + func GetSecurityConfigFromToken(ctx context.Context) (*security.SecurityConfig, error) + func GetTokenFromContext(ctx context.Context) (string, bool) + func WithToken(ctx context.Context, token string) context.Context + type AdminClient struct + CreatedAt time.Time + GrantTypes []string + ID string + Public bool + RedirectURIs []string + ResponseTypes []string + Scopes []string + type AdminCondorConfigEntry struct + Key string + Redacted bool + Value string + type AdminCondorConfigResponse struct + Configured bool + Entries []AdminCondorConfigEntry + type AdminLogsResponse struct + Enabled bool + Entries []logging.BufferEntry + type AdminToken struct + Active bool + ClientID string + ExpiresAt time.Time + Kind string + RequestedAt time.Time + Scopes []string + SignaturePrefix string + Subject string + type AdvertiseRequest struct + Ad *classad.ClassAd + Command string + WithAck bool + type AdvertiseResponse struct + Errors []string + Failed int + Message string + Succeeded int + Success bool + type AuthMeResponse struct + Authenticated bool + Groups []string + IsAdmin bool + Username string + type CollectorAdsResponse struct + Ads []*classad.ClassAd + type Config struct + Collector *htcondor.Collector + Credd htcondor.CreddClient + DBPath string + EnableIDP bool + EnableMCP bool + EnableMetrics bool + HTCondorConfig *config.Config + HTTPBaseURL string + IDPAccessTokenLifespan time.Duration + IDPDBPath string + IDPIssuer string + IDPRefreshTokenLifespan time.Duration + IdleTimeout time.Duration + InteractiveExtraSubmit string + JobQueueLogPath string + JupyterWorkDir string + KEKFilePath string + LLMAPIKeyFile string + LLMAPIURL string + LLMModel string + LLMOperatorInstructionsFile string + ListenAddr string + Logger *logging.Logger + MCPAccessGroup string + MCPInstructions string + MCPReadGroup string + MCPWriteGroup string + MetricsCacheTTL time.Duration + MetricsPublic bool + OAuth2AccessTokenLifespan time.Duration + OAuth2AuthURL string + OAuth2ClientID string + OAuth2ClientSecret string + OAuth2DBPath string + OAuth2GroupsClaim string + OAuth2Issuer string + OAuth2RedirectURL string + OAuth2RefreshTokenLifespan time.Duration + OAuth2Scopes []string + OAuth2TokenURL string + OAuth2UserInfoURL string + OAuth2UsernameClaim string + PingInterval time.Duration + ReadTimeout time.Duration + ScheddAddr string + ScheddName string + SessionTTL time.Duration + SigningKeyPath string + StreamBufferSize int + StreamWriteTimeout time.Duration + TLSCACertFile string + TLSCertFile string + TLSKeyFile string + TemplateGlobalPath string + TemplateUserStoreDBPath string + Token string + TrustDomain string + UIDDomain string + UserHeader string + UserHeaderTrustAnyUnsafe bool + UserHeaderTrustedProxies []string + WebUIAdminGroup string + WriteTimeout time.Duration + type DashboardResponse struct + JobsByStatus map[string]int + JobsTotal int + Username string + type DeviceAuthorizationResponse struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationURI string + VerificationURIComplete string + type DeviceCodeHandler struct + func NewDeviceCodeHandler(storage *OAuth2Storage, config *fosite.Config) *DeviceCodeHandler + func (h *DeviceCodeHandler) HandleDeviceAccessRequest(ctx context.Context, deviceCode string, session fosite.Session) (fosite.Requester, error) + func (h *DeviceCodeHandler) HandleDeviceAuthorizationRequest(ctx context.Context, client fosite.Client, scopes []string) (*DeviceAuthorizationResponse, error) + type ErrorResponse struct + Code int + Error string + Message string + type Handler struct + func NewHandler(cfg HandlerConfig) (*Handler, error) + func (h *Handler) GetOAuth2Provider() *OAuth2Provider + func (h *Handler) GetSchedd() *htcondor.Schedd + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (h *Handler) SetupRoutes(setupFunc func(*http.ServeMux)) + func (h *Handler) Start(ctx context.Context, ln net.Listener, protocol string) error + func (h *Handler) Stop(ctx context.Context) error + func (h *Handler) UpdateOAuth2RedirectURL(redirectURL string) + func (h *Handler) UpdateSchedd(newAddress string) + type HandlerConfig struct + Collector *htcondor.Collector + Credd htcondor.CreddClient + DBPath string + EnableIDP bool + EnableMCP bool + EnableMetrics bool + HTCondorConfig *config.Config + HTTPBaseURL string + IDPAccessTokenLifespan time.Duration + IDPDBPath string + IDPIssuer string + IDPRefreshTokenLifespan time.Duration + InteractiveExtraSubmit string + JobQueueLogPath string + JupyterWorkDir string + KEKFilePath string + LLMAPIKeyFile string + LLMAPIURL string + LLMModel string + LLMOperatorInstructionsFile string + Logger *logging.Logger + MCPAccessGroup string + MCPInstructions string + MCPReadGroup string + MCPWriteGroup string + MetricsCacheTTL time.Duration + MetricsPublic bool + OAuth2AccessTokenLifespan time.Duration + OAuth2AuthURL string + OAuth2ClientID string + OAuth2ClientSecret string + OAuth2DBPath string + OAuth2GroupsClaim string + OAuth2Issuer string + OAuth2RedirectURL string + OAuth2RefreshTokenLifespan time.Duration + OAuth2Scopes []string + OAuth2TokenURL string + OAuth2UserInfoURL string + OAuth2UsernameClaim string + PingInterval time.Duration + ScheddAddr string + ScheddName string + SessionTTL time.Duration + SigningKeyPath string + StreamBufferSize int + StreamWriteTimeout time.Duration + TLSCACertFile string + TemplateGlobalPath string + TemplateUserStoreDBPath string + Token string + TrustDomain string + UIDDomain string + UserHeader string + UserHeaderTrustAnyUnsafe bool + UserHeaderTrustedProxies []string + WebUIAdminGroup string + type HistoryListResponse struct + Ads []*classad.ClassAd + type IDPProvider struct + func NewIDPProvider(opts IDPProviderOptions) (*IDPProvider, error) + func (p *IDPProvider) Close() error + func (p *IDPProvider) GetProvider() fosite.OAuth2Provider + func (p *IDPProvider) GetStorage() *IDPStorage + func (p *IDPProvider) GetStrategy() *compose.CommonStrategy + func (p *IDPProvider) UpdateIssuer(issuer string) + type IDPProviderOptions struct + AccessTokenLifespan time.Duration + DB *sql.DB + Issuer string + RefreshTokenLifespan time.Duration + Sealer *seal.Sealer + type IDPStorage struct + func NewIDPStorage(db *sql.DB) *IDPStorage + func (s *IDPStorage) AuthenticateUser(ctx context.Context, username, password string) error + func (s *IDPStorage) ClientAssertionJWTValid(ctx context.Context, jti string) error + func (s *IDPStorage) CreateAccessTokenSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *IDPStorage) CreateAuthorizeCodeSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *IDPStorage) CreateClient(ctx context.Context, client *fosite.DefaultClient) error + func (s *IDPStorage) CreateOpenIDConnectSession(ctx context.Context, signature string, requester fosite.Requester) error + func (s *IDPStorage) CreatePKCERequestSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *IDPStorage) CreateRefreshTokenSession(ctx context.Context, signature string, _ string, request fosite.Requester) error + func (s *IDPStorage) CreateSession(ctx context.Context, username string) (string, error) + func (s *IDPStorage) CreateUser(ctx context.Context, username, password, state string) error + func (s *IDPStorage) DeleteAccessTokenSession(ctx context.Context, signature string) error + func (s *IDPStorage) DeleteOpenIDConnectSession(ctx context.Context, signature string) error + func (s *IDPStorage) DeletePKCERequestSession(ctx context.Context, signature string) error + func (s *IDPStorage) DeleteRefreshTokenSession(ctx context.Context, signature string) error + func (s *IDPStorage) DeleteSession(ctx context.Context, sessionID string) error + func (s *IDPStorage) GetAccessTokenSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *IDPStorage) GetAuthorizeCodeSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *IDPStorage) GetClient(ctx context.Context, clientID string) (fosite.Client, error) + func (s *IDPStorage) GetOpenIDConnectSession(ctx context.Context, signature string, requester fosite.Requester) (fosite.Requester, error) + func (s *IDPStorage) GetPKCERequestSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *IDPStorage) GetRefreshTokenSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *IDPStorage) GetSession(ctx context.Context, sessionID string) (string, error) + func (s *IDPStorage) GetUserState(ctx context.Context, username string) (string, error) + func (s *IDPStorage) InvalidateAuthorizeCodeSession(ctx context.Context, signature string) error + func (s *IDPStorage) LoadHMACSecret(ctx context.Context) ([]byte, error) + func (s *IDPStorage) LoadRSAKey(ctx context.Context) (string, error) + func (s *IDPStorage) RevokeAccessToken(ctx context.Context, requestID string) error + func (s *IDPStorage) RevokeRefreshToken(ctx context.Context, requestID string) error + func (s *IDPStorage) RevokeRefreshTokenMaybeGracePeriod(ctx context.Context, requestID string, _ string) error + func (s *IDPStorage) RotateRefreshToken(ctx context.Context, requestID string, _ string) error + func (s *IDPStorage) SaveHMACSecret(ctx context.Context, secret []byte) error + func (s *IDPStorage) SaveRSAKey(ctx context.Context, privateKeyPEM string) error + func (s *IDPStorage) SetClientAssertionJWT(ctx context.Context, jti string, exp time.Time) error + func (s *IDPStorage) SetSealer(sealer *seal.Sealer) + func (s *IDPStorage) UserExists(ctx context.Context, username string) (bool, error) + type InteractiveCreateTerminalRequest struct + Cpus int + CudaVersion string + DiskMB int + Gpus int + GpusMinimumCapability string + GpusMinimumMemory int + GpusMinimumRuntime string + MemoryMB int + RequireGpus string + type InteractiveCreateTerminalResponse struct + BatchName string + ClusterID int + InstanceID string + JobID string + ProcID int + type InteractiveTerminalSummary struct + BatchName string + ClusterID int + HoldReason string + HoldReasonCode int + InstanceID string + JobCurrentStartExecutingDate int64 + JobID string + JobStatus int + ProcID int + SubmittedAt string + type JobActionFunc func(ctx context.Context, constraint, reason string) (*htcondor.JobActionResults, error) + type JobEditRequest struct + Attributes map[string]interface{} + type JobListResponse struct + Jobs []*classad.ClassAd + type JobLogResponse struct + Events []userlog.Event + Filename string + JobID string + Truncated bool + type JobSubmitRequest struct + SubmitFile string + type JobSubmitResponse struct + ClusterID int + JobIDs []string + type JupyterCreateRequest struct + Cpus int + CudaVersion string + DiskMB int + Gpus int + GpusMinimumCapability string + GpusMinimumMemory int + GpusMinimumRuntime string + Image string + MemoryMB int + RequireGpus string + type JupyterCreateResponse struct + ClusterID string + InstanceID string + ProxyPath string + type JupyterInstanceSummary struct + ClusterID string + Connected bool + CreatedAt string + EventsPath string + HoldReason string + HoldReasonCode int + Image string + InstanceID string + JobCurrentStartExecutingDate int64 + JobStatus int + Owner string + ProxyPath string + type LoginRateLimiter struct + func NewLoginRateLimiter(r rate.Limit, b int) *LoginRateLimiter + func (l *LoginRateLimiter) Allow(ip string) bool + type OAuth2Provider struct + func NewOAuth2Provider(opts OAuth2ProviderOptions) (*OAuth2Provider, error) + func (p *OAuth2Provider) Close() error + func (p *OAuth2Provider) GetProvider() fosite.OAuth2Provider + func (p *OAuth2Provider) GetStorage() *OAuth2Storage + func (p *OAuth2Provider) GetStrategy() *compose.CommonStrategy + func (p *OAuth2Provider) IntrospectToken(ctx context.Context, token string) (fosite.Session, error) + func (p *OAuth2Provider) UpdateIssuer(issuer string) + type OAuth2ProviderOptions struct + AccessTokenLifespan time.Duration + DB *sql.DB + Issuer string + RefreshTokenLifespan time.Duration + Sealer *seal.Sealer + type OAuth2StateEntry struct + AuthorizeRequest fosite.AuthorizeRequester + Groups []string + OriginalURL string + Timestamp time.Time + Username string + type OAuth2StateStore struct + func NewOAuth2StateStore() *OAuth2StateStore + func (s *OAuth2StateStore) GenerateState() (string, error) + func (s *OAuth2StateStore) Get(state string) (fosite.AuthorizeRequester, bool) + func (s *OAuth2StateStore) GetWithURL(state string) (fosite.AuthorizeRequester, string, bool) + func (s *OAuth2StateStore) GetWithUsername(state string) (fosite.AuthorizeRequester, string, []string, bool) + func (s *OAuth2StateStore) Remove(state string) + func (s *OAuth2StateStore) Start(ctx context.Context) + func (s *OAuth2StateStore) Store(state string, ar fosite.AuthorizeRequester) + func (s *OAuth2StateStore) StoreWithURL(state string, ar fosite.AuthorizeRequester, originalURL string) + func (s *OAuth2StateStore) StoreWithUsername(state string, ar fosite.AuthorizeRequester, originalURL, username string, ...) + func (s *OAuth2StateStore) Wait() + type OAuth2Storage struct + func NewOAuth2Storage(db *sql.DB) *OAuth2Storage + func (s *OAuth2Storage) ApproveDeviceCodeSession(ctx context.Context, userCode string, subject string, session fosite.Session) error + func (s *OAuth2Storage) ApproveDeviceCodeSessionWithScopes(ctx context.Context, userCode string, subject string, session fosite.Session, ...) error + func (s *OAuth2Storage) ClientAssertionJWTValid(ctx context.Context, jti string) error + func (s *OAuth2Storage) CreateAccessTokenSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *OAuth2Storage) CreateAuthorizeCodeSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *OAuth2Storage) CreateClient(ctx context.Context, client *fosite.DefaultClient) error + func (s *OAuth2Storage) CreateDeviceCodeSession(ctx context.Context, deviceCode string, userCode string, ...) error + func (s *OAuth2Storage) CreateOpenIDConnectSession(ctx context.Context, signature string, requester fosite.Requester) error + func (s *OAuth2Storage) CreatePKCERequestSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *OAuth2Storage) CreateRefreshTokenSession(ctx context.Context, signature string, _ string, request fosite.Requester) error + func (s *OAuth2Storage) DeleteAccessTokenSession(ctx context.Context, signature string) error + func (s *OAuth2Storage) DeleteOpenIDConnectSession(ctx context.Context, signature string) error + func (s *OAuth2Storage) DeletePKCERequestSession(ctx context.Context, signature string) error + func (s *OAuth2Storage) DeleteRefreshTokenSession(ctx context.Context, signature string) error + func (s *OAuth2Storage) DenyDeviceCodeSession(ctx context.Context, userCode string) error + func (s *OAuth2Storage) GetAccessTokenSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *OAuth2Storage) GetAuthorizeCodeSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *OAuth2Storage) GetClient(ctx context.Context, clientID string) (fosite.Client, error) + func (s *OAuth2Storage) GetDB() *sql.DB + func (s *OAuth2Storage) GetDeviceCodeSession(ctx context.Context, deviceCode string, session fosite.Session) (fosite.Requester, error) + func (s *OAuth2Storage) GetDeviceCodeSessionByUserCode(ctx context.Context, userCode string) (string, fosite.Requester, error) + func (s *OAuth2Storage) GetOpenIDConnectSession(ctx context.Context, signature string, requester fosite.Requester) (fosite.Requester, error) + func (s *OAuth2Storage) GetPKCERequestSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *OAuth2Storage) GetRefreshTokenSession(ctx context.Context, signature string, session fosite.Session) (fosite.Requester, error) + func (s *OAuth2Storage) InvalidateAuthorizeCodeSession(ctx context.Context, signature string) error + func (s *OAuth2Storage) InvalidateDeviceCodeSession(ctx context.Context, deviceCode string) error + func (s *OAuth2Storage) LoadHMACSecret(ctx context.Context) ([]byte, error) + func (s *OAuth2Storage) LoadRSAKey(ctx context.Context) (string, error) + func (s *OAuth2Storage) RevokeAccessToken(ctx context.Context, requestID string) error + func (s *OAuth2Storage) RevokeRefreshToken(ctx context.Context, requestID string) error + func (s *OAuth2Storage) RevokeRefreshTokenMaybeGracePeriod(ctx context.Context, requestID string, _ string) error + func (s *OAuth2Storage) RotateRefreshToken(ctx context.Context, requestID string, _ string) error + func (s *OAuth2Storage) SaveHMACSecret(ctx context.Context, secret []byte) error + func (s *OAuth2Storage) SaveRSAKey(ctx context.Context, privateKeyPEM string) error + func (s *OAuth2Storage) SetClientAssertionJWT(ctx context.Context, jti string, exp time.Time) error + func (s *OAuth2Storage) SetSealer(sealer *seal.Sealer) + func (s *OAuth2Storage) UpdateDeviceCodePolling(ctx context.Context, deviceCode string) error + type PeekResponse struct + Stderr *PeekedStreamResponse + Stdout *PeekedStreamResponse + type PeekedStreamResponse struct + Offset int64 + Text string + type PingResponse struct + AuthMethod string + Authentication bool + Authorized bool + Daemon string + Encryption bool + Permission string + SessionID string + User string + ValidCommands string + type Server struct + func NewServer(cfg Config) (*Server, error) + func (s *Server) GetAddr() string + func (s *Server) ServeListener(ln net.Listener, scheme string) error + func (s *Server) ServeListenerWithCert(ln net.Listener, certFile, keyFile string) error + func (s *Server) Shutdown(ctx context.Context) error + func (s *Server) Start() error + func (s *Server) StartTLS(certFile, keyFile string) error + type SessionData struct + CreatedAt time.Time + ExpiresAt time.Time + Groups []string + Username string + type SessionStore struct + func NewSessionStore(db *sql.DB, ttl time.Duration) (*SessionStore, error) + func (s *SessionStore) Cleanup() + func (s *SessionStore) Create(username string, groups ...[]string) (string, *SessionData, error) + func (s *SessionStore) Delete(sessionID string) + func (s *SessionStore) Get(sessionID string) *SessionData + func (s *SessionStore) Size() int + type ShareOutputRequest struct + TTLSeconds int + type ShareOutputResponse struct + ExpiresAt time.Time + Owner string + TTLSeconds int + URL string + type TokenCache struct + func NewTokenCache() *TokenCache + func (tc *TokenCache) Add(token string) (*TokenCacheEntry, error) + func (tc *TokenCache) AddValidated(token, username string, expiration time.Time) (*TokenCacheEntry, error) + func (tc *TokenCache) Get(token string) (*TokenCacheEntry, bool) + func (tc *TokenCache) MarkValidated(token, authoritativeUsername string) + func (tc *TokenCache) Remove(token string) + func (tc *TokenCache) Size() int + func (tc *TokenCache) ValidatedUsername(token string) string + type TokenCacheEntry struct + Expiration time.Time + SessionCache *security.SessionCache + Token string + Username string + Validated bool + type UserInfo struct + Claims map[string]interface{} + Email string + Groups interface{} + Name string + Subject string + type VersionResponse struct + Commit string + Version string + type WhoAmIResponse struct + Authenticated bool + User string