# Logging in to the dashboard

_[New in v1.0.0](/release-notes/linkerd-dashboard/v1.0.0/)_

The dashboard requires you to log in with a Kubernetes bearer token. The
dashboard checks the token with the Kubernetes API server, so any token that
your cluster accepts will work.

## Prerequisites

- The [Linkerd dashboard](/linkerd-dashboard/getting-started/) installed on your cluster
- `kubectl` access to the cluster

## Get a token

The simplest way to get a token is to request a short-lived token for a service
account:

```bash
kubectl -n <namespace> create token <service-account>
```

For example, to create a token for the `default` service account in the
`default` namespace:

```bash
kubectl -n default create token default
```

## Log in

[Access the dashboard](/linkerd-dashboard/getting-started/#accessing-the-dashboard), then paste
the token into the login page.

Your session ends when the token expires or after 20 minutes of inactivity,
whichever comes first. When the session ends, get a new token and log in again.
To end your session sooner, use the logout button at the bottom of the left
navigation.

> [!WARNING]
> Logging in only confirms that the token is valid for your
> cluster. It does not check what the token's service account is allowed to do.
> Anyone who has a valid token for your cluster and can reach the dashboard can
> use it, so restrict who can reach the dashboard on the network.

## Insecure Mode

You can disable dashboard authentication by setting the dashboard's `authPolicy`
value to `insecure`:

```bash
helm upgrade -n monitoring linkerd-dashboard \
  oci://ghcr.io/buoyantio/charts/linkerd-dashboard --reuse-values \
  --set authPolicy=insecure
```

The dashboard will restart to pick up the new setting.

To turn authentication back on, set `authPolicy` to any other value (such as
`default`).
