authenticators

package
v0.0.0-...-b5002bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthenticationFailedErr = errors.New("Authentication failed")
View Source
var CFUserRegex *regexp.Regexp = regexp.MustCompile(`cf:([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})/(\d+)`)
View Source
var DiegoUserRegex *regexp.Regexp = regexp.MustCompile(`diego:([a-zA-Z0-9_-]+)/(\d+)`)
View Source
var FetchAppFailedErr = errors.New("Fetching application data failed")
View Source
var InvalidCCResponse = errors.New("Invalid response from Cloud Controller")
View Source
var InvalidCredentialsErr error = errors.New("Invalid credentials")
View Source
var InvalidDomainErr error = errors.New("Invalid authentication domain")
View Source
var InvalidRequestErr = errors.New("CloudController URL Invalid")
View Source
var InvalidUserFormatErr = errors.New("Invalid user format")
View Source
var NotDiegoErr = errors.New("Diego Not Enabled")
View Source
var RouteNotFoundErr error = errors.New("SSH routing info not found")
View Source
var SSHDisabledErr = errors.New("SSH Disabled")

Functions

This section is empty.

Types

type AppSSHResponse

type AppSSHResponse struct {
	ProcessGuid string `json:"process_guid"`
}

type CFAuthenticator

type CFAuthenticator struct {
	// contains filtered or unexported fields
}

func NewCFAuthenticator

func NewCFAuthenticator(
	logger lager.Logger,
	httpClient *http.Client,
	ccURL string,
	uaaTokenURL string,
	uaaUsername string,
	uaaPassword string,
	permissionsBuilder PermissionsBuilder,
) *CFAuthenticator

func (*CFAuthenticator) Authenticate

func (cfa *CFAuthenticator) Authenticate(metadata ssh.ConnMetadata, password []byte) (*ssh.Permissions, error)

func (*CFAuthenticator) UserRegexp

func (cfa *CFAuthenticator) UserRegexp() *regexp.Regexp

type CompositeAuthenticator

type CompositeAuthenticator struct {
	// contains filtered or unexported fields
}

func NewCompositeAuthenticator

func NewCompositeAuthenticator(passwordAuthenticators ...PasswordAuthenticator) *CompositeAuthenticator

func (*CompositeAuthenticator) Authenticate

func (a *CompositeAuthenticator) Authenticate(metadata ssh.ConnMetadata, password []byte) (*ssh.Permissions, error)

type DiegoProxyAuthenticator

type DiegoProxyAuthenticator struct {
	// contains filtered or unexported fields
}

func NewDiegoProxyAuthenticator

func NewDiegoProxyAuthenticator(
	logger lager.Logger,
	credentials []byte,
	permissionsBuilder PermissionsBuilder,
) *DiegoProxyAuthenticator

func (*DiegoProxyAuthenticator) Authenticate

func (dpa *DiegoProxyAuthenticator) Authenticate(metadata ssh.ConnMetadata, password []byte) (*ssh.Permissions, error)

func (*DiegoProxyAuthenticator) UserRegexp

func (dpa *DiegoProxyAuthenticator) UserRegexp() *regexp.Regexp

type PasswordAuthenticator

type PasswordAuthenticator interface {
	UserRegexp() *regexp.Regexp
	Authenticate(metadata ssh.ConnMetadata, password []byte) (*ssh.Permissions, error)
}

type PermissionsBuilder

type PermissionsBuilder interface {
	Build(logger lager.Logger, processGuid string, index int, metadata ssh.ConnMetadata) (*ssh.Permissions, error)
}

func NewPermissionsBuilder

func NewPermissionsBuilder(bbsClient bbs.InternalClient, useDirectInstanceAddr bool) PermissionsBuilder

type PublicKeyAuthenticator

type PublicKeyAuthenticator interface {
	Authenticate(metadata ssh.ConnMetadata, publicKey ssh.PublicKey) (*ssh.Permissions, error)
	PublicKey() ssh.PublicKey
}

func NewPublicKeyAuthenticator

func NewPublicKeyAuthenticator(publicKey ssh.PublicKey) PublicKeyAuthenticator

type UAAAuthTokenResponse

type UAAAuthTokenResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL