Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶ added in v0.12.0
func Middleware(log logrus.FieldLogger, metrics telemetry.Metrics) middleware.Middleware
Types ¶
type Config ¶
type Config struct {
BindAddr net.Addr
Attestor attestor.Attestor
Manager manager.Manager
Log logrus.FieldLogger
Metrics telemetry.Metrics
// The TLS Certificate resource name to use for the default X509-SVID with Envoy SDS
DefaultSVIDName string
// The Validation Context resource name to use when fetching X.509 bundle together with federated bundles with Envoy SDS
DefaultAllBundlesName string
// The Validation Context resource name to use for the default X.509 bundle with Envoy SDS
DefaultBundleName string
// Disable custom Envoy SDS validator
DisableSPIFFECertValidation bool
AllowUnauthenticatedVerifiers bool
AllowedForeignJWTClaims []string
LogSelectors []string
TrustDomain spiffeid.TrustDomain
// WorkloadAPIRateLimit configures per-selector-set rate limiting for Workload API and SDS methods.
WorkloadAPIRateLimit WorkloadAPIRateLimitConfig
// contains filtered or unexported fields
}
type Endpoints ¶
type Endpoints struct {
// contains filtered or unexported fields
}
func (*Endpoints) WaitForListening ¶ added in v1.13.0
func (e *Endpoints) WaitForListening(listening chan struct{})
type PeerTrackerAttestor ¶ added in v1.1.2
type WorkloadAPIRateLimitConfig ¶ added in v1.15.2
type WorkloadAPIRateLimitConfig struct {
FetchX509SVID int
FetchJWTSVID int
FetchX509Bundles int
FetchJWTBundles int
StreamSecrets int
FetchSecrets int
}
WorkloadAPIRateLimitConfig configures per-selector-set rate limits for Workload API methods. A value of 0 means no limit is applied for that method.
type WorkloadRateLimiter ¶ added in v1.15.2
type WorkloadRateLimiter struct {
// contains filtered or unexported fields
}
WorkloadRateLimiter enforces per-selector-set rate limiting on Workload API methods. It is called from the handler after workload attestation, once the caller's attested selectors are known.
func NewWorkloadRateLimiter ¶ added in v1.15.2
func NewWorkloadRateLimiter(cfg WorkloadAPIRateLimitConfig, log logrus.FieldLogger, metrics telemetry.Metrics) *WorkloadRateLimiter
NewWorkloadRateLimiter creates a rate limiter from the given config. Methods with a zero limit are omitted from the limiters map and pass through at RateLimit time; if no methods are configured the result is effectively a no-op for every call.
func (*WorkloadRateLimiter) RateLimit ¶ added in v1.15.2
func (r *WorkloadRateLimiter) RateLimit(fullMethod string, selectors []*common.Selector) error
RateLimit checks whether the request for fullMethod should be allowed given the caller's attested selectors. The selector set is treated as a single key, so all workloads with the same selector set share one token bucket. Callers with no selectors share an "<unattested>" bucket. Methods without a configured limit pass through.