auth

package
v0.0.0-...-b174aa1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JWTsvidHeaderKey = "authorization"
)

JWTsvidHeaderKey is the header key of the JWT-SVID @TODO: Ask which will be the best name for this header: should it be custom or should we use: 'authorization'?

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthServer

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

AuthServer implements externalAuth.AuthorizationServer interface

func NewAuthServer

func NewAuthServer(log *logrus.Logger, spiffeIDs []string, mode Mode, udsPath string, audience string) (*AuthServer, error)

NewAuthServer creates a new Auth server according to the given config

func (AuthServer) Check

Check will behave in three differents ways according to the 'mode' value in AuthServer

type Mode

type Mode int

Mode type will define how this service will behave

const (
	// FrontEnd Mode will insert JWT in header
	FrontEnd Mode = 1 + iota
	// BackEnd Mode will validate JWT header
	BackEnd
	// BothInsecure make the service to figure it out if it should behave as BK or FE
	// However, it is insecure. @TODO: find a secure way of doing smart mode selection.
	BothInsecure
)

func (Mode) String

func (m Mode) String() string

Jump to

Keyboard shortcuts

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