Skip to content

Commit c069b4d

Browse files
authored
Merge pull request #43284 from tengqm/fix-26034
Remove & clean up outdated information about Node authorization
2 parents 20ef888 + 29b1f8f commit c069b4d

File tree

1 file changed

+34
-41
lines changed
  • content/en/docs/reference/access-authn-authz

1 file changed

+34
-41
lines changed

content/en/docs/reference/access-authn-authz/node.md

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ weight: 90
99
---
1010

1111
<!-- overview -->
12-
Node authorization is a special-purpose authorization mode that specifically authorizes API requests made by kubelets.
12+
Node authorization is a special-purpose authorization mode that specifically
13+
authorizes API requests made by kubelets.
1314

1415

1516
<!-- body -->
@@ -23,40 +24,58 @@ Read operations:
2324
* endpoints
2425
* nodes
2526
* pods
26-
* secrets, configmaps, persistent volume claims and persistent volumes related to pods bound to the kubelet's node
27+
* secrets, configmaps, persistent volume claims and persistent volumes related
28+
to pods bound to the kubelet's node
2729

2830
Write operations:
2931

30-
* nodes and node status (enable the `NodeRestriction` admission plugin to limit a kubelet to modify its own node)
31-
* pods and pod status (enable the `NodeRestriction` admission plugin to limit a kubelet to modify pods bound to itself)
32+
* nodes and node status (enable the `NodeRestriction` admission plugin to limit
33+
a kubelet to modify its own node)
34+
* pods and pod status (enable the `NodeRestriction` admission plugin to limit a
35+
kubelet to modify pods bound to itself)
3236
* events
3337

3438
Auth-related operations:
3539

36-
* read/write access to the [CertificateSigningRequests API](/docs/reference/access-authn-authz/certificate-signing-requests/) for TLS bootstrapping
37-
* the ability to create TokenReviews and SubjectAccessReviews for delegated authentication/authorization checks
40+
* read/write access to the
41+
[CertificateSigningRequests API](/docs/reference/access-authn-authz/certificate-signing-requests/)
42+
for TLS bootstrapping
43+
* the ability to create TokenReviews and SubjectAccessReviews for delegated
44+
authentication/authorization checks
3845

39-
In future releases, the node authorizer may add or remove permissions to ensure kubelets
40-
have the minimal set of permissions required to operate correctly.
46+
In future releases, the node authorizer may add or remove permissions to ensure
47+
kubelets have the minimal set of permissions required to operate correctly.
4148

42-
In order to be authorized by the Node authorizer, kubelets must use a credential that identifies them as
43-
being in the `system:nodes` group, with a username of `system:node:<nodeName>`.
49+
In order to be authorized by the Node authorizer, kubelets must use a credential
50+
that identifies them as being in the `system:nodes` group, with a username of
51+
`system:node:<nodeName>`.
4452
This group and user name format match the identity created for each kubelet as part of
4553
[kubelet TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/).
4654

47-
The value of `<nodeName>` **must** match precisely the name of the node as registered by the kubelet. By default, this is the host name as provided by `hostname`, or overridden via the [kubelet option](/docs/reference/command-line-tools-reference/kubelet/) `--hostname-override`. However, when using the `--cloud-provider` kubelet option, the specific hostname may be determined by the cloud provider, ignoring the local `hostname` and the `--hostname-override` option.
48-
For specifics about how the kubelet determines the hostname, see the [kubelet options reference](/docs/reference/command-line-tools-reference/kubelet/).
55+
The value of `<nodeName>` **must** match precisely the name of the node as
56+
registered by the kubelet. By default, this is the host name as provided by
57+
`hostname`, or overridden via the
58+
[kubelet option](/docs/reference/command-line-tools-reference/kubelet/)
59+
`--hostname-override`. However, when using the `--cloud-provider` kubelet
60+
option, the specific hostname may be determined by the cloud provider, ignoring
61+
the local `hostname` and the `--hostname-override` option.
62+
For specifics about how the kubelet determines the hostname, see the
63+
[kubelet options reference](/docs/reference/command-line-tools-reference/kubelet/).
4964

5065
To enable the Node authorizer, start the apiserver with `--authorization-mode=Node`.
5166

52-
To limit the API objects kubelets are able to write, enable the [NodeRestriction](/docs/reference/access-authn-authz/admission-controllers#noderestriction) admission plugin by starting the apiserver with `--enable-admission-plugins=...,NodeRestriction,...`
67+
To limit the API objects kubelets are able to write, enable the
68+
[NodeRestriction](/docs/reference/access-authn-authz/admission-controllers#noderestriction)
69+
admission plugin by starting the apiserver with
70+
`--enable-admission-plugins=...,NodeRestriction,...`
5371

5472
## Migration considerations
5573

5674
### Kubelets outside the `system:nodes` group
5775

58-
Kubelets outside the `system:nodes` group would not be authorized by the `Node` authorization mode,
59-
and would need to continue to be authorized via whatever mechanism currently authorizes them.
76+
Kubelets outside the `system:nodes` group would not be authorized by the `Node`
77+
authorization mode, and would need to continue to be authorized via whatever
78+
mechanism currently authorizes them.
6079
The node admission plugin would not restrict requests from these kubelets.
6180

6281
### Kubelets with undifferentiated usernames
@@ -70,29 +89,3 @@ and would need to continue to be authorized via whatever mechanism currently aut
7089
The `NodeRestriction` admission plugin would ignore requests from these kubelets,
7190
since the default node identifier implementation would not consider that a node identity.
7291

73-
### Upgrades from previous versions using RBAC
74-
75-
Upgraded pre-1.7 clusters using [RBAC](/docs/reference/access-authn-authz/rbac/) will continue functioning as-is because the `system:nodes` group binding will already exist.
76-
77-
If a cluster admin wishes to start using the `Node` authorizer and `NodeRestriction` admission plugin
78-
to limit node access to the API, that can be done non-disruptively:
79-
80-
1. Enable the `Node` authorization mode (`--authorization-mode=Node,RBAC`) and the `NodeRestriction` admission plugin
81-
2. Ensure all kubelets' credentials conform to the group/username requirements
82-
3. Audit apiserver logs to ensure the `Node` authorizer is not rejecting requests from kubelets (no persistent `NODE DENY` messages logged)
83-
4. Delete the `system:node` cluster role binding
84-
85-
### RBAC Node Permissions
86-
87-
In 1.6, the `system:node` cluster role was automatically bound to the `system:nodes` group when using the [RBAC Authorization mode](/docs/reference/access-authn-authz/rbac/).
88-
89-
In 1.7, the automatic binding of the `system:nodes` group to the `system:node` role is deprecated
90-
because the node authorizer accomplishes the same purpose with the benefit of additional restrictions
91-
on secret and configmap access. If the `Node` and `RBAC` authorization modes are both enabled,
92-
the automatic binding of the `system:nodes` group to the `system:node` role is not created in 1.7.
93-
94-
In 1.8, the binding will not be created at all.
95-
96-
When using RBAC, the `system:node` cluster role will continue to be created,
97-
for compatibility with deployment methods that bind other users or groups to that role.
98-

0 commit comments

Comments
 (0)