Skip to content
Back to skills

Traefik Knowledge Patch

ASecurity

Traefik

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 27, 2026
developmentrustnodeexpressdockerkubernetesapifrontendbackendsecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill traefik-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Traefik Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Traefik Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-traefik-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-traefik-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: traefik-knowledge-patch
description: Traefik
version: "3.8.0"
license: MIT
metadata:
  author: Nevaberry
---


# Traefik compatibility guidance

Load this skill when configuring or upgrading Traefik routing, Kubernetes
providers, services, TLS, authentication, observability, or plugins.
Use the topic references for detailed examples and version-specific behavior.

## Reference index

| Reference | Topics |
| --- | --- |
| [Kubernetes](references/kubernetes.md) | Gateway API installation, listeners, filters, backend TLS, status, CRDs, namespaces, Ingress NGINX annotations and migration |
| [Routing and services](references/routing-services.md) | Rule migration, request validation, entry point limits, multi-layer routing, retries, failover, health checks, middleware |
| [Security, TLS, and authentication](references/security-tls-auth.md) | ForwardAuth, BasicAuth, ACME, TLS options, backend trust, security fixes and migration links |
| [Providers and operations](references/providers-operations.md) | Docker, Swarm, ECS, Nomad, HTTP and Redis providers, Knative, plugins, FastProxy, socket activation, dashboard |
| [Observability](references/observability.md) | Signal controls, OTLP logs and metrics, trace correlation, Kubernetes metadata, log rotation and redaction |

## Breaking changes and deprecations

### Rules and provider setup

- `core.defaultRuleSyntax` and per-router `ruleSyntax` are deprecated.
  Migrate router rules to v3 syntax before removing these settings.
- Enable the Gateway provider under `providers.kubernetesGateway` and remove
  the old `experimental.kubernetesGateway` flag.
- Upgrade Gateway API CRDs to at least v1.7.0 before running the Kubernetes
  Gateway provider in 3.8.0. It reads `TCPRoute` through its `v1` API.
- Enable `providers.kubernetesIngressNginx` directly and remove its experimental
  flag. Include ConfigMap access if maintaining the provider's RBAC.
- Ingress NGINX snippets accept an allowlisted subset of NGINX directives.
  Audit snippets and check annotation support before migrating.
- The Kubernetes CRD schema no longer supplies a default load-balancing
  strategy. Specify it explicitly if the resource needs to select one.
- Set `errors.service` to the service serving error pages; the field is required.
  Update installed CRDs before using `Middleware.spec.errors.errorRequestHeaders`.

### Request acceptance and forwarding

- Traefik 2.11.59 and 3.7.15 reject `CONNECT` before router matching regardless
  of HTTP version. Existing routes can no longer proxy those tunnels on those
  release lines. Earlier tunnel behavior is detailed in the routing reference.
- In 2.11.57 and 3.7.13, opaque HTTP request targets are rejected and client
  h2c upgrade headers are stripped before forwarding to backends.
- In 3.7.13, the proxy drops HTTP request trailer values when forwarding.
- In 2.11.62, 3.7.18, and 3.8.0, path normalization resolves dot and empty
  segments even when paths contain parameters. Check the migration guide for
  routes or backends depending on the original path.
- `StripPrefix` and `StripPrefixRegex` reject requests whose path changes when
  normalized after prefix removal.
- From 3.7.18, HTTP `Host` matcher hostname values are validated when building rules.
- An absolute URL in `healthCheck.path` is rejected; use a path such as `/healthz`.
- Replace negative TCP and UDP service weights before upgrading to 2.11.56 or 3.7.12.

### Authentication, TLS, and certificates

- `forwardAuth.trustForwardHeader` is deprecated.
- `forwardAuth.forwardBody: true` buffers the body and prevents request streaming.
  Set `forwardAuth.maxBodySize` to bound bodies forwarded to the auth service;
  ForwardAuth warns when this limit is unset.
- A router's own `tls` configuration replaces entry point `http.tls` defaults.
- In 2.11.57 and 3.7.13, ACME DNS-01 no longer waits for propagation to recursive
  nameservers by default.
- Domain extraction for ACME and TLS skips negated rule matchers in 3.7.13 and 2.11.58.
- BasicAuth imposes a maximum password length in 2.11.62, 3.7.18, and 3.8.0.
  Building a BasicAuth middleware with an empty user list fails in 3.8.0.

The security reference retains advisory identifiers, affected upgrade guidance,
and the migration links associated with those fixes.

## Kubernetes and Gateway API quick reference

### Discovery and resource references

- Ingress, CRD, and Gateway providers discover backends through EndpointSlices.
  Update custom RBAC to allow the controller to list and watch `endpointslices`
  in `discovery.k8s.io`.
- Cross-namespace HTTPRoute Service backends use `backendRefs[].namespace`
  and a `ReferenceGrant` in the Service's namespace.
- Cross-provider `backendRefs` specifying `namespace` are rejected in 3.7.5.
  In 3.7.7, backend `ExtensionRef` filters resolve in the owning HTTPRoute's namespace.
- Ingress, CRD, and Gateway providers expose `crossProviderNamespaces` to restrict
  the namespaces from which cross-provider references can originate.
- Set `providers.kubernetesGateway.nativeLBByDefault: true` to send traffic to
  Service cluster IPs by default and let Kubernetes select backend Pods.
- Set `reportNodeInternalIPs: true` in the Kubernetes Ingress provider to publish
  node internal IPs in Ingress status.

### Listener and backend configuration

- Set `providers.kubernetesGateway.gatewayClass: traefik` to select that GatewayClass.
- A `ListenerSet` adds listeners to a Gateway that allows them.
  Listener-level filters configure policies common to a listener.
- Listener isolation in 3.8 limits which listener can serve an attached route,
  including when listeners share an entry point.
- Service port `appProtocol` chooses the upstream protocol for HTTPRoute and
  GRPCRoute backends. In 3.7.15, an HTTPRoute backend defaults to HTTP when omitted.
- `BackendTLSPolicy` configures backend TLS and certificate validation, including
  TLSRoute and gRPC backends in 3.8. Gateway frontend client certificates authenticate
  clients; backend client certificates authenticate the Gateway to upstreams.
- `ClusterTrustBundle` references supply shared cluster-scoped CA certificates.
  TLS configuration and `BackendTLSPolicy` support expected Subject Alternative Names.

### HTTPRoute controls

Use method, query parameter, and `RegularExpression` path matches; `URLRewrite`
changes the backend path, and `RequestRedirect` can set scheme and port.
`ResponseHeaderModifier` can set, add, or remove response headers.

- `timeouts: {backendRequest: 2s}` bounds an individual backend request.
- `retry: {attempts: 2, codes: [502, 503]}` selects response codes for retries.
- `RequestMirror` copies matching requests to a shadow backend.
- A `CORS` filter sets the rule's cross-origin policy.

Inspect HTTPRoute `status.parents` for attachment and invalid-route conditions
and GatewayClass `status.supportedFeatures` for reported capabilities.

## Routing, services, and middleware quick reference

Attach a root router to an entry point and use `parentRefs` on child routers.
A child can match a header added by its parent's middleware before forwarding.
Set `middlewares` next to `loadBalancer` on an HTTP service to apply the chain
whenever a router uses that service; Gateway HTTP backends also accept filters
on `backendRefs`.

### Retry and failover

`retry.retryOn.statusCodes` selects backend responses that trigger retry;
`retry.timeout` bounds each attempt. Retrying non-idempotent methods requires
an explicit opt-in.

```yaml
retry:
  attempts: 3
  retryOn:
    statusCodes: [502, 503, 504]
  timeout: 2s
```

Set `failover.errors.status: ["500-504"]` to use the fallback when the primary
returns a matching status. Kubernetes supports `TraefikService.spec.failover`.
Set a circuit breaker minimum request count so its expression has enough traffic
to evaluate before it can trip.

### Backend selection and request handling

- `http.services.<name>.loadBalancer.strategy: p2c` selects Power of Two Choices.
  Least Time favors lower response times in file and Kubernetes CRD providers;
  Highest Random Weight is also available and can be selected in Kubernetes CRDs.
- `healthCheck.unhealthyInterval` gives unhealthy HTTP servers a separate probe
  schedule. TCP supports active health checks; passive checks use live outcomes.
- `preservePath: true` retains the configured backend URL's path.
- `mirrorBody: false` under `http.services.<name>.mirroring` omits mirror bodies;
  the primary service still receives the body.
- `buffering: {disableResponseBuffer: true}` buffers requests while streaming
  responses; `disableRequestBuffer: true` independently disables request buffering.
- `compress.encodings` selects permitted encodings in server preference order.
  Compress supports `zstd`; the separate `gzhttp` wrapper drops Zstandard support
  in 3.7.9 and 3.6.24.
- `rateLimit.redis.endpoints: ["redis.internal:6379"]` shares rate-limit state
  across proxy instances. The `tap` middleware inspects selected HTTP routes.
- `**` in `Host` and `HostSNI` patterns matches across subdomain labels,
  such as `` Host(`**.example.com`) `` for `a.b.example.com`.

## Certificate and authentication controls

- Set `certificatesResolvers.<name>.acme.email` independently per resolver.
  `acme.profile` requests a CA profile; `acme.emailAddresses` supplies multiple contacts.
- `acme.caCertificates` supplies CA certificate files for trusting the ACME server.
  `acme.certificatesDuration: 720` declares a 30-day certificate lifetime in hours.
- DNS challenge `propagation.delayBeforeChecks: 30s` delays local checks;
  `propagation.disableChecks: true` skips those checks.
- `acme.httpChallenge.delay` delays triggering HTTP-01 validation.
  `certificatesResolvers.<name>.acme.certificateTimeout` bounds acquisition;
  `certificatesResolvers.<name>.acme.reusePrivateKey: true` reuses the key on renewal.
- `forwardAuth.preserveRequestMethod: true` forwards the original HTTP method.
  `forwardAuth.preserveLocationHeader: true` preserves relative redirect targets.
- `forwardAuth.authSignInURL` redirects unauthenticated clients to a sign-in page;
  `forwardAuth.maxResponseBodySize` caps auth-server response bodies.
- Set `cipherSuites` on an HTTP `ServersTransport` to control suites offered to HTTPS backends;
  omitting the field uses the default suites.

## Observability and operations quick reference

Entry point `observability` sets defaults for globally enabled `accessLogs`,
`metrics`, and `tracing`; `http.routers.<name>.observability` overrides them.

- OTLP log export is experimental: set `experimental.otlpLogs: true` and configure
  `log.otlp` for application logs and `accessLog.otlp` for access logs.
- Access logs can use stdio and OTLP together. JSON log fields include
  `entryPointName`, `trace_id`, and `span_id`; `USR1` reopens only the access log file.
- `metrics.otlp.serviceName` controls `service.name`;
  `metrics.otlp.resourceAttributes` adds metric resource attributes.
- `metrics.influxdb2.token` accepts a file path for loading a mounted secret.
- Request `GET /api/support-dump` for a diagnostic archive. Set `api.basePath: /proxy`
  for `/proxy/api` and `/proxy/dashboard/`; include those prefixes when routing `api@internal`.
- Redis configuration providers need keyspace notifications to detect changes.
- FastProxy is experimental; enable it with `experimental.fastProxy.enabled: true`.
- Knative discovery is experimental: enable `experimental.knative` and configure
  `providers.knative`; `namespaces` limits discovery.
- Yaegi v2 is an experimental plugin runtime with `fileMapping` and `mounts` settings.
  `experimental.abortOnPluginFailure: true` fails startup when a plugin fails to load.

Files in this skill

  • SKILL.md5.8 KB
  • references/load-balancing.md1.8 KB
  • references/providers-and-observability.md1.2 KB
  • references/routing-and-middleware.md2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.