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

KEP-3221: Promote StructuredAuthorizationConfiguration to GA #48424

Merged
merged 1 commit into from
Oct 22, 2024
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
6 changes: 3 additions & 3 deletions content/en/docs/reference/access-authn-authz/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ You can use the following modes:
* `--authorization-mode=AlwaysDeny` (always denies requests)

You can choose more than one authorization mode; for example:
`--authorization-mode=Node,Webhook`
`--authorization-mode=Node,RBAC,Webhook`

Kubernetes checks authorization modules based on the order that you specify them
on the API server's command line, so an earlier module has higher priority to allow
Expand All @@ -197,7 +197,7 @@ For more information on command line arguments to the API server, read the

{{< feature-state feature_gate_name="StructuredAuthorizationConfiguration" >}}

As a beta feature, Kubernetes lets you configure authorization chains that can include multiple
Kubernetes lets you configure authorization chains that can include multiple
webhooks. The authorization items in that chain can have well-defined parameters that validate
requests in a particular order, offering you fine-grained control, such as explicit Deny on failures.

Expand All @@ -220,7 +220,7 @@ are only available if you use an authorization configuration file.
#
# DO NOT USE THE CONFIG AS IS. THIS IS AN EXAMPLE.
#
apiVersion: apiserver.config.k8s.io/v1beta1
apiVersion: apiserver.config.k8s.io/v1
kind: AuthorizationConfiguration
authorizers:
- type: Webhook
Expand Down
19 changes: 18 additions & 1 deletion content/en/docs/reference/access-authn-authz/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,24 @@ the local `hostname` and the `--hostname-override` option.
For specifics about how the kubelet determines the hostname, see the
[kubelet options reference](/docs/reference/command-line-tools-reference/kubelet/).

To enable the Node authorizer, start the apiserver with `--authorization-mode=Node`.
To enable the Node authorizer, start the {{< glossary_tooltip text="API server" term_id="kube-apiserver" >}}
with the `--authorization-config` flag set to a file that includes the `Node` authorizer; for example:

```yaml
apiVersion: apiserver.config.k8s.io/v1
kind: AuthorizationConfiguration
authorizers:
...
- type: Node
...
```

Or, start the {{< glossary_tooltip text="API server" term_id="kube-apiserver" >}} with
the `--authorization-mode` flag set to a comma-separated list that includes `Node`;
for example:
```shell
kube-apiserver --authorization-mode=...,Node --other-options --more-options
```

To limit the API objects kubelets are able to write, enable the
[NodeRestriction](/docs/reference/access-authn-authz/admission-controllers#noderestriction)
Expand Down
16 changes: 14 additions & 2 deletions content/en/docs/reference/access-authn-authz/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,22 @@ RBAC authorization uses the `rbac.authorization.k8s.io`
decisions, allowing you to dynamically configure policies through the Kubernetes API.

To enable RBAC, start the {{< glossary_tooltip text="API server" term_id="kube-apiserver" >}}
with the `--authorization-mode` flag set to a comma-separated list that includes `RBAC`;
with the `--authorization-config` flag set to a file that includes the `RBAC` authorizer; for example:

```yaml
apiVersion: apiserver.config.k8s.io/v1
kind: AuthorizationConfiguration
authorizers:
...
- type: RBAC
...
```

Or, start the {{< glossary_tooltip text="API server" term_id="kube-apiserver" >}} with
the `--authorization-mode` flag set to a comma-separated list that includes `RBAC`;
for example:
```shell
kube-apiserver --authorization-mode=Example,RBAC --other-options --more-options
kube-apiserver --authorization-mode=...,RBAC --other-options --more-options
```

## API objects {#api-overview}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ _build:
render: false

stages:
- stage: alpha
- stage: alpha
defaultValue: false
fromVersion: "1.29"
toVersion: "1.29"
- stage: beta
- stage: beta
defaultValue: true
fromVersion: "1.30"
toVersion: "1.31"
- stage: stable
liggitt marked this conversation as resolved.
Show resolved Hide resolved
defaultValue: true
fromVersion: "1.32"
---
Enable structured authorization configuration, so that cluster administrators
can specify more than one [authorization webhook](/docs/reference/access-authn-authz/webhook/)
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/setup/production-environment/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ As someone setting up authentication and authorization on your production Kubern

- *Set the authorization mode*: When the Kubernetes API server
([kube-apiserver](/docs/reference/command-line-tools-reference/kube-apiserver/))
starts, the supported authentication modes must be set using the *--authorization-mode*
starts, supported authorization modes must be set using an *--authorization-config* file or the *--authorization-mode*
flag. For example, that flag in the *kube-adminserver.yaml* file (in */etc/kubernetes/manifests*)
could be set to Node,RBAC. This would allow Node and RBAC authorization for authenticated requests.
- *Create user certificates and role bindings (RBAC)*: If you are using RBAC
Expand Down