models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationConfig added in v0.0.1

type AuthenticationConfig struct {
	Issuer             string `yaml:"issuer"`
	Audience           string `yaml:"audience"`
	ClockSkewInSeconds int    `yaml:"clockSkewInSeconds"`
}

AuthenticationConfig holds JWT validation related parameters

type ClaimPolicyConfig added in v0.0.1

type ClaimPolicyConfig map[string][]ClaimRequirement

ClaimPolicyConfig is a type alias for claimPolicies section

type ClaimRequirement

type ClaimRequirement struct {
	Claim  string   `yaml:"claim"`
	Values []string `yaml:"values"`
}

ClaimRequirement is a key-value pair for a given claim constraint. When multiple claim values are provided, these values are effectively ORed.

type Config

type Config struct {
	Server         ServerConfig         `yaml:"server"`
	Authentication AuthenticationConfig `yaml:"authentication"`
	ClaimPolicies  ClaimPolicyConfig    `yaml:"claimPolicies"`
	RoutePolicies  RoutePolicyConfig    `yaml:"routePolicies"`
}

Config is the overall struct that matches the YAML structure

type OriginalRequestHeaders added in v0.0.1

type OriginalRequestHeaders struct {
	Method string `yaml:"method"`
	Path   string `yaml:"path"`
}

OriginalRequestHeaders contains headers to lookup for original request method and path details in the case where the auth request is a sub-request with distinct method and path

type RoutePolicy

type RoutePolicy struct {
	Path           string   `yaml:"path"`
	Methods        []string `yaml:"methods"`
	PolicyName     string   `yaml:"policyName"`
	AllowAnonymous bool     `yaml:"allowAnonymous"`
}

RoutePolicy matches a given path-method pair to a authorization policy

type RoutePolicyConfig added in v0.0.1

type RoutePolicyConfig []RoutePolicy

RoutePolicyConfig is a type alias for routePolicies section

type ServerConfig added in v0.0.1

type ServerConfig struct {
	OriginalRequestHeaders *OriginalRequestHeaders `yaml:"originalRequestHeaders"`
	UpstreamURL            string                  `yaml:"upstreamUrl"`
	ParsedURL              *url.URL                `yaml:"-"`
}

ServerConfig holds operation mode (auth server / reverse proxy) related parameters

Jump to

Keyboard shortcuts

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