Documentation
¶
Index ¶
- Constants
- func CompilePathPatterns(patterns []string) ([]*regexp.Regexp, error)
- type AuthzCheckAction
- type AuthzCheckDecision
- type AuthzCheckPolicy
- type AuthzCheckPolicyInput
- type AuthzServer
- type BasicAuthCredentialSource
- type BearerCredentialSource
- type CacheRefreshProbe
- type ClaimsFilterRegistry
- type Config
- type CookieCredentialSource
- type CredentialContext
- type CredentialExtraction
- type CredentialSource
- type CredentialSources
- type ExchangeServer
- type FormMarshaler
- func (m *FormMarshaler) ContentType(_ any) string
- func (m *FormMarshaler) Delimiter() []byte
- func (m *FormMarshaler) Marshal(v any) ([]byte, error)
- func (m *FormMarshaler) NewDecoder(r io.Reader) runtime.Decoder
- func (m *FormMarshaler) NewEncoder(w io.Writer) runtime.Encoder
- func (m *FormMarshaler) Unmarshal(data []byte, v any) error
- type ForwardedClientCertCredentialSource
- type HeaderCredentialSource
- type HeaderSpec
- type InitPopulationProbe
- type JWKSObserver
- type JWKSServer
- type JWKSServerConfig
- type LifecycleObserver
- type MuxConfigurer
- type NoOpCacheRefreshProbe
- type NoOpInitPopulationProbe
- type NoOpJWKSObserver
- type NoOpLifecycleObserver
- type NoOpServerObserver
- type NoOpStopProbe
- type Principal
- type Server
- type ServerObserver
- type StaticAuthenticatedOption
- type StaticAuthenticatedPolicy
- type StopProbe
- type StubClaimsFilterRegistry
- type TLSPeerInfo
- type TokenTypeSpec
Constants ¶
const ( CredentialSourceTypeBearer = "authorization_bearer_opaque" CredentialSourceTypeCookie = "cookie_bearer_opaque" CredentialSourceTypeBasicAuth = "authorization_basic_auth" CredentialSourceTypeHeader = "header" CredentialSourceTypeForwardedClientCert = "forwarded_client_cert_auth" )
Credential source type strings used in config.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthzCheckAction ¶ added in v0.2.0
type AuthzCheckAction string
AuthzCheckAction is the outcome an AuthzCheckPolicy selects.
const ( // AuthzCheckIssue means the server should build an IssueRequest and call // TokenService.IssueTokens. AuthzCheckIssue AuthzCheckAction = "issue" // AuthzCheckAllowWithoutIssue means the server should return OK without // issuing tokens. Credential headers are still sanitized when present. AuthzCheckAllowWithoutIssue AuthzCheckAction = "allow_without_issue" // AuthzCheckDeny means the server should return an authorization denial // without calling token issuers or datasources. AuthzCheckDeny AuthzCheckAction = "deny" )
type AuthzCheckDecision ¶ added in v0.2.0
type AuthzCheckDecision struct {
Action AuthzCheckAction
TokenTypes []TokenTypeSpec
Scope string
Reason string
}
AuthzCheckDecision is the result of evaluating an AuthzCheckPolicy. For Issue decisions, TokenTypes and Scope control the shape of the token request. For Deny decisions, Reason is included in the denial response.
type AuthzCheckPolicy ¶ added in v0.2.0
type AuthzCheckPolicy interface {
Decide(ctx context.Context, in AuthzCheckPolicyInput) (AuthzCheckDecision, error)
}
AuthzCheckPolicy decides, given the ext_authz inputs, the shape of the token request and whether to invoke issuance at all.
Implementations must use the returned error only for evaluation failures (e.g. a CEL compilation error), not for policy denials. Deny is a normal policy outcome expressed via AuthzCheckDeny. The server fails closed on both, but observability must distinguish "policy denied this request" from "policy failed to evaluate."
type AuthzCheckPolicyInput ¶ added in v0.2.0
type AuthzCheckPolicyInput struct {
Subject Principal
Actor Principal
Request *request.RequestAttributes
}
AuthzCheckPolicyInput carries the principals and request context that the authz check policy uses to make its decision.
type AuthzServer ¶
type AuthzServer struct {
authv3.UnimplementedAuthorizationServer
// contains filtered or unexported fields
}
AuthzServer implements Envoy's ext_authz Authorization service
func NewAuthzServer ¶
func NewAuthzServer(trustStore trust.Store, tokenService *service.TokenService, policy AuthzCheckPolicy, credentialSources CredentialSources, observer service.AuthzCheckObserver) *AuthzServer
NewAuthzServer creates a new ext_authz server. policy decides, for each request, whether to issue tokens, allow without issue, or deny. If nil, a StaticAuthenticatedPolicy with default token types is used (preserving pre-policy behavior). credentialSources defines where credentials are extracted from for both subject and actor authentication.
func (*AuthzServer) Check ¶
func (s *AuthzServer) Check(ctx context.Context, req *authv3.CheckRequest) (*authv3.CheckResponse, error)
Check implements the ext_authz check endpoint
type BasicAuthCredentialSource ¶ added in v0.3.0
type BasicAuthCredentialSource struct {
SourceName string
}
BasicAuthCredentialSource extracts HTTP Basic Auth credentials from the Authorization header. It decodes the base64 value and splits it into username:password, returning a trust.BasicAuthCredential.
When the Authorization header is absent or uses a non-Basic scheme, Extract returns (nil, nil), allowing coexistence with other credential sources in the same chain.
func NewBasicAuthCredentialSource ¶ added in v0.3.0
func NewBasicAuthCredentialSource(name string) (*BasicAuthCredentialSource, error)
NewBasicAuthCredentialSource returns a BasicAuthCredentialSource with the given name. The name is required.
func (*BasicAuthCredentialSource) Extract ¶ added in v0.3.0
func (s *BasicAuthCredentialSource) Extract(_ context.Context, cc CredentialContext) (*CredentialExtraction, error)
type BearerCredentialSource ¶ added in v0.2.0
type BearerCredentialSource struct {
SourceName string
}
BearerCredentialSource extracts a bearer token from the Authorization header.
func NewBearerCredentialSource ¶ added in v0.2.0
func NewBearerCredentialSource(name string) (*BearerCredentialSource, error)
NewBearerCredentialSource returns a BearerCredentialSource with the given name. The name is required.
func (*BearerCredentialSource) Extract ¶ added in v0.2.0
func (s *BearerCredentialSource) Extract(_ context.Context, cc CredentialContext) (*CredentialExtraction, error)
type CacheRefreshProbe ¶
type CacheRefreshProbe interface {
CacheRefreshFailed(err error)
KeyConversionFailed(keyID string, err error)
End()
}
CacheRefreshProbe tracks a single JWKS cache refresh invocation. Implementations should embed NoOpCacheRefreshProbe for forward compatibility.
type ClaimsFilterRegistry ¶
type ClaimsFilterRegistry interface {
// GetFilter returns the ClaimsFilter for the given actor
// The filter determines which request_context claims the actor is allowed to provide
GetFilter(actor *trust.Result) (claims.ClaimsFilter, error)
}
ClaimsFilterRegistry determines which request_context claims an actor is allowed to provide This is a policy enforcement mechanism - different actors may be trusted to tell us about different aspects of the request
type Config ¶
type Config struct {
GRPCListener net.Listener
HTTPListener net.Listener
// GRPCDialOptions are extra dial options appended when the grpc-gateway
// dials the gRPC server. Use this to supply a custom dialer for
// in-memory transports (e.g. bufconn).
GRPCDialOptions []grpc.DialOption
AuthzServer *AuthzServer
ExchangeServer *ExchangeServer
JWKSServer *JWKSServer
// Observer for server lifecycle events. Defaults to NoOpServerObserver{} if nil.
Observer LifecycleObserver
// MuxConfigurer, when non-nil, is applied to the HTTP mux during Start
// to register additional handlers (e.g. /metrics for Prometheus scraping).
MuxConfigurer MuxConfigurer
}
Config contains server configuration. Callers must supply pre-created listeners; the server itself has no concept of port numbers.
type CookieCredentialSource ¶ added in v0.2.0
CookieCredentialSource extracts a bearer token from a named cookie.
func NewCookieCredentialSource ¶ added in v0.2.0
func NewCookieCredentialSource(name, cookieName string) (*CookieCredentialSource, error)
NewCookieCredentialSource returns a CookieCredentialSource with the given source name and cookie name. Both are required.
func (*CookieCredentialSource) Extract ¶ added in v0.2.0
func (s *CookieCredentialSource) Extract(_ context.Context, cc CredentialContext) (*CredentialExtraction, error)
type CredentialContext ¶ added in v0.2.0
type CredentialContext struct {
Headers map[string]string // normalized lowercase header keys
Cookies []*http.Cookie // parsed from the cookie header; nil when absent
TLSPeer *TLSPeerInfo // mTLS client cert info; nil when absent
}
CredentialContext holds the normalized context needed by CredentialSource implementations to extract credentials. Callers build a CredentialContext from their specific transport (Envoy CheckRequest, gRPC context, etc.) before credential extraction.
func CredentialContextFromCheckRequest ¶ added in v0.2.0
func CredentialContextFromCheckRequest(req *authv3.CheckRequest) (CredentialContext, error)
CredentialContextFromCheckRequest builds a CredentialContext from an Envoy ext_authz CheckRequest's HTTP attributes.
func CredentialContextFromGRPC ¶ added in v0.2.0
func CredentialContextFromGRPC(ctx context.Context) (CredentialContext, error)
CredentialContextFromGRPC builds a CredentialContext from a gRPC server context, extracting metadata headers and TLS peer certificate info.
type CredentialExtraction ¶ added in v0.2.0
type CredentialExtraction struct {
Credential trust.Credential
HeadersUsed []string
CookiesUsed []string
SourceName string
}
CredentialExtraction is the result of extracting a credential from a request. HeadersUsed lists whole headers that carried the credential (e.g. "authorization"). CookiesUsed lists individual cookie names that carried the credential. Callers decide what to do with this information (e.g. strip the headers, rewrite the Cookie header, etc.).
type CredentialSource ¶ added in v0.2.0
type CredentialSource interface {
// Returns (nil, nil) when no credential is found for this source.
Extract(ctx context.Context, cc CredentialContext) (*CredentialExtraction, error)
}
CredentialSource extracts a credential from a transport-neutral context. Implementations handle specific credential presentation protocols (bearer header, cookie, etc.).
type CredentialSources ¶ added in v0.2.0
type CredentialSources struct {
// contains filtered or unexported fields
}
CredentialSources is an ordered collection of CredentialSource instances. It iterates sources in priority order, returning the first successful extraction. This encapsulates the ordering and fallback semantics so callers don't manage slices directly.
func DefaultCredentialSources ¶ added in v0.2.0
func DefaultCredentialSources() CredentialSources
DefaultCredentialSources returns the default credential sources (authorization bearer only).
func NewCredentialSources ¶ added in v0.2.0
func NewCredentialSources(sources ...CredentialSource) CredentialSources
NewCredentialSources creates a CredentialSources from individual sources.
func (CredentialSources) Extract ¶ added in v0.2.0
func (cs CredentialSources) Extract(ctx context.Context, cc CredentialContext) (*CredentialExtraction, error)
Extract iterates the configured sources in order and returns the first successful extraction. Returns (nil, nil) when no source finds a credential. Errors from individual sources are collected and returned as a joined error when no source succeeds.
type ExchangeServer ¶
type ExchangeServer struct {
parsecv1.UnimplementedTokenExchangeServiceServer
// contains filtered or unexported fields
}
ExchangeServer implements the TokenExchange gRPC service
func NewExchangeServer ¶
func NewExchangeServer(trustStore trust.Store, tokenService *service.TokenService, claimsFilterRegistry ClaimsFilterRegistry, callerCredentialSources CredentialSources, observer service.TokenExchangeObserver) *ExchangeServer
NewExchangeServer creates a new token exchange server. callerCredentialSources defines where caller (actor) credentials are extracted from.
func (*ExchangeServer) Exchange ¶
func (s *ExchangeServer) Exchange(ctx context.Context, req *parsecv1.ExchangeRequest) (*parsecv1.ExchangeResponse, error)
Exchange implements the token exchange endpoint (RFC 8693)
type FormMarshaler ¶
type FormMarshaler struct {
// contains filtered or unexported fields
}
FormMarshaler implements runtime.Marshaler for application/x-www-form-urlencoded This is needed for RFC 8693 OAuth 2.0 Token Exchange compatibility
func NewFormMarshaler ¶
func NewFormMarshaler() *FormMarshaler
NewFormMarshaler creates a new form marshaler
func (*FormMarshaler) ContentType ¶
func (m *FormMarshaler) ContentType(_ any) string
ContentType returns the content type for this marshaler
func (*FormMarshaler) Delimiter ¶
func (m *FormMarshaler) Delimiter() []byte
Delimiter is not used for form encoding
func (*FormMarshaler) Marshal ¶
func (m *FormMarshaler) Marshal(v any) ([]byte, error)
Marshal converts a proto message to form-urlencoded format Note: This is used for responses, which should still be JSON for our use case
func (*FormMarshaler) NewDecoder ¶
func (m *FormMarshaler) NewDecoder(r io.Reader) runtime.Decoder
NewDecoder creates a decoder for form-urlencoded data
func (*FormMarshaler) NewEncoder ¶
func (m *FormMarshaler) NewEncoder(w io.Writer) runtime.Encoder
NewEncoder creates an encoder (returns JSON encoder for responses)
type ForwardedClientCertCredentialSource ¶ added in v0.7.0
type ForwardedClientCertCredentialSource struct {
SourceName string
SubjectHeader string
IssuerHeader string
}
ForwardedClientCertCredentialSource extracts certificate authentication credentials from proxy-forwarded headers. A TLS-terminating proxy (e.g., Akamai CDN) validates the client certificate and forwards the subject and issuer as headers. The header names are configurable.
When neither header is present, Extract returns (nil, nil), allowing coexistence with other credential sources in the same chain.
func NewForwardedClientCertCredentialSource ¶ added in v0.7.0
func NewForwardedClientCertCredentialSource(name, subjectHeader, issuerHeader string) (*ForwardedClientCertCredentialSource, error)
func (*ForwardedClientCertCredentialSource) Extract ¶ added in v0.7.0
func (s *ForwardedClientCertCredentialSource) Extract(_ context.Context, cc CredentialContext) (*CredentialExtraction, error)
type HeaderCredentialSource ¶ added in v0.7.0
type HeaderCredentialSource struct {
SourceName string
Headers []HeaderSpec
}
HeaderCredentialSource extracts a configurable set of headers from a request and passes them to validators as a generic HeaderCredential.
When none of the configured headers are present, Extract returns (nil, nil), allowing coexistence with other credential sources in the same chain.
func NewHeaderCredentialSource ¶ added in v0.7.0
func NewHeaderCredentialSource(name string, headers []HeaderSpec) (*HeaderCredentialSource, error)
func (*HeaderCredentialSource) Extract ¶ added in v0.7.0
func (s *HeaderCredentialSource) Extract(_ context.Context, cc CredentialContext) (*CredentialExtraction, error)
type HeaderSpec ¶ added in v0.7.0
type HeaderSpec struct {
Name string
}
HeaderSpec configures a single header for extraction.
type InitPopulationProbe ¶
type InitPopulationProbe interface {
InitialCachePopulationFailed(err error)
End()
}
InitPopulationProbe tracks the initial JWKS cache population in Start. Implementations should embed NoOpInitPopulationProbe for forward compatibility.
type JWKSObserver ¶
type JWKSObserver interface {
// InitPopulationStarted is called when the initial JWKS cache population begins in Start.
InitPopulationStarted(ctx context.Context) (context.Context, InitPopulationProbe)
// CacheRefreshStarted is called when a JWKS cache build or refresh begins.
CacheRefreshStarted(ctx context.Context) (context.Context, CacheRefreshProbe)
}
JWKSObserver is called at key points during JWKS cache operations. Implementations should embed NoOpJWKSObserver for forward compatibility with new methods added to this interface.
type JWKSServer ¶
type JWKSServer struct {
parsecv1.UnimplementedJWKSServiceServer
// contains filtered or unexported fields
}
JWKSServer implements the JWKS gRPC service It serves JSON Web Key Sets containing public keys from all configured issuers The response is cached and periodically refreshed for efficiency
func NewJWKSServer ¶
func NewJWKSServer(cfg JWKSServerConfig) *JWKSServer
NewJWKSServer creates a new JWKS server with caching.
func (*JWKSServer) GetJWKS ¶
func (s *JWKSServer) GetJWKS(ctx context.Context, req *parsecv1.GetJWKSRequest) (*parsecv1.GetJWKSResponse, error)
GetJWKS implements the JWKS service Returns a cached JSON Web Key Set containing all public keys from all configured issuers
type JWKSServerConfig ¶
type JWKSServerConfig struct {
// IssuerRegistry provides access to all issuers
IssuerRegistry service.Registry
// RefreshInterval is how often to refresh the cached JWKS
// If zero, defaults to 1 minute
RefreshInterval time.Duration
// Clock is used for time operations (defaults to system clock)
Clock clock.Clock
// Observer for JWKS cache events. Defaults to NoOpServerObserver{} if nil.
Observer JWKSObserver
}
JWKSServerConfig configures the JWKS server
type LifecycleObserver ¶
type LifecycleObserver interface {
// GRPCServeFailed is a fire-and-forget event from an async goroutine.
GRPCServeFailed(err error)
// HTTPServeFailed is a fire-and-forget event from an async goroutine.
HTTPServeFailed(err error)
// StopStarted is called when graceful shutdown begins.
StopStarted(ctx context.Context) (context.Context, StopProbe)
}
LifecycleObserver is called at key points during server lifecycle. Implementations should embed NoOpLifecycleObserver for forward compatibility with new methods added to this interface.
type MuxConfigurer ¶
MuxConfigurer registers HTTP handlers on the server's mux during startup. Use this to add endpoints like /metrics or /debug/pprof without coupling the server to specific subsystem types.
type NoOpCacheRefreshProbe ¶
type NoOpCacheRefreshProbe struct{}
NoOpCacheRefreshProbe is a no-op implementation of CacheRefreshProbe. Embed this in concrete probe types for forward compatibility.
func (NoOpCacheRefreshProbe) CacheRefreshFailed ¶
func (NoOpCacheRefreshProbe) CacheRefreshFailed(error)
func (NoOpCacheRefreshProbe) End ¶
func (NoOpCacheRefreshProbe) End()
func (NoOpCacheRefreshProbe) KeyConversionFailed ¶
func (NoOpCacheRefreshProbe) KeyConversionFailed(string, error)
type NoOpInitPopulationProbe ¶
type NoOpInitPopulationProbe struct{}
NoOpInitPopulationProbe is a no-op implementation of InitPopulationProbe. Embed this in concrete probe types for forward compatibility.
func (NoOpInitPopulationProbe) End ¶
func (NoOpInitPopulationProbe) End()
func (NoOpInitPopulationProbe) InitialCachePopulationFailed ¶
func (NoOpInitPopulationProbe) InitialCachePopulationFailed(error)
type NoOpJWKSObserver ¶
type NoOpJWKSObserver struct{}
NoOpJWKSObserver is a no-op implementation of JWKSObserver. Embed this in concrete observer types for forward compatibility.
func (NoOpJWKSObserver) CacheRefreshStarted ¶
func (NoOpJWKSObserver) CacheRefreshStarted(ctx context.Context) (context.Context, CacheRefreshProbe)
func (NoOpJWKSObserver) InitPopulationStarted ¶
func (NoOpJWKSObserver) InitPopulationStarted(ctx context.Context) (context.Context, InitPopulationProbe)
type NoOpLifecycleObserver ¶
type NoOpLifecycleObserver struct{}
NoOpLifecycleObserver is a no-op implementation of LifecycleObserver. Embed this in concrete observer types for forward compatibility.
func (NoOpLifecycleObserver) GRPCServeFailed ¶
func (NoOpLifecycleObserver) GRPCServeFailed(error)
func (NoOpLifecycleObserver) HTTPServeFailed ¶
func (NoOpLifecycleObserver) HTTPServeFailed(error)
func (NoOpLifecycleObserver) StopStarted ¶
type NoOpServerObserver ¶
type NoOpServerObserver struct {
NoOpJWKSObserver
NoOpLifecycleObserver
}
NoOpServerObserver satisfies both JWKSObserver and LifecycleObserver with empty probes. Useful in tests that don't care about observer events.
type NoOpStopProbe ¶
type NoOpStopProbe struct{}
NoOpStopProbe is a no-op implementation of StopProbe. Embed this in concrete probe types for forward compatibility.
func (NoOpStopProbe) End ¶
func (NoOpStopProbe) End()
type Principal ¶ added in v0.2.0
type Principal struct {
Result *trust.Result
Anonymous bool
CredentialType trust.CredentialType
CredentialSource string
}
Principal wraps a trust.Result with an explicit anonymous flag and credential metadata. This avoids representing anonymous identity as an empty trust.Result, which is too implicit for policy decisions.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server manages the gRPC and HTTP servers
func (*Server) SetNotReady ¶
func (s *Server) SetNotReady()
SetNotReady transitions all per-service and the aggregate readiness health statuses to NOT_SERVING.
func (*Server) SetReady ¶
func (s *Server) SetReady()
SetReady transitions all per-service and the aggregate readiness health statuses to SERVING. Call this after all components have been successfully initialized.
type ServerObserver ¶
type ServerObserver interface {
JWKSObserver
LifecycleObserver
}
ServerObserver is the per-package aggregate for all server observer interfaces.
type StaticAuthenticatedOption ¶ added in v0.3.0
type StaticAuthenticatedOption func(*staticAuthenticatedConfig)
StaticAuthenticatedOption configures optional behavior for NewStaticAuthenticatedPolicy.
func WithAllowAnonymousWithoutIssuePaths ¶ added in v0.3.0
func WithAllowAnonymousWithoutIssuePaths(patterns []*regexp.Regexp) StaticAuthenticatedOption
WithAllowAnonymousWithoutIssuePaths configures path patterns that allow anonymous access without issuing tokens. Patterns must be pre-compiled via CompilePathPatterns.
type StaticAuthenticatedPolicy ¶ added in v0.2.0
type StaticAuthenticatedPolicy struct {
// contains filtered or unexported fields
}
StaticAuthenticatedPolicy is an AuthzCheckPolicy that denies anonymous subjects and issues a statically configured set of token types for authenticated subjects. Optionally, configured path patterns allow anonymous access without issuing tokens on matching URL paths.
func NewStaticAuthenticatedPolicy ¶ added in v0.2.0
func NewStaticAuthenticatedPolicy(tokenTypes []TokenTypeSpec, opts ...StaticAuthenticatedOption) *StaticAuthenticatedPolicy
NewStaticAuthenticatedPolicy creates a policy that denies anonymous subjects and issues the given token types for authenticated subjects. If tokenTypes is empty, DefaultTokenTypeSpecs is used. Use WithAllowAnonymousWithoutIssuePaths to allow anonymous access on specific URL path patterns.
func (*StaticAuthenticatedPolicy) Decide ¶ added in v0.2.0
func (p *StaticAuthenticatedPolicy) Decide(_ context.Context, in AuthzCheckPolicyInput) (AuthzCheckDecision, error)
Decide denies anonymous subjects and issues the configured token types for authenticated subjects. When allow-anonymous path patterns are configured, anonymous requests on matching paths are allowed without issuing tokens.
type StopProbe ¶
type StopProbe interface {
End()
}
StopProbe tracks server graceful shutdown. Implementations should embed NoOpStopProbe for forward compatibility.
type StubClaimsFilterRegistry ¶
type StubClaimsFilterRegistry struct {
// contains filtered or unexported fields
}
StubClaimsFilterRegistry is a simple stub implementation that allows all claims This is useful for testing and initial development
func NewStubClaimsFilterRegistry ¶
func NewStubClaimsFilterRegistry() *StubClaimsFilterRegistry
NewStubClaimsFilterRegistry creates a new stub registry By default, it uses a passthrough filter that allows all claims
func NewStubClaimsFilterRegistryWithFilter ¶
func NewStubClaimsFilterRegistryWithFilter(filter claims.ClaimsFilter) *StubClaimsFilterRegistry
NewStubClaimsFilterRegistryWithFilter creates a stub registry with a custom filter
func (*StubClaimsFilterRegistry) GetFilter ¶
func (r *StubClaimsFilterRegistry) GetFilter(actor *trust.Result) (claims.ClaimsFilter, error)
GetFilter implements ClaimsFilterRegistry
type TLSPeerInfo ¶ added in v0.2.0
type TLSPeerInfo struct {
Certificates []*x509.Certificate
}
TLSPeerInfo holds mTLS client certificate information extracted from the transport layer.
type TokenTypeSpec ¶
type TokenTypeSpec struct {
// Type is the token type to issue
Type service.TokenType
// HeaderName is the HTTP header to use for this token
// e.g., "Transaction-Token", "Authorization", "X-Custom-Token"
HeaderName string
}
TokenTypeSpec specifies a token type to issue and how to deliver it
func DefaultTokenTypeSpecs ¶ added in v0.2.0
func DefaultTokenTypeSpecs() []TokenTypeSpec
DefaultTokenTypeSpecs returns the default token types issued when none are configured: a single transaction token delivered via the Transaction-Token header.
Source Files
¶
- actor_credential.go
- authz.go
- authz_check_policy.go
- basic_auth_credential_source.go
- bearer_credential_source.go
- claims_filter_registry.go
- cookie_credential_source.go
- credential_context.go
- credential_sources.go
- exchange.go
- form_marshaler.go
- forwarded_client_cert_credential_source.go
- header_credential_source.go
- jwks.go
- oauth_errors.go
- observer.go
- server.go
- subject_credential.go