auth

package
v0.0.0-...-d9b5379 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PDP will lookup ingress authenticators
	AuthStageIngress = "ingress" // Gateway Auth

	// Tap will lookup egress authenticators
	AuthStageEgress = "egress" // Upstream Auth

	AuthIdentityTypeAnonymous = "Anonymous"
	AuthIdentityTypeBasicAuth = "BasicAuth"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticatedIdentity

type AuthenticatedIdentity interface {
	Type() string
	OrgId() string
	ProjectId() string
	UserId() string
	Name() string
}

Authenticated identity used in Ingress auth

func AnonymousIdentity

func AnonymousIdentity() AuthenticatedIdentity

type AuthenticationCredential

type AuthenticationCredential interface {
	ProjectId() string
	OrgId() string
	UserId() string
	UserSecret() string
}

A provided or obtained credential for authentication

type AuthenticationCredentialApplier

type AuthenticationCredentialApplier interface {
	Apply(AuthenticationCredential) error
}

Apply credentials to outgoing request to repo

type AuthenticationCredentialProvider

type AuthenticationCredentialProvider interface {
	Credential() (AuthenticationCredential, error)
}

Adapter to wrap Envoy request to get credentials

type AuthenticationProvider

type AuthenticationProvider interface {
	IngressAuthService(common_models.ArtefactUpStream) (IngressAuthenticationService, error)
	EgressAuthService(common_models.ArtefactRepository) (EgressAuthenticationService, error)
}

func NewAuthenticationProvider

func NewAuthenticationProvider() AuthenticationProvider

type EgressAuthenticationService

type EgressAuthenticationService interface {
	Authenticate(context.Context, AuthenticationCredentialApplier) error
}

Authenticate upstream repo request

type IngressAuthenticationService

type IngressAuthenticationService interface {
	Authenticate(context.Context, AuthenticationCredentialProvider) (AuthenticatedIdentity, error)
}

Authentication for gateway users

func NewIngressNoAuthService

func NewIngressNoAuthService() (IngressAuthenticationService, error)

Jump to

Keyboard shortcuts

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