Skip to content
Back to skills

Traefik Knowledge Patch

ASecurity

Traefik

  • 25 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 5, 2026
developmentrustgoexpressdockerkubernetesapifrontendbackendsecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 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-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-traefik-knowledge-patch-nevaberry-plugins)

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 upgrading Traefik or working on its providers, routing,
middleware, certificates, authentication, or telemetry. Use the topic references
for configuration examples and release-specific behavior.

## Reference index

| Reference | Topics |
| --- | --- |
| [Kubernetes and Gateway API](references/kubernetes.md) | CRDs, RBAC, listeners, route filters, backend TLS, discovery, namespaces, generated names, Ingress NGINX |
| [Observability](references/observability.md) | Signal controls, OTLP, access logs, metrics, tracing, dashboard, support dump |
| [Providers and operations](references/providers-operations.md) | Docker, Swarm, ECS, Nomad, Knative, configuration providers, plugins, sockets, limits, FastProxy |
| [Routing, middleware, and services](references/routing-services.md) | Rule migration, router layers, path handling, retries, failover, health checks, balancing, compression, error pages |
| [Security, TLS, and authentication](references/security-tls-auth.md) | ACME, TLS options, backend identity, ForwardAuth, BasicAuth, security fixes and migration links |

## Breaking changes and deprecations

### Rules and authentication settings

`core.defaultRuleSyntax` and per-router `ruleSyntax` are deprecated. Migrate
router rules to v3 syntax before removing these settings.
`forwardAuth.trustForwardHeader` is also deprecated.
From 3.7.18, HTTP `Host` matcher hostname values are validated when building rules.

### Kubernetes upgrades

Enable the Gateway provider under `providers.kubernetesGateway` and remove
`experimental.kubernetesGateway`. Before running it in 3.8.0, upgrade Gateway API
CRDs to at least v1.7.0; the provider reads `TCPRoute` through its `v1` API.
The reference records the CRD requirements for earlier upgrades, including the
Experimental Channel bundle required for 3.7.11.

Enable `providers.kubernetesIngressNginx` directly and remove its experimental
flag. Include ConfigMap access in custom provider RBAC. For Kubernetes Ingress,
CRD, and Gateway discovery, allow listing and watching `endpointslices` in
`discovery.k8s.io`.

The Kubernetes CRD schema no longer supplies a default load-balancing strategy;
specify it explicitly if the resource needs to select one. Update installed
CRDs before using `spec.ingressClassName` or the added `ServersTransport`
forwarding timeout fields. Check generated resource names after the naming
changes if configuration or tooling references them.

### CONNECT and normalized paths

Traefik 2.11.59 and 3.7.15 reject `CONNECT` before router matching regardless of
HTTP version; routes can no longer proxy those tunnels on those release lines.
Earlier standard-proxy and FastProxy behavior is detailed in the routing reference.

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 that depend on the original path. `StripPrefix` and `StripPrefixRegex`
reject requests whose path changes when normalized after prefix removal.

### Validation and TLS precedence

Use a path such as `/healthz` for `healthCheck.path`; absolute URLs are rejected.
Set the required `errors.service` to the service serving error pages.
Replace negative TCP and UDP service weights before upgrading to 2.11.56 or 3.7.12.
A router's own `tls` configuration replaces its entry point's `http.tls` defaults.
The security reference records BasicAuth validation changes and advisory fixes,
with the migration links provided for those upgrades.

## Gateway API routing

Scope the provider with `providers.kubernetesGateway.gatewayClass: traefik`.
Use a `ListenerSet` to attach listeners to a Gateway that allows them. Listener
isolation limits which listener can serve an attached route, even when listeners
share an entry point. Listener-level filters can hold policies common to a listener.

HTTPRoute matches support methods, query parameters, and `RegularExpression`
paths. Use `URLRewrite` to change the backend path, `RequestRedirect` to set the
destination scheme and port, and `ResponseHeaderModifier` to change response headers.
`GRPCRoute` routes gRPC traffic through Gateway listeners.

Set the Service port's `appProtocol` for the upstream protocol. In 3.7.15, an
HTTPRoute backend uses HTTP when it is omitted; set it explicitly for another protocol.
For a Service in another namespace, set `backendRefs[].namespace` and authorize
the reference with a `ReferenceGrant` in the Service's namespace.
Cross-provider `backendRefs` specifying `namespace` are rejected from 3.7.5.

An HTTPRoute rule can use `timeouts: {backendRequest: 2s}` to bound an individual
backend request and `retry: {attempts: 2, codes: [502, 503]}` for selected responses.
Use `RequestMirror` for a shadow backend and `CORS` for a rule's cross-origin policy:

```yaml
filters:
  - type: CORS
    cors:
      allowOrigins: [https://app.example.com]
      allowMethods: [GET]
```

`BackendTLSPolicy` configures backend TLS validation, including TLSRoute and gRPC
backends. Frontend client certificates authenticate connecting clients; a Gateway
backend client certificate authenticates the Gateway to an upstream requiring
mutual TLS. `ClusterTrustBundle` references provide shared cluster-scoped CA roots.

## Routing and service controls

### Router layers and host patterns

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

The v3 `Host` and `HostSNI` matchers accept wildcard hosts. Use `**` to match across
subdomain labels, such as `` Host(`**.example.com`) `` for `a.b.example.com`.
Provider precedence resolves priority ties between routers from different providers.

### Retry, failover, and buffering

Use `retry.retryOn.statusCodes` to select responses that trigger a retry and
`retry.timeout` to bound 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 a fallback when the primary
returns a matching status. Kubernetes can declare `TraefikService.spec.failover`.
Set a minimum request count for the circuit breaker before its expression can trip.

Set `buffering: {disableResponseBuffer: true}` to buffer requests while streaming
responses; `disableRequestBuffer: true` disables request buffering independently.
Set `mirrorBody: false` under `http.services.<name>.mirroring` to omit mirror request
bodies while the primary service still receives them.

### Backend selection and health

Use `http.services.<name>.loadBalancer.strategy: p2c` for Power of Two Choices.
The file and Kubernetes CRD providers can select Least Time to favor lower response
times; Highest Random Weight is also available and selectable in Kubernetes CRDs.
Active TCP health checks detect unavailable TCP backends. Passive health checks
use live request outcomes. `healthCheck.unhealthyInterval` gives unhealthy HTTP
backends a separate probe schedule.

### Middleware options

Use `errors.statusRewrites` to change the status while serving a custom error page;
`errors.errorRequestHeaders` selects original headers sent to that service.
Use `rateLimit.redis.endpoints: ["redis.internal:6379"]` to share rate-limit state
across instances. `ipAllowList.rejectStatusCode` chooses the rejection response.
`compress.encodings` lists permitted encodings in server preference order.
The Compress middleware supports eligible `zstd` responses when advertised by the
client; the separate `gzhttp` wrapper no longer supports `zstd` in 3.7.9 and 3.6.24.

## Certificates and authorization

Configure ACME accounts per resolver with `certificatesResolvers.<name>.acme.email`;
`acme.emailAddresses` supplies multiple contacts and `acme.profile` requests a CA profile.
Set `acme.caCertificates` for ACME server trust and `acme.certificatesDuration: 720`
for the 30-day renewal tier. `certificatesResolvers.<name>.acme.reusePrivateKey: true`
reuses the certificate key on renewal.

Use `certificatesResolvers.<name>.acme.dnsChallenge.propagation.delayBeforeChecks: 30s`
to delay TXT-record checks; `propagation.disableChecks: true` skips local checks.
In 2.11.57 and 3.7.13, DNS-01 no longer waits by default for propagation to recursive
nameservers. `acme.httpChallenge.delay` delays triggering HTTP-01 validation.

`forwardAuth.forwardBody: true` buffers the body and prevents request streaming.
Set `forwardAuth.maxBodySize` to bound bodies forwarded to the auth service;
`forwardAuth.maxResponseBodySize` caps auth-server responses. Use
`forwardAuth.preserveRequestMethod: true` for the original HTTP method and
`forwardAuth.preserveLocationHeader: true` to preserve relative redirect targets.
`forwardAuth.authSignInURL` redirects unauthenticated clients to a sign-in page.

Use `cipherSuites` on HTTP `ServersTransport` for HTTPS backend suites; omitting
it uses defaults. `X25519MLKEM768` in `curvePreferences` allows hybrid X25519 and
ML-KEM-768 exchange with compatible clients. TLS and `BackendTLSPolicy` support
expected Subject Alternative Name validation.

## Observability and operations

Set entry point defaults under `entryPoints.<name>.observability` for globally
enabled `accessLogs`, `metrics`, and `tracing`; override them per router under
`http.routers.<name>.observability`.

Enable experimental OTLP log export with `experimental.otlpLogs: true`; configure
`log.otlp` and `accessLog.otlp` for application and access logs. Access logs can go
to stdio and OTLP together. Parse JSON fields `entryPointName`, `trace_id`, and
`span_id`; `USR1` reopens only the access log file during rotation.

Use `metrics.otlp.serviceName` and `metrics.otlp.resourceAttributes` for exported
metrics. `metrics.influxdb2.token` accepts a file path for a mounted token secret.
Request `GET /api/support-dump` for a diagnostic archive. Set `api.basePath: /proxy`
for `/proxy/api` and `/proxy/dashboard/`, including those prefixes in the router
rule exposing `api@internal`.

Enable Redis keyspace notifications when Redis supplies configuration.
`providers.http.maxResponseBodySize` bounds HTTP configuration responses.
Opt in to experimental FastProxy with `experimental.fastProxy.enabled: true`.
Enable experimental Knative discovery with `experimental.knative` and
`providers.knative`; set `namespaces` to limit discovery. Yaegi v2 is an experimental
plugin runtime with `fileMapping` and `mounts` settings. Use
`experimental.abortOnPluginFailure: true` to fail startup when a plugin fails to load.

Files in this skill

  • SKILL.md8.8 KB
  • coverage.json1.2 KB
  • references/kubernetes.md5.7 KB
  • references/observability.md2.4 KB
  • references/providers-operations.md3.4 KB
  • references/routing-services.md4.8 KB
  • references/security-tls-auth.md4.1 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.