Access¶
The workstation¶
A member of a namespace (Getting started) logs in with their identity, through the cluster's
identity broker (on auth. and the cluster's zone): a security key (a passkey) where the cluster offers one,
another provider where its admins added it. The cluster serves a script that prepares a workstation: it installs
kubectl (the cluster's version, from dl.k8s.io, its checksum verified) and kubelogin (kubectl's OpenID Connect
plugin, https://github.com/int128/kubelogin), adds the cluster to the kubeconfig and makes it the current context,
then signs in.
Written by the cluster for itself: it asks nothing. Linux or macOS (x86_64 or ARM), with curl and python3. At
the end a browser opens on the identity provider; once signed in, the script shows the identity and groups the
cluster sees (kubectl auth whoami). Run it again any time, e.g. after the cluster changed: it touches nothing else
of the kubeconfig.
Options go after sh -s -- (curl -fsS https://cloud.dampetra.com/setup.sh | sh -s -- --skip-login-check):
| Option | |
|---|---|
--proxy <url> |
the HTTP(S) proxy reaching the cluster and its identity provider (in the kubeconfig too); curl needs it from the first command (HTTPS_PROXY, curl -x) |
--no-proxy <hosts> |
hosts reached without the proxy while setting up |
--kubeconfig <file> |
the kubeconfig to configure (default: kubectl's, $KUBECONFIG or ~/.kube/config) |
--kubectl-path <file> |
where kubectl is, or goes (default ~/.local/bin/kubectl); kubelogin goes beside it |
--kubelogin-arg <argument> |
an argument for kubelogin, repeatable: --grant-type=device-code without a browser (an agent, a server: a code to enter on another device) |
--skip-login-check |
no sign-in at the end |
--help |
the options |
A kubectl already there may be one minor version away from the cluster's at most (kubectl's skew policy): the
script stops otherwise, and says what to do. The kubeconfig alone, without the script: https://cloud.dampetra.com/kubeconfig
(the user runs kubectl oidc-login, which needs kubelogin installed as kubectl-oidc_login). Nothing secret in
either.
The cluster knows a member as oidc: and their email (the request for a namespace names that email); their groups,
when the provider gives some, as oidc: and the group. A member has the rights of their role in their namespaces
only (admin: everything there but the quota and the namespace itself, roles and bindings included; deployer:
the workloads), and none elsewhere. kubectl auth whoami shows what the cluster sees.
What being authenticated adds¶
These pages are public: they say how the cluster works, not what runs in it. Through the API, each reader sees what their rights allow:
- Every authenticated user: these pages,
kubectl -n kube-public get configmap ethere-docs -o jsonpath='{.data.index\.md}'(each page is a key:network.md,llms.txt…). - A namespace's members: its own page,
kubectl -n my-app get configmap ethere-docs: its allowed names, its quota, its members, the Flux objects to start from. - Secrets are never in a page: a page names the
Secretholding one, which only those allowed read.