Skip to content

Commit 4697ee1

Browse files
authored
Merge pull request #41143 from bzsuni/sync/doc
[zh-cn] sync reference/access-authn-authz/authentication.md
2 parents fec2272 + cac9aec commit 4697ee1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

content/zh-cn/docs/reference/access-authn-authz/authentication.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ The following `ExecCredential` manifest describes a cluster information sample.
19971997
-->
19981998
## 为客户端提供的对身份验证信息的 API 访问 {#self-subject-review}
19991999

2000-
{{< feature-state for_k8s_version="v1.26" state="alpha" >}}
2000+
{{< feature-state for_k8s_version="v1.27" state="beta" >}}
20012001

20022002
<!--
20032003
If your cluster has the API enabled, you can use the `SelfSubjectReview` API to find out how your Kubernetes cluster maps your authentication information to identify you as a client. This works whether you are authenticating as a user (typically representing a real person) or as a ServiceAccount.
@@ -2016,12 +2016,12 @@ Kubernetes API 服务器收到请求后,将使用用户属性填充 status 字
20162016
请求示例(主体将是 `SelfSubjectReview`):
20172017

20182018
```
2019-
POST /apis/authentication.k8s.io/v1alpha1/selfsubjectreviews
2019+
POST /apis/authentication.k8s.io/v1beta1/selfsubjectreviews
20202020
```
20212021
20222022
```json
20232023
{
2024-
"apiVersion": "authentication.k8s.io/v1alpha1",
2024+
"apiVersion": "authentication.k8s.io/v1beta1",
20252025
"kind": "SelfSubjectReview"
20262026
}
20272027
```
@@ -2033,7 +2033,7 @@ Response example:
20332033

20342034
```json
20352035
{
2036-
"apiVersion": "authentication.k8s.io/v1alpha1",
2036+
"apiVersion": "authentication.k8s.io/v1beta1",
20372037
"kind": "SelfSubjectReview",
20382038
"status": {
20392039
"userInfo": {
@@ -2053,11 +2053,11 @@ Response example:
20532053
```
20542054

20552055
<!--
2056-
For convenience, the `kubectl alpha auth whoami` command is present. Executing this command will produce the following output (yet different user attributes will be shown):
2056+
For convenience, the `kubectl auth whoami` command is present. Executing this command will produce the following output (yet different user attributes will be shown):
20572057
20582058
* Simple output example
20592059
-->
2060-
为了方便,Kubernetes 提供了 `kubectl alpha auth whoami` 命令。
2060+
为了方便,Kubernetes 提供了 `kubectl auth whoami` 命令。
20612061
执行此命令将产生以下输出(但将显示不同的用户属性):
20622062

20632063
* 简单的输出示例
@@ -2173,16 +2173,16 @@ By default, all authenticated users can create `SelfSubjectReview` objects when
21732173
You can only make `SelfSubjectReview` requests if:
21742174
* the `APISelfSubjectReview`
21752175
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
2176-
is enabled for your cluster
2177-
* the API server for your cluster has the `authentication.k8s.io/v1alpha1`
2176+
is enabled for your cluster (enabled by default after reaching Beta)
2177+
* the API server for your cluster has the `authentication.k8s.io/v1alpha1` or `authentication.k8s.io/v1beta1`
21782178
{{< glossary_tooltip term_id="api-group" text="API group" >}}
21792179
enabled.
21802180
-->
21812181
你只能在以下情况下进行 `SelfSubjectReview` 请求:
21822182

2183-
* 集群启用了 `APISelfSubjectReview`
2183+
* 集群启用了 `APISelfSubjectReview` (Beta 版本默认启用)
21842184
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
2185-
* 集群的 API 服务器已启用 `authentication.k8s.io/v1alpha1`
2185+
* 集群的 API 服务器已启用 `authentication.k8s.io/v1alpha1` 或者 `authentication.k8s.io/v1beta1`
21862186
{{< glossary_tooltip term_id="api-group" text="API 组" >}}。。
21872187
{{< /note >}}
21882188

0 commit comments

Comments
 (0)