jwt

package
v0.20.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimToHeader

type ClaimToHeader struct {
	// Claim name. for example, "sub"
	Claim string `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim,omitempty"`
	// The header the claim will be copied to. for example, "x-sub".
	Header string `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
	// If header exist, append to it, or set it.
	Append               bool     `protobuf:"varint,4,opt,name=append,proto3" json:"append,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Allows copying verified claims to headers sent upstream

func (*ClaimToHeader) Descriptor

func (*ClaimToHeader) Descriptor() ([]byte, []int)

func (*ClaimToHeader) Equal

func (this *ClaimToHeader) Equal(that interface{}) bool

func (*ClaimToHeader) GetAppend

func (m *ClaimToHeader) GetAppend() bool

func (*ClaimToHeader) GetClaim

func (m *ClaimToHeader) GetClaim() string

func (*ClaimToHeader) GetHeader

func (m *ClaimToHeader) GetHeader() string

func (*ClaimToHeader) ProtoMessage

func (*ClaimToHeader) ProtoMessage()

func (*ClaimToHeader) Reset

func (m *ClaimToHeader) Reset()

func (*ClaimToHeader) String

func (m *ClaimToHeader) String() string

func (*ClaimToHeader) XXX_DiscardUnknown

func (m *ClaimToHeader) XXX_DiscardUnknown()

func (*ClaimToHeader) XXX_Marshal

func (m *ClaimToHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClaimToHeader) XXX_Merge

func (m *ClaimToHeader) XXX_Merge(src proto.Message)

func (*ClaimToHeader) XXX_Size

func (m *ClaimToHeader) XXX_Size() int

func (*ClaimToHeader) XXX_Unmarshal

func (m *ClaimToHeader) XXX_Unmarshal(b []byte) error

type Jwks

type Jwks struct {
	// Types that are valid to be assigned to Jwks:
	//	*Jwks_Remote
	//	*Jwks_Local
	Jwks                 isJwks_Jwks `protobuf_oneof:"jwks"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Jwks) Descriptor

func (*Jwks) Descriptor() ([]byte, []int)

func (*Jwks) Equal

func (this *Jwks) Equal(that interface{}) bool

func (*Jwks) GetJwks

func (m *Jwks) GetJwks() isJwks_Jwks

func (*Jwks) GetLocal

func (m *Jwks) GetLocal() *LocalJwks

func (*Jwks) GetRemote

func (m *Jwks) GetRemote() *RemoteJwks

func (*Jwks) ProtoMessage

func (*Jwks) ProtoMessage()

func (*Jwks) Reset

func (m *Jwks) Reset()

func (*Jwks) String

func (m *Jwks) String() string

func (*Jwks) XXX_DiscardUnknown

func (m *Jwks) XXX_DiscardUnknown()

func (*Jwks) XXX_Marshal

func (m *Jwks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Jwks) XXX_Merge

func (m *Jwks) XXX_Merge(src proto.Message)

func (*Jwks) XXX_OneofWrappers

func (*Jwks) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Jwks) XXX_Size

func (m *Jwks) XXX_Size() int

func (*Jwks) XXX_Unmarshal

func (m *Jwks) XXX_Unmarshal(b []byte) error

type Jwks_Local

type Jwks_Local struct {
	Local *LocalJwks `protobuf:"bytes,2,opt,name=local,proto3,oneof" json:"local,omitempty"`
}

func (*Jwks_Local) Equal

func (this *Jwks_Local) Equal(that interface{}) bool

type Jwks_Remote

type Jwks_Remote struct {
	Remote *RemoteJwks `protobuf:"bytes,1,opt,name=remote,proto3,oneof" json:"remote,omitempty"`
}

func (*Jwks_Remote) Equal

func (this *Jwks_Remote) Equal(that interface{}) bool

type LocalJwks

type LocalJwks struct {
	// Inline key. this can be json web key, key-set or PEM format.
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LocalJwks) Descriptor

func (*LocalJwks) Descriptor() ([]byte, []int)

func (*LocalJwks) Equal

func (this *LocalJwks) Equal(that interface{}) bool

func (*LocalJwks) GetKey

func (m *LocalJwks) GetKey() string

func (*LocalJwks) ProtoMessage

func (*LocalJwks) ProtoMessage()

func (*LocalJwks) Reset

func (m *LocalJwks) Reset()

func (*LocalJwks) String

func (m *LocalJwks) String() string

func (*LocalJwks) XXX_DiscardUnknown

func (m *LocalJwks) XXX_DiscardUnknown()

func (*LocalJwks) XXX_Marshal

func (m *LocalJwks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalJwks) XXX_Merge

func (m *LocalJwks) XXX_Merge(src proto.Message)

func (*LocalJwks) XXX_Size

func (m *LocalJwks) XXX_Size() int

func (*LocalJwks) XXX_Unmarshal

func (m *LocalJwks) XXX_Unmarshal(b []byte) error

type Provider

type Provider struct {
	// The source for the keys to validate JWTs.
	Jwks *Jwks `protobuf:"bytes,1,opt,name=jwks,proto3" json:"jwks,omitempty"`
	// An incoming JWT must have an 'aud' claim and it must be in this list.
	Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"`
	// Issuer of the JWT. the 'iss' claim of the JWT must match this.
	Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// Where to find the JWT of the current provider.
	TokenSource *TokenSource `protobuf:"bytes,4,opt,name=token_source,json=tokenSource,proto3" json:"token_source,omitempty"`
	// Should the token forwarded upstream. if false, the header containing the token will be removed.
	KeepToken bool `protobuf:"varint,5,opt,name=keep_token,json=keepToken,proto3" json:"keep_token,omitempty"`
	// What claims should be copied to upstream headers.
	ClaimsToHeaders      []*ClaimToHeader `protobuf:"bytes,6,rep,name=claims_to_headers,json=claimsToHeaders,proto3" json:"claims_to_headers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Provider) Descriptor

func (*Provider) Descriptor() ([]byte, []int)

func (*Provider) Equal

func (this *Provider) Equal(that interface{}) bool

func (*Provider) GetAudiences

func (m *Provider) GetAudiences() []string

func (*Provider) GetClaimsToHeaders

func (m *Provider) GetClaimsToHeaders() []*ClaimToHeader

func (*Provider) GetIssuer

func (m *Provider) GetIssuer() string

func (*Provider) GetJwks

func (m *Provider) GetJwks() *Jwks

func (*Provider) GetKeepToken

func (m *Provider) GetKeepToken() bool

func (*Provider) GetTokenSource

func (m *Provider) GetTokenSource() *TokenSource

func (*Provider) ProtoMessage

func (*Provider) ProtoMessage()

func (*Provider) Reset

func (m *Provider) Reset()

func (*Provider) String

func (m *Provider) String() string

func (*Provider) XXX_DiscardUnknown

func (m *Provider) XXX_DiscardUnknown()

func (*Provider) XXX_Marshal

func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Provider) XXX_Merge

func (m *Provider) XXX_Merge(src proto.Message)

func (*Provider) XXX_Size

func (m *Provider) XXX_Size() int

func (*Provider) XXX_Unmarshal

func (m *Provider) XXX_Unmarshal(b []byte) error

type RemoteJwks

type RemoteJwks struct {
	// The url used when accessing the upstream for Json Web Key Set.
	// This is used to set the host and path in the request
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// The Upstream representing the Json Web Key Set server
	UpstreamRef *core.ResourceRef `protobuf:"bytes,2,opt,name=upstream_ref,json=upstreamRef,proto3" json:"upstream_ref,omitempty"`
	// Duration after which the cached JWKS should be expired.
	// If not specified, default cache duration is 5 minutes.
	CacheDuration        *types.Duration `protobuf:"bytes,4,opt,name=cache_duration,json=cacheDuration,proto3" json:"cache_duration,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*RemoteJwks) Descriptor

func (*RemoteJwks) Descriptor() ([]byte, []int)

func (*RemoteJwks) Equal

func (this *RemoteJwks) Equal(that interface{}) bool

func (*RemoteJwks) GetCacheDuration

func (m *RemoteJwks) GetCacheDuration() *types.Duration

func (*RemoteJwks) GetUpstreamRef

func (m *RemoteJwks) GetUpstreamRef() *core.ResourceRef

func (*RemoteJwks) GetUrl

func (m *RemoteJwks) GetUrl() string

func (*RemoteJwks) ProtoMessage

func (*RemoteJwks) ProtoMessage()

func (*RemoteJwks) Reset

func (m *RemoteJwks) Reset()

func (*RemoteJwks) String

func (m *RemoteJwks) String() string

func (*RemoteJwks) XXX_DiscardUnknown

func (m *RemoteJwks) XXX_DiscardUnknown()

func (*RemoteJwks) XXX_Marshal

func (m *RemoteJwks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoteJwks) XXX_Merge

func (m *RemoteJwks) XXX_Merge(src proto.Message)

func (*RemoteJwks) XXX_Size

func (m *RemoteJwks) XXX_Size() int

func (*RemoteJwks) XXX_Unmarshal

func (m *RemoteJwks) XXX_Unmarshal(b []byte) error

type RouteExtension

type RouteExtension struct {
	// Disable JWT checks on this route.
	Disable              bool     `protobuf:"varint,1,opt,name=disable,proto3" json:"disable,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RouteExtension) Descriptor

func (*RouteExtension) Descriptor() ([]byte, []int)

func (*RouteExtension) Equal

func (this *RouteExtension) Equal(that interface{}) bool

func (*RouteExtension) GetDisable

func (m *RouteExtension) GetDisable() bool

func (*RouteExtension) ProtoMessage

func (*RouteExtension) ProtoMessage()

func (*RouteExtension) Reset

func (m *RouteExtension) Reset()

func (*RouteExtension) String

func (m *RouteExtension) String() string

func (*RouteExtension) XXX_DiscardUnknown

func (m *RouteExtension) XXX_DiscardUnknown()

func (*RouteExtension) XXX_Marshal

func (m *RouteExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteExtension) XXX_Merge

func (m *RouteExtension) XXX_Merge(src proto.Message)

func (*RouteExtension) XXX_Size

func (m *RouteExtension) XXX_Size() int

func (*RouteExtension) XXX_Unmarshal

func (m *RouteExtension) XXX_Unmarshal(b []byte) error

type TokenSource

type TokenSource struct {
	// Try to retrieve token from these headers
	Headers []*TokenSource_HeaderSource `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// Try to retrieve token from these query params
	QueryParams          []string `protobuf:"bytes,2,rep,name=query_params,json=queryParams,proto3" json:"query_params,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Describes the location of a JWT token

func (*TokenSource) Descriptor

func (*TokenSource) Descriptor() ([]byte, []int)

func (*TokenSource) Equal

func (this *TokenSource) Equal(that interface{}) bool

func (*TokenSource) GetHeaders

func (m *TokenSource) GetHeaders() []*TokenSource_HeaderSource

func (*TokenSource) GetQueryParams

func (m *TokenSource) GetQueryParams() []string

func (*TokenSource) ProtoMessage

func (*TokenSource) ProtoMessage()

func (*TokenSource) Reset

func (m *TokenSource) Reset()

func (*TokenSource) String

func (m *TokenSource) String() string

func (*TokenSource) XXX_DiscardUnknown

func (m *TokenSource) XXX_DiscardUnknown()

func (*TokenSource) XXX_Marshal

func (m *TokenSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenSource) XXX_Merge

func (m *TokenSource) XXX_Merge(src proto.Message)

func (*TokenSource) XXX_Size

func (m *TokenSource) XXX_Size() int

func (*TokenSource) XXX_Unmarshal

func (m *TokenSource) XXX_Unmarshal(b []byte) error

type TokenSource_HeaderSource

type TokenSource_HeaderSource struct {
	// The name of the header. for example, "authorization"
	Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Prefix before the token. for example, "Bearer "
	Prefix               string   `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Describes how to retrieve a JWT from a header

func (*TokenSource_HeaderSource) Descriptor

func (*TokenSource_HeaderSource) Descriptor() ([]byte, []int)

func (*TokenSource_HeaderSource) Equal

func (this *TokenSource_HeaderSource) Equal(that interface{}) bool

func (*TokenSource_HeaderSource) GetHeader

func (m *TokenSource_HeaderSource) GetHeader() string

func (*TokenSource_HeaderSource) GetPrefix

func (m *TokenSource_HeaderSource) GetPrefix() string

func (*TokenSource_HeaderSource) ProtoMessage

func (*TokenSource_HeaderSource) ProtoMessage()

func (*TokenSource_HeaderSource) Reset

func (m *TokenSource_HeaderSource) Reset()

func (*TokenSource_HeaderSource) String

func (m *TokenSource_HeaderSource) String() string

func (*TokenSource_HeaderSource) XXX_DiscardUnknown

func (m *TokenSource_HeaderSource) XXX_DiscardUnknown()

func (*TokenSource_HeaderSource) XXX_Marshal

func (m *TokenSource_HeaderSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenSource_HeaderSource) XXX_Merge

func (m *TokenSource_HeaderSource) XXX_Merge(src proto.Message)

func (*TokenSource_HeaderSource) XXX_Size

func (m *TokenSource_HeaderSource) XXX_Size() int

func (*TokenSource_HeaderSource) XXX_Unmarshal

func (m *TokenSource_HeaderSource) XXX_Unmarshal(b []byte) error

type VhostExtension

type VhostExtension struct {
	// The source for the keys to validate JWTs.
	//
	// Deprecated: this field is deprecated, use `providers` instead.
	Jwks *Jwks `protobuf:"bytes,1,opt,name=jwks,proto3" json:"jwks,omitempty"`
	// An incoming JWT must have an 'aud' claim and it must be in this list.
	//
	// Deprecated: this field is deprecated, use `providers` instead.
	Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"`
	// Issuer of the JWT. the 'iss' claim of the JWT must match this.
	//
	// Deprecated: this field is deprecated, use `providers` instead.
	Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// Auth providers can be used instead of the fields above where more than one is required.
	// if this list is provided the fields above are ignored.
	Providers            map[string]*Provider `` /* 159-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*VhostExtension) Descriptor

func (*VhostExtension) Descriptor() ([]byte, []int)

func (*VhostExtension) Equal

func (this *VhostExtension) Equal(that interface{}) bool

func (*VhostExtension) GetAudiences

func (m *VhostExtension) GetAudiences() []string

func (*VhostExtension) GetIssuer

func (m *VhostExtension) GetIssuer() string

func (*VhostExtension) GetJwks

func (m *VhostExtension) GetJwks() *Jwks

func (*VhostExtension) GetProviders

func (m *VhostExtension) GetProviders() map[string]*Provider

func (*VhostExtension) ProtoMessage

func (*VhostExtension) ProtoMessage()

func (*VhostExtension) Reset

func (m *VhostExtension) Reset()

func (*VhostExtension) String

func (m *VhostExtension) String() string

func (*VhostExtension) XXX_DiscardUnknown

func (m *VhostExtension) XXX_DiscardUnknown()

func (*VhostExtension) XXX_Marshal

func (m *VhostExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VhostExtension) XXX_Merge

func (m *VhostExtension) XXX_Merge(src proto.Message)

func (*VhostExtension) XXX_Size

func (m *VhostExtension) XXX_Size() int

func (*VhostExtension) XXX_Unmarshal

func (m *VhostExtension) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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