Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section on access control to the install docs #2286

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ http://localhost:9097

## What's next

Try out some of our [walkthroughs](./walkthrough) for more details on deploying and configuring the
Try out some of our [walk-throughs](./walkthrough) for more details on deploying and configuring the
Tekton Dashboard for some common scenarios. For more information, see the
[Tekton Dashboard GitHub repository](https://github.com/tektoncd/dashboard).
2 changes: 1 addition & 1 deletion docs/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Keep in mind that When running your Tekton Pipelines, if you see a `fatal: could

You can read the dashboard backend [API docs](./api.md).

Go though our [walk-throughs](../walkthrough/README.md) or learn about [extensions](../extensions.md).
Try our [walk-throughs](../walkthrough/README.md) or learn about [extensions](../extensions.md).

---

Expand Down
15 changes: 15 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,21 @@ spec:

You can then access the Dashboard UI at `http(s)://domain.tld/tekton/`

### Access control

The Dashboard does not provide its own authentication or authorization, however it will pass on any authentication headers provided to it by a proxy deployed in front of the Dashboard. These are then handled by the Kubernetes API server allowing for full access control via [Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/). In case of forbidden access the Dashboard will display corresponding error notifications.

See the walk-throughs for an example of [enabling authentication using oauth2-proxy](./walkthrough/walkthrough-oauth2-proxy.md).

By default the Dashboard accesses resources and performs actions in the cluster using the permissions granted to its own ServiceAccount (i.e. the `tekton-dashboard` ServiceAccount in the `tekton-pipelines` namespace). If you wish to have the Dashboard perform actions on behalf of the authenticated user or some other ServiceAccount this can be achieved via [user impersonation](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation). This is known to work with a number of popular solutions including oauth2-proxy, Keycloak, OpenUnison, Traefik, Istio's EnvoyFilter, and more.

Typically when configuring impersonation you would have the proxy forward its ServiceAccount token in the `Authorization` header, and details of the user and groups in the `Impersonate-User` and `Impersonate-Group` headers respectively. See the docs of your chosen solution for details.

If you're using one of these proxies to provide authentication but still want to use the Dashboard's ServiceAccount to access the Kubernetes APIs you may need to modify the proxy config to prevent it from sending the `Authorization` header on upstream requests to the Dashboard. Some examples of relevant config:
- oauth2-proxy: add the `--pass-authorization-header=false` command line argument or its equivalent to your config https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview#command-line-options
- Istio EnvoyFilter: the external authentication service should return a custom header `x-envoy-auth-headers-to-remove: Authorization` https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/external_auth.proto
- Traefik: `removeHeader: true` https://doc.traefik.io/traefik/v2.0/middlewares/basicauth/#removeheader

## Uninstalling the Dashboard on Kubernetes

The Dashboard can be uninstalled by running the following command:
Expand Down
3 changes: 1 addition & 2 deletions docs/walkthrough/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Tekton Dashboard walkthrough
# Tekton Dashboard walk-through

Walk-throughs are a step-by-step demonstration of a procedure or process.
We have the following walk-throughs available:

- [Setup everything from scratch using a kind cluster](./walkthrough-kind.md)
- [Securing access to the Dashboard behind an oauth2 proxy](./walkthrough-oauth2-proxy.md)
- [Enabling logs persistence](./walkthrough-logs.md)
- [Setup everything from scratch using a kind cluster and Istio](./walkthrough-istio.md)

---

Expand Down
Binary file removed docs/walkthrough/walkthrough-istio-kiali.png
Binary file not shown.
Loading