From 1778ff3bac5800ca164fc34c9c361654fdb87b74 Mon Sep 17 00:00:00 2001 From: "Gina A." <70909035+gndz07@users.noreply.github.com> Date: Thu, 8 Jan 2026 10:24:04 +0100 Subject: [PATCH] Bring back security section on API & Dashboard documentation page --- .../install-configuration/api-dashboard.md | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/content/reference/install-configuration/api-dashboard.md b/docs/content/reference/install-configuration/api-dashboard.md index deea2a815..c5736a9df 100644 --- a/docs/content/reference/install-configuration/api-dashboard.md +++ b/docs/content/reference/install-configuration/api-dashboard.md @@ -3,13 +3,27 @@ title: "Traefik API & Dashboard Documentation" description: "Traefik Proxy exposes information through API handlers and showcase them on the Dashboard. Learn about the security, configuration, and endpoints of the APIs and Dashboard. Read the technical documentation." --- -The dashboard is the central place that shows you the current active routes handled by Traefik. +Traefik exposes a number of information through API endpoints, such as the configuration of your routers, services, middlewares, etc. + +The dashboard, which is the central place that displays the current active routes handled by Traefik, fetches the data from this API.
Dashboard - Providers
The dashboard in action
+## Security + +Enabling the API and the dashboard in production is not recommended, because it will expose all configuration elements, +including sensitive data, for which access should be reserved to administrators. + +In production, it should be at least secured by authentication and authorizations. + +!!! info + + It's recommended to NOT publicly exposing the API's port, keeping it restricted to internal networks + (as in the [principle of least privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege), applied to networks). + ## Configuration Example Enable the dashboard: @@ -187,6 +201,7 @@ All the following endpoints must be accessed with a `GET` HTTP request. | `/api/entrypoints` | Lists all the entry points information. | | `/api/entrypoints/{name}` | Returns the information of the entry point specified by `name`. | | `/api/overview` | Returns statistic information about HTTP, TCP and about enabled features and providers. | +| `/api/support-dump` | Returns an archive that contains the anonymized static configuration and the runtime configuration. | | `/api/rawdata` | Returns information about dynamic configurations, errors, status and dependency relations. | | `/api/version` | Returns information about Traefik version. | | `/debug/vars` | See the [expvar](https://golang.org/pkg/expvar/) Go documentation. | @@ -203,14 +218,16 @@ All the following endpoints must be accessed with a `GET` HTTP request. ## Dashboard -The dashboard is available at the same location as the API, but by default on the path `/dashboard/`. +The dashboard is available by default on the path `/dashboard/`. !!! note - The trailing slash `/` in `/dashboard/` is mandatory. This limitation can be mitigated using the the [RedirectRegex Middleware](../../middlewares/http/redirectregex.md). - - There is also a redirect from the path `/` to `/dashboard/`, but you should not rely on this behavior, as it is subject to change and may complicate routing rules. + - There is also a redirect from the path `/` to `/dashboard/`. -To securely access the dashboard, you need to define a routing configuration within Traefik. This involves setting up a router attached to the service `api@internal`, which allows you to: +As mentioned above in the [Security](#security) section, it is important to secure access to both the dashboard and the API. +You need to define a routing configuration within Traefik. +This involves setting up a router attached to the service `api@internal`, which allows you to: - Implement security features using [middlewares](../../middlewares/overview.md), such as authentication ([basicAuth](../../middlewares/http/basicauth.md), [digestAuth](../../middlewares/http/digestauth.md), [forwardAuth](../../middlewares/http/forwardauth.md)) or [allowlisting](../../middlewares/http/ipallowlist.md).