auxdata

package
v0.9.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuxData

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

func New

func New(ctx context.Context) (*AuxData, error)

func NewFromConf

func NewFromConf(ctx context.Context, conf *Conf) *AuxData

func NewWithoutVerification

func NewWithoutVerification(ctx context.Context) *AuxData

func (*AuxData) Extract

func (ad *AuxData) Extract(ctx context.Context, adProto *requestv1.AuxData) (*enginev1.AuxData, error)

Extract auxiliary data and convert to format expected by the engine.

type Conf

type Conf struct {
	// JWT holds the configuration for JWTs used as an auxiliary data source for the engine.
	JWT *JWTConf `yaml:"jwt"`
}

func (*Conf) Key

func (c *Conf) Key() string

func (*Conf) Validate

func (c *Conf) Validate() (errs error)

type JWTConf

type JWTConf struct {
	// KeySets is the list of keysets to be used to verify tokens.
	KeySets []JWTKeySet `yaml:"keySets"`
	// DisableVerification disables JWT verification.
	DisableVerification bool `yaml:"disableVerification"`
}

type JWTKeySet

type JWTKeySet struct {
	// ID is the unique reference to this keyset.
	ID string `yaml:"id"`
	// Remote defines a remote keyset. Mutually exclusive with Local.
	Remote *RemoteSource `yaml:"remote"`
	// Local defines a local keyset. Mutually exclusive with Remote.
	Local *LocalSource `yaml:"local"`
}

type LocalSource

type LocalSource struct {
	// Data is the encoded JWK data for this keyset. Mutually exclusive with File.
	Data string `yaml:"data"`
	// File is the path to file containing JWK data. Mutually exclusive with Data.
	File string `yaml:"file"`
	// PEM indicates that the data is PEM encoded.
	PEM bool `yaml:"pem"`
}

type RemoteSource

type RemoteSource struct {
	// URL is the JWKS URL to fetch the keyset from.
	URL string `yaml:"url"`
	// RefreshInterval is the refresh interval for the keyset.
	RefreshInterval time.Duration `yaml:"refreshInterval"`
}

Jump to

Keyboard shortcuts

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