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 ¶
func (s AuthServer) Check(ctx context.Context, request *externalAuth.CheckRequest) (*externalAuth.CheckResponse, error)
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 )
Click to show internal directories.
Click to hide internal directories.