Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeAuthorizationEvidence(evidence *AuthorizationEvidence) ([]byte, error)
- func IsAgentForwardingAllowed(auth Authorization) bool
- func KindOf(auth Authorization) string
- type Authorization
- type AuthorizationEvidence
- func (this *AuthorizationEvidence) Append(hop AuthorizationEvidenceHop) error
- func (this *AuthorizationEvidence) Clone() *AuthorizationEvidence
- func (this *AuthorizationEvidence) LastHop() *AuthorizationEvidenceHop
- func (this *AuthorizationEvidence) Policy() AuthorizationEvidencePolicy
- func (this *AuthorizationEvidence) Validate() error
- type AuthorizationEvidenceHop
- type AuthorizationEvidenceOrigin
- type AuthorizationEvidencePolicy
- type AuthorizationEvidenceProvider
- type AuthorizedKeyPolicy
- func AuthorizedKeyPolicyOf(auth Authorization) *AuthorizedKeyPolicy
- func ValidateAuthorizationEvidenceCertificate(evidence *AuthorizationEvidence, certificate *ssh.Certificate, username string, ...) (*AuthorizedKeyPolicy, error)
- func ValidateBifroestDelegationEvidence(evidence *AuthorizationEvidence, certificate *ssh.Certificate, username string, ...) (*AuthorizedKeyPolicy, error)
- type Authorizer
- type AuthorizerFacade
- func (this *AuthorizerFacade) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *AuthorizerFacade) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *AuthorizerFacade) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (this *AuthorizerFacade) Close() (rErr error)
- func (this *AuthorizerFacade) OidcRefreshAuthorizer(flow configuration.FlowName) *OidcDeviceAuthAuthorizer
- func (this *AuthorizerFacade) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
- type AuthorizerFactory
- type BifroestAuthorization
- func (this *BifroestAuthorization) AuthorizationEvidence() *AuthorizationEvidence
- func (*BifroestAuthorization) AuthorizationKind() string
- func (this *BifroestAuthorization) AuthorizedKeyPolicy() *AuthorizedKeyPolicy
- func (this *BifroestAuthorization) Dispose(ctx context.Context) (bool, error)
- func (*BifroestAuthorization) EnvVars() sys.EnvVars
- func (this *BifroestAuthorization) FindSession() session.Session
- func (*BifroestAuthorization) FindSessionsPublicKey() ssh.PublicKey
- func (this *BifroestAuthorization) Flow() configuration.FlowName
- func (this *BifroestAuthorization) GetField(name string, ce ContextEnabled) (any, bool, error)
- func (*BifroestAuthorization) IsAuthorized() bool
- func (this *BifroestAuthorization) Remote() net.Remote
- type BifroestAuthorizer
- func (this *BifroestAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *BifroestAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *BifroestAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (*BifroestAuthorizer) Close() error
- func (this *BifroestAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
- func (*BifroestAuthorizer) SupportsUserCertificates()
- type CloseableAuthorizer
- type ContextEnabled
- type FlowAuthorizationMethod
- type FlowAuthorizationObservation
- type FlowAuthorizationObserver
- type FlowAuthorizationOutcome
- type FlowAuthorizationPhase
- type HtpasswdAuthorizer
- func (this *HtpasswdAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *HtpasswdAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *HtpasswdAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (this *HtpasswdAuthorizer) Close() error
- func (this *HtpasswdAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
- type InteractiveRequest
- type LocalAuthorizer
- func (this *LocalAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *LocalAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *LocalAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (this *LocalAuthorizer) Close() error
- func (this *LocalAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
- func (*LocalAuthorizer) SupportsUserCertificates()
- type NoneAuthorizer
- func (this *NoneAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *NoneAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *NoneAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (this *NoneAuthorizer) Close() error
- func (this *NoneAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, _ *RestoreOpts) (Authorization, error)
- type OidcDeviceAuthAuthorizer
- func (this *OidcDeviceAuthAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *OidcDeviceAuthAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *OidcDeviceAuthAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (this *OidcDeviceAuthAuthorizer) Close() error
- func (this *OidcDeviceAuthAuthorizer) NextRefreshAt(ctx context.Context, sess session.Session) (time.Time, error)
- func (this *OidcDeviceAuthAuthorizer) RefreshSession(ctx context.Context, sess session.Session) (next time.Time, lost bool, err error)
- func (this *OidcDeviceAuthAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
- func (this *OidcDeviceAuthAuthorizer) VerificationDeadline(ctx context.Context, sess session.Session) (time.Time, error)
- type OidcIdToken
- type OidcToken
- type OidcUserInfo
- type PasswordRequest
- type PublicKeyRequest
- type Request
- type RestoreOpts
- type SimpleAuthorizer
- func (this *SimpleAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
- func (this *SimpleAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
- func (this *SimpleAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
- func (this *SimpleAuthorizer) Close() error
- func (this *SimpleAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
- func (*SimpleAuthorizer) SupportsUserCertificates()
Constants ¶
View Source
const ( AuthorizationEvidenceSchema = "bifroest.authorization-evidence/v1" AuthorizationEvidenceExtension = "evidence-v1@bifroest.engity.org" BifroestDelegationCriticalOption = "bifroest-delegation@bifroest.engity.org" MaxAuthorizationEvidenceSize = 4 * 1024 MaxAuthorizationEvidenceHops = 8 )
Variables ¶
View Source
var ( ErrNoSuchAuthorization = errors.New("no such authorization") // ErrUnusableAuthorizationToken marks persisted local token data that cannot // become restorable without changing that token or the running configuration. ErrUnusableAuthorizationToken = errors.New("unusable persisted authorization token") )
Functions ¶
func EncodeAuthorizationEvidence ¶
func EncodeAuthorizationEvidence(evidence *AuthorizationEvidence) ([]byte, error)
func IsAgentForwardingAllowed ¶ added in v0.7.7
func IsAgentForwardingAllowed(auth Authorization) bool
func KindOf ¶
func KindOf(auth Authorization) string
Types ¶
type Authorization ¶
type Authorization interface {
IsAuthorized() bool
EnvVars() sys.EnvVars
Flow() configuration.FlowName
Remote() net.Remote
FindSession() session.Session
FindSessionsPublicKey() ssh.PublicKey
Dispose(context.Context) (bool, error)
}
func Forbidden ¶
func Forbidden(remote net.Remote) Authorization
type AuthorizationEvidence ¶
type AuthorizationEvidence struct {
Schema string `json:"schema"`
Origin AuthorizationEvidenceOrigin `json:"origin"`
Hops []AuthorizationEvidenceHop `json:"hops"`
}
func AuthorizationEvidenceOf ¶
func AuthorizationEvidenceOf(auth Authorization) *AuthorizationEvidence
func DecodeAuthorizationEvidence ¶
func DecodeAuthorizationEvidence(raw []byte) (*AuthorizationEvidence, error)
func (*AuthorizationEvidence) Append ¶
func (this *AuthorizationEvidence) Append(hop AuthorizationEvidenceHop) error
func (*AuthorizationEvidence) Clone ¶
func (this *AuthorizationEvidence) Clone() *AuthorizationEvidence
func (*AuthorizationEvidence) LastHop ¶
func (this *AuthorizationEvidence) LastHop() *AuthorizationEvidenceHop
func (*AuthorizationEvidence) Policy ¶
func (this *AuthorizationEvidence) Policy() AuthorizationEvidencePolicy
func (*AuthorizationEvidence) Validate ¶
func (this *AuthorizationEvidence) Validate() error
type AuthorizationEvidenceHop ¶
type AuthorizationEvidenceHop struct {
CaFingerprint string `json:"caFingerprint"`
SubjectKeyFingerprint string `json:"subjectKeyFingerprint"`
Serial uint64 `json:"serial"`
KeyId string `json:"keyId"`
SessionId string `json:"sessionId"`
Flow string `json:"flow"`
AuthorizationKind string `json:"authorizationKind"`
Audience string `json:"audience,omitempty"`
TargetUser string `json:"targetUser"`
IssuedAt time.Time `json:"issuedAt"`
ValidAfter time.Time `json:"validAfter"`
ValidBefore time.Time `json:"validBefore"`
PtyAllowed bool `json:"ptyAllowed"`
PortForwardingAllowed bool `json:"portForwardingAllowed"`
AgentForwardingAllowed bool `json:"agentForwardingAllowed"`
}
type AuthorizationEvidenceOrigin ¶
type AuthorizationEvidencePolicy ¶
type AuthorizationEvidenceProvider ¶
type AuthorizationEvidenceProvider interface {
AuthorizationEvidence() *AuthorizationEvidence
}
type AuthorizedKeyPolicy ¶ added in v0.7.7
type AuthorizedKeyPolicy struct {
ForcedCommand *string
Environment sys.EnvVars
PtyAllowed bool
PortForwardingAllowed bool
AgentForwardingAllowed bool
// contains filtered or unexported fields
}
func AuthorizedKeyPolicyOf ¶ added in v0.7.7
func AuthorizedKeyPolicyOf(auth Authorization) *AuthorizedKeyPolicy
func ValidateAuthorizationEvidenceCertificate ¶
func ValidateAuthorizationEvidenceCertificate(evidence *AuthorizationEvidence, certificate *ssh.Certificate, username string, now time.Time) (*AuthorizedKeyPolicy, error)
func ValidateBifroestDelegationEvidence ¶
func ValidateBifroestDelegationEvidence(evidence *AuthorizationEvidence, certificate *ssh.Certificate, username string, audiences []string, maxValidity time.Duration, now time.Time) (*AuthorizedKeyPolicy, error)
func (*AuthorizedKeyPolicy) AllowsListen ¶ added in v0.7.7
func (this *AuthorizedKeyPolicy) AllowsListen(host string, port uint32) bool
func (*AuthorizedKeyPolicy) AllowsOpen ¶ added in v0.7.7
func (this *AuthorizedKeyPolicy) AllowsOpen(dest bnet.HostPort) bool
func (*AuthorizedKeyPolicy) HasPortForwardingDestinationRestrictions ¶
func (this *AuthorizedKeyPolicy) HasPortForwardingDestinationRestrictions() bool
type Authorizer ¶
type Authorizer interface {
AuthorizePublicKey(PublicKeyRequest) (Authorization, error)
AuthorizePassword(PasswordRequest) (Authorization, error)
AuthorizeInteractive(InteractiveRequest) (Authorization, error)
// RestoreFromSession tries to restore the existing authorization from the given
// session.Session. If the given session does not contain enough information to restore
// the Authorization ErrNoSuchAuthorization is returned.
RestoreFromSession(context.Context, session.Session, *RestoreOpts) (Authorization, error)
}
type AuthorizerFacade ¶
type AuthorizerFacade struct {
// contains filtered or unexported fields
}
func NewAuthorizerFacade ¶
func NewAuthorizerFacade(ctx context.Context, flows *configuration.Flows) (*AuthorizerFacade, error)
func NewAuthorizerFacadeWithObserver ¶
func NewAuthorizerFacadeWithObserver(ctx context.Context, flows *configuration.Flows, observer FlowAuthorizationObserver) (*AuthorizerFacade, error)
func (*AuthorizerFacade) AuthorizeInteractive ¶
func (this *AuthorizerFacade) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*AuthorizerFacade) AuthorizePassword ¶
func (this *AuthorizerFacade) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*AuthorizerFacade) AuthorizePublicKey ¶
func (this *AuthorizerFacade) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*AuthorizerFacade) Close ¶
func (this *AuthorizerFacade) Close() (rErr error)
func (*AuthorizerFacade) OidcRefreshAuthorizer ¶
func (this *AuthorizerFacade) OidcRefreshAuthorizer(flow configuration.FlowName) *OidcDeviceAuthAuthorizer
func (*AuthorizerFacade) RestoreFromSession ¶
func (this *AuthorizerFacade) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
type AuthorizerFactory ¶ added in v0.2.0
type AuthorizerFactory[C any, A CloseableAuthorizer] func(ctx context.Context, flow configuration.FlowName, conf C) (A, error)
func RegisterAuthorizer ¶ added in v0.2.0
func RegisterAuthorizer[C any, A CloseableAuthorizer](factory AuthorizerFactory[C, A]) AuthorizerFactory[C, A]
type BifroestAuthorization ¶
type BifroestAuthorization struct {
// contains filtered or unexported fields
}
func (*BifroestAuthorization) AuthorizationEvidence ¶
func (this *BifroestAuthorization) AuthorizationEvidence() *AuthorizationEvidence
func (*BifroestAuthorization) AuthorizationKind ¶
func (*BifroestAuthorization) AuthorizationKind() string
func (*BifroestAuthorization) AuthorizedKeyPolicy ¶
func (this *BifroestAuthorization) AuthorizedKeyPolicy() *AuthorizedKeyPolicy
func (*BifroestAuthorization) Dispose ¶
func (this *BifroestAuthorization) Dispose(ctx context.Context) (bool, error)
func (*BifroestAuthorization) EnvVars ¶
func (*BifroestAuthorization) EnvVars() sys.EnvVars
func (*BifroestAuthorization) FindSession ¶
func (this *BifroestAuthorization) FindSession() session.Session
func (*BifroestAuthorization) FindSessionsPublicKey ¶
func (*BifroestAuthorization) FindSessionsPublicKey() ssh.PublicKey
func (*BifroestAuthorization) Flow ¶
func (this *BifroestAuthorization) Flow() configuration.FlowName
func (*BifroestAuthorization) GetField ¶
func (this *BifroestAuthorization) GetField(name string, ce ContextEnabled) (any, bool, error)
func (*BifroestAuthorization) IsAuthorized ¶
func (*BifroestAuthorization) IsAuthorized() bool
func (*BifroestAuthorization) Remote ¶
func (this *BifroestAuthorization) Remote() net.Remote
type BifroestAuthorizer ¶
type BifroestAuthorizer struct {
// contains filtered or unexported fields
}
func NewBifroest ¶
func NewBifroest(_ context.Context, flow configuration.FlowName, conf *configuration.AuthorizationBifroest) (*BifroestAuthorizer, error)
func (*BifroestAuthorizer) AuthorizeInteractive ¶
func (this *BifroestAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*BifroestAuthorizer) AuthorizePassword ¶
func (this *BifroestAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*BifroestAuthorizer) AuthorizePublicKey ¶
func (this *BifroestAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*BifroestAuthorizer) Close ¶
func (*BifroestAuthorizer) Close() error
func (*BifroestAuthorizer) RestoreFromSession ¶
func (this *BifroestAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
func (*BifroestAuthorizer) SupportsUserCertificates ¶
func (*BifroestAuthorizer) SupportsUserCertificates()
type CloseableAuthorizer ¶
type CloseableAuthorizer interface {
Authorizer
io.Closer
}
type ContextEnabled ¶
type FlowAuthorizationMethod ¶
type FlowAuthorizationMethod string
const ( FlowAuthorizationMethodPublicKey FlowAuthorizationMethod = "public-key" FlowAuthorizationMethodPassword FlowAuthorizationMethod = "password" FlowAuthorizationMethodKeyboardInteractive FlowAuthorizationMethod = "keyboard-interactive" )
type FlowAuthorizationObservation ¶
type FlowAuthorizationObservation struct {
Flow configuration.FlowName
ConnectionId string
SessionId string
Method FlowAuthorizationMethod
Phase FlowAuthorizationPhase
Outcome FlowAuthorizationOutcome
AuthorizationKind string
Err error
}
type FlowAuthorizationObserver ¶
type FlowAuthorizationObserver func(context.Context, FlowAuthorizationObservation) error
type FlowAuthorizationOutcome ¶
type FlowAuthorizationOutcome string
const ( FlowAuthorizationOutcomeAccepted FlowAuthorizationOutcome = "accepted" FlowAuthorizationOutcomeDenied FlowAuthorizationOutcome = "denied" FlowAuthorizationOutcomeFailed FlowAuthorizationOutcome = "failed" )
type FlowAuthorizationPhase ¶
type FlowAuthorizationPhase string
const ( FlowAuthorizationPhaseCandidate FlowAuthorizationPhase = "candidate" FlowAuthorizationPhaseVerified FlowAuthorizationPhase = "verified" )
type HtpasswdAuthorizer ¶ added in v0.2.0
func NewHtpasswd ¶ added in v0.2.0
func NewHtpasswd(_ context.Context, flow configuration.FlowName, conf *configuration.AuthorizationHtpasswd) (*HtpasswdAuthorizer, error)
func (*HtpasswdAuthorizer) AuthorizeInteractive ¶ added in v0.2.0
func (this *HtpasswdAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*HtpasswdAuthorizer) AuthorizePassword ¶ added in v0.2.0
func (this *HtpasswdAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*HtpasswdAuthorizer) AuthorizePublicKey ¶ added in v0.2.0
func (this *HtpasswdAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*HtpasswdAuthorizer) Close ¶ added in v0.2.0
func (this *HtpasswdAuthorizer) Close() error
func (*HtpasswdAuthorizer) RestoreFromSession ¶ added in v0.2.0
func (this *HtpasswdAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
type InteractiveRequest ¶
type LocalAuthorizer ¶
func NewLocal ¶
func NewLocal(ctx context.Context, flow configuration.FlowName, conf *configuration.AuthorizationLocal) (*LocalAuthorizer, error)
func (*LocalAuthorizer) AuthorizeInteractive ¶
func (this *LocalAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*LocalAuthorizer) AuthorizePassword ¶
func (this *LocalAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*LocalAuthorizer) AuthorizePublicKey ¶
func (this *LocalAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*LocalAuthorizer) Close ¶
func (this *LocalAuthorizer) Close() error
func (*LocalAuthorizer) RestoreFromSession ¶
func (this *LocalAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
func (*LocalAuthorizer) SupportsUserCertificates ¶
func (*LocalAuthorizer) SupportsUserCertificates()
type NoneAuthorizer ¶ added in v0.4.0
func NewNone ¶ added in v0.4.0
func NewNone(_ context.Context, flow configuration.FlowName, conf *configuration.AuthorizationNone) (*NoneAuthorizer, error)
func (*NoneAuthorizer) AuthorizeInteractive ¶ added in v0.4.0
func (this *NoneAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*NoneAuthorizer) AuthorizePassword ¶ added in v0.4.0
func (this *NoneAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*NoneAuthorizer) AuthorizePublicKey ¶ added in v0.4.0
func (this *NoneAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*NoneAuthorizer) Close ¶ added in v0.4.0
func (this *NoneAuthorizer) Close() error
func (*NoneAuthorizer) RestoreFromSession ¶ added in v0.4.0
func (this *NoneAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, _ *RestoreOpts) (Authorization, error)
type OidcDeviceAuthAuthorizer ¶
type OidcDeviceAuthAuthorizer struct {
Logger log.Logger
OnVerified func(session.Session, time.Time)
OnLostAccess func(session.Session)
// contains filtered or unexported fields
}
func NewOidcDeviceAuth ¶
func NewOidcDeviceAuth(ctx context.Context, flow configuration.FlowName, conf *configuration.AuthorizationOidcDeviceAuth) (*OidcDeviceAuthAuthorizer, error)
func (*OidcDeviceAuthAuthorizer) AuthorizeInteractive ¶
func (this *OidcDeviceAuthAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*OidcDeviceAuthAuthorizer) AuthorizePassword ¶
func (this *OidcDeviceAuthAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*OidcDeviceAuthAuthorizer) AuthorizePublicKey ¶
func (this *OidcDeviceAuthAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*OidcDeviceAuthAuthorizer) Close ¶
func (this *OidcDeviceAuthAuthorizer) Close() error
func (*OidcDeviceAuthAuthorizer) NextRefreshAt ¶
func (*OidcDeviceAuthAuthorizer) RefreshSession ¶
func (this *OidcDeviceAuthAuthorizer) RefreshSession(ctx context.Context, sess session.Session) (next time.Time, lost bool, err error)
RefreshSession serializes token exchange and persistence with reconnects for this authorizer.
func (*OidcDeviceAuthAuthorizer) RestoreFromSession ¶
func (this *OidcDeviceAuthAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
func (*OidcDeviceAuthAuthorizer) VerificationDeadline ¶
func (this *OidcDeviceAuthAuthorizer) VerificationDeadline(ctx context.Context, sess session.Session) (time.Time, error)
VerificationDeadline returns the persisted grant's absolute verification deadline without contacting the provider.
type OidcIdToken ¶
type OidcUserInfo ¶
type PasswordRequest ¶
type PublicKeyRequest ¶
type Request ¶
type Request interface {
Sessions() session.Repository
Connection() connection.Connection
Context() essh.Context
Validate(Authorization) (bool, error)
}
type RestoreOpts ¶
type RestoreOpts struct {
// AutoCleanUpAllowed tells the Authorizer to clean up everything
// automatically while executing the search. The requester will never
// see the requested result. This is false by default because it could
// lead to quite performance impacts or other unwanted side effects.
//
// Therefore: Use with caution.
AutoCleanUpAllowed *bool
// Logger will be used (if any log is required) instead of the standard logger.
Logger log.Logger
}
RestoreOpts adds some more hints what should happen when find methods of Repository are executed.
func (*RestoreOpts) IsAutoCleanUpAllowed ¶
func (this *RestoreOpts) IsAutoCleanUpAllowed() bool
type SimpleAuthorizer ¶ added in v0.2.0
func NewSimple ¶ added in v0.2.0
func NewSimple(_ context.Context, flow configuration.FlowName, conf *configuration.AuthorizationSimple) (*SimpleAuthorizer, error)
func (*SimpleAuthorizer) AuthorizeInteractive ¶ added in v0.2.0
func (this *SimpleAuthorizer) AuthorizeInteractive(req InteractiveRequest) (Authorization, error)
func (*SimpleAuthorizer) AuthorizePassword ¶ added in v0.2.0
func (this *SimpleAuthorizer) AuthorizePassword(req PasswordRequest) (Authorization, error)
func (*SimpleAuthorizer) AuthorizePublicKey ¶ added in v0.2.0
func (this *SimpleAuthorizer) AuthorizePublicKey(req PublicKeyRequest) (Authorization, error)
func (*SimpleAuthorizer) Close ¶ added in v0.2.0
func (this *SimpleAuthorizer) Close() error
func (*SimpleAuthorizer) RestoreFromSession ¶ added in v0.2.0
func (this *SimpleAuthorizer) RestoreFromSession(ctx context.Context, sess session.Session, opts *RestoreOpts) (Authorization, error)
func (*SimpleAuthorizer) SupportsUserCertificates ¶
func (*SimpleAuthorizer) SupportsUserCertificates()
Source Files
¶
- authorization.go
- authorized-key-policy.go
- authorizer.go
- bifroest-authorizer.go
- bifroest.go
- context.go
- evidence.go
- facade-authorizer.go
- htpasswd-authorizer.go
- htpasswd.go
- kind.go
- local-authorizer.go
- local-authorizer_with_pam.go
- local.go
- none-authorizer.go
- none.go
- oidc-device-auth-authorizer.go
- oidc.go
- request.go
- simple-authorizer.go
- simple.go
- user-certificate.go
Click to show internal directories.
Click to hide internal directories.