@@ -275,9 +275,9 @@ Authorization: Bearer 781292.db7bc3a58fc5f07e
275
275
276
276
<!--
277
277
You must enable the Bootstrap Token Authenticator with the
278
- `-enable-bootstrap-token-auth` flag on the API Server. You must enable
279
- the TokenCleaner controller via the `-controllers` flag on the Controller
280
- Manager. This is done with something like `-controllers=*,tokencleaner`.
278
+ `-- enable-bootstrap-token-auth` flag on the API Server. You must enable
279
+ the TokenCleaner controller via the `-- controllers` flag on the Controller
280
+ Manager. This is done with something like `-- controllers=*,tokencleaner`.
281
281
`kubeadm` will do this for you if you are using it to bootstrap a cluster.
282
282
-->
283
283
你必须在 API 服务器上设置 ` --enable-bootstrap-token-auth ` 标志来启用基于启动引导令牌的身份认证组件。
@@ -495,26 +495,26 @@ sequenceDiagram
495
495
{{< /mermaid >}}
496
496
497
497
<!--
498
- 1. Login to your identity provider
499
- 2. Your identity provider will provide you with an `access_token`, `id_token` and a `refresh_token`
500
- 3. When using `kubectl`, use your `id_token` with the `-token` flag or add it directly to your `kubeconfig`
501
- 4. `kubectl` sends your `id_token` in a header called Authorization to the API server
502
- 5. The API server will make sure the JWT signature is valid by checking against the certificate named in the configuration
503
- 6. Check to make sure the `id_token` hasn't expired
504
- 7. Make sure the user is authorized
505
- 8. Once authorized the API server returns a response to `kubectl`
506
- 9. `kubectl` provides feedback to the user
507
- -->
508
- 1. 登录到你的身份服务(Identity Provider)
509
- 2. 你的身份服务将为你提供 `access_token`、`id_token` 和 `refresh_token`
510
- 3. 在使用 `kubectl` 时,将 `id_token` 设置为 `--token` 标志值,或者将其直接添加到
511
- ` kubeconfig` 中
512
- 4. `kubectl` 将你的 `id_token` 放到一个称作 `Authorization` 的头部,发送给 API 服务器
513
- 5. API 服务器将负责通过检查配置中引用的证书来确认 JWT 的签名是合法的
514
- 6. 检查确认 `id_token` 尚未过期
515
- 7. 确认用户有权限执行操作
516
- 8. 鉴权成功之后,API 服务器向 `kubectl` 返回响应
517
- 9. `kubectl` 向用户提供反馈信息
498
+ 1. Login to your identity provider
499
+ 2. Your identity provider will provide you with an `access_token`, `id_token` and a `refresh_token`
500
+ 3. When using `kubectl`, use your `id_token` with the `- -token` flag or add it directly to your `kubeconfig`
501
+ 4. `kubectl` sends your `id_token` in a header called Authorization to the API server
502
+ 5. The API server will make sure the JWT signature is valid by checking against the certificate named in the configuration
503
+ 6. Check to make sure the `id_token` hasn't expired
504
+ 7. Make sure the user is authorized
505
+ 8. Once authorized the API server returns a response to `kubectl`
506
+ 9. `kubectl` provides feedback to the user
507
+ -->
508
+ 1. 登录到你的身份服务(Identity Provider)
509
+ 2. 你的身份服务将为你提供 `access_token`、`id_token` 和 `refresh_token`
510
+ 3. 在使用 `kubectl` 时,将 `id_token` 设置为 `--token` 标志值,或者将其直接添加到
511
+ ` kubeconfig` 中
512
+ 4. `kubectl` 将你的 `id_token` 放到一个称作 `Authorization` 的头部,发送给 API 服务器
513
+ 5. API 服务器将负责通过检查配置中引用的证书来确认 JWT 的签名是合法的
514
+ 6. 检查确认 `id_token` 尚未过期
515
+ 7. 确认用户有权限执行操作
516
+ 8. 鉴权成功之后,API 服务器向 `kubectl` 返回响应
517
+ 9. `kubectl` 向用户提供反馈信息
518
518
519
519
<!--
520
520
Since all of the data needed to validate who you are is in the `id_token`, Kubernetes doesn't need to
@@ -589,16 +589,15 @@ tokens on behalf of another.
589
589
Kubernetes does not provide an OpenID Connect Identity Provider.
590
590
You can use an existing public OpenID Connect Identity Provider (such as Google, or
591
591
[others](https://connect2id.com/products/nimbus-oauth-openid-connect-sdk/openid-connect-providers)).
592
- Or, you can run your own Identity Provider, such as CoreOS [dex](https://github.com/coreos/dex ),
592
+ Or, you can run your own Identity Provider, such as [dex](https://dexidp.io/ ),
593
593
[Keycloak](https://github.com/keycloak/keycloak),
594
594
CloudFoundry [UAA](https://github.com/cloudfoundry/uaa), or
595
595
Tremolo Security's [OpenUnison](https://openunison.github.io/).
596
596
-->
597
597
Kubernetes 并未提供 OpenID Connect 的身份服务。
598
598
你可以使用现有的公共的 OpenID Connect 身份服务
599
599
(例如 Google 或者[其他服务](https://connect2id.com/products/nimbus-oauth-openid-connect-sdk/openid-connect-providers))。
600
- 或者,你也可以选择自己运行一个身份服务,例如
601
- CoreOS [dex](https://github.com/coreos/dex)、
600
+ 或者,你也可以选择自己运行一个身份服务,例如 [dex](https://dexidp.io/)、
602
601
[Keycloak](https://github.com/keycloak/keycloak)、
603
602
CloudFoundry [UAA](https://github.com/cloudfoundry/uaa) 或者
604
603
Tremolo Security 的 [OpenUnison](https://openunison.github.io/)。
@@ -735,6 +734,9 @@ Webhook authentication is a hook for verifying bearer tokens.
735
734
736
735
* `--authentication-token-webhook-config-file` a configuration file describing how to access the remote webhook service.
737
736
* `--authentication-token-webhook-cache-ttl` how long to cache authentication decisions. Defaults to two minutes.
737
+ * `--authentication-token-webhook-version` determines whether to use `authentication.k8s.io/v1beta1` or `authentication.k8s.io/v1`
738
+ ` TokenReview` objects to send/receive information from the webhook. Defaults to `v1beta1`.
739
+
738
740
-->
739
741
# ## Webhook 令牌身份认证 {#webhook-token-authentication}
740
742
@@ -744,6 +746,9 @@ Webhook 身份认证是一种用来验证持有者令牌的回调机制。
744
746
其中描述如何访问远程的 Webhook 服务。
745
747
* `--authentication-token-webhook-cache-ttl` 用来设定身份认证决定的缓存时间。
746
748
默认时长为 2 分钟。
749
+ * `--authentication-token-webhook-version` 决定是使用 `authentication.k8s.io/v1beta1` 还是
750
+ ` authenticationk8s.io/v1` 版本的 `TokenReview` 对象从 webhook 发送/接收信息。
751
+ 默认为“v1beta1”。
747
752
748
753
<!--
749
754
The configuration file uses the [kubeconfig](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
0 commit comments