Enabling headers in Live calls

New in v1.0.0

By default, Live calls show request details without HTTP headers. This guide shows you how to include request headers, response headers, and trailers, and how to choose which headers are shown.

Headers can contain sensitive values, such as credentials and session cookies. Anyone who can use the dashboard can see them.

Prerequisites

Enable headers

Set the dashboard’s tapHeadersEnabled value:

helm upgrade -n monitoring linkerd-dashboard \
  oci://ghcr.io/buoyantio/charts/linkerd-dashboard --reuse-values \
  --set tapHeadersEnabled=true

After the dashboard has restarted to pick up the new setting, Live calls will show the headers in the proxy’s default allow list: Accept, Content-Length, Content-Type, Date, Host, Last-Modified, Server, and User-Agent.

Choose which headers are shown

The allow list is applied by each workload’s Linkerd proxy. To show a specific set of headers, set the tap.buoyant.io/headers-allow annotation to a comma-separated list of header names.

To set it for every workload in a namespace, annotate the namespace:

kubectl annotate namespace <namespace> \
  tap.buoyant.io/headers-allow='Accept,Content-Length,User-Agent'

To set it for one workload, add it to the workload’s pod template. A workload’s annotation takes precedence over its namespace’s:

spec:
  template:
    metadata:
      annotations:
        tap.buoyant.io/headers-allow: "Accept,Content-Length,User-Agent"

The annotation is applied when the proxy is injected, so restart your workloads for the change to take effect. For example:

kubectl -n <namespace> rollout restart deployment/<name>
Setting the annotation to an empty string ("") stops all headers from being shown. To go back to the default allow list, remove the annotation. An invalid value is ignored, and the proxy injector logs a warning starting with Invalid value for tap.buoyant.io/headers-allow.

Disable headers

To turn headers off again, set tapHeadersEnabled to false the same way.