spire

package
v0.0.0-...-19b6972 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClient

type AuthClient struct {
	Ready bool
	// contains filtered or unexported fields
}

AuthClient is the struct that carries the data needed to communicate with spire-agent in the http handler

func NewAuthClient

func NewAuthClient(ctx context.Context, socketPath string) (AuthClient, error)

NewAuthClient returns AuthClient for communicating with spire-agent

func (AuthClient) Fetch

func (s AuthClient) Fetch(ctx context.Context, spiffeID string, egressAudience string) (string, error)

Fetch uses AuthClient to fetch JWT-SVIDs from spire-agent, returns a JWT-SVID

func (AuthClient) Validate

func (s AuthClient) Validate(ctx context.Context, svid string, identifier string) (bool, string, error)

Validate uses AuthClient to validate JWT-SVIDs with spire-agent, also returns subject contained in the JWT-SVID

type HealthCheck

type HealthCheck interface {
	RunCheck(ctx context.Context) (bool, error)
}

HealthCheck interface to the health check stuff

type HealthConfig

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

HealthConfig is the config for the health check

func NewHealthConfig

func NewHealthConfig(socketPath string) (HealthConfig, error)

NewHealthConfig do the thing

func (HealthConfig) RunCheck

func (h HealthConfig) RunCheck(ctx context.Context) (bool, error)

RunCheck checks to see if spire-agent is running

type JWTSVID

type JWTSVID interface {
	Fetch(ctx context.Context, spiffeID string, egressAudience string) (string, error)
	Validate(ctx context.Context, svid string, identifier string) (bool, string, error)
}

JWTSVID is the interface for the JWT stuff

Jump to

Keyboard shortcuts

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