Skip to content

Commit c40dcf2

Browse files
committed
[zh-cn]sync token-request-v1
Signed-off-by: xin.li <xin.li@daocloud.io>
1 parent 40bb675 commit c40dcf2

2 files changed

Lines changed: 53 additions & 48 deletions

File tree

content/zh-cn/docs/reference/kubernetes-api/authentication-resources/self-subject-review-v1.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ SelfSubjectReview 包含 kube-apiserver 所拥有的与发出此请求的用户
4242
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
4343

4444
<!--
45-
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
45+
metadata is standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
4646
-->
47-
标准的对象元数据。更多信息:
47+
48+
`metadata` 是标准的对象元数据。更多信息:
4849
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
4950

5051
- **status** (<a href="{{< ref "../authentication-resources/self-subject-review-v1#SelfSubjectReviewStatus" >}}">SelfSubjectReviewStatus</a>)
5152

5253
<!--
53-
Status is filled in by the server with the user attributes.
54+
status is filled in by the server with the user attributes.
5455
-->
55-
status 由服务器以用户属性进行填充。
56+
57+
`status` 由服务器以用户属性进行填充。
5658

5759
## SelfSubjectReviewStatus {#SelfSubjectReviewStatus}
5860

@@ -66,51 +68,53 @@ SelfSubjectReviewStatus 由 kube-apiserver 进行填充并发送回用户。
6668
- **userInfo** (UserInfo)
6769

6870
<!--
69-
User attributes of the user making this request.
71+
userInfo is a set of attributes belonging to the user making this request.
7072
-->
71-
发出此请求的用户的用户属性。
73+
74+
`userInfo` 是属于发出此请求的用户的一组属性。
7275

7376
<a name="UserInfo"></a>
7477
<!--
7578
*UserInfo holds the information about the user needed to implement the user.Info interface.*
7679
-->
80+
7781
**userInfo 包含实现 user.Info 接口所需的用户相关信息。**
7882

7983
- **userInfo.extra** (map[string][]string)
8084

8185
<!--
82-
Any additional information provided by the authenticator.
86+
extra is any additional information provided by the authenticator.
8387
-->
8488

85-
由身份认证组件提供的所有附加信息
89+
`extra` 是指身份验证器提供的任何附加信息
8690

8791
- **userInfo.groups** ([]string)
8892

8993
<!--
9094
*Atomic: will be replaced during a merge*
91-
92-
The names of groups this user is a part of.
95+
96+
groups is the names of groups this user is a part of.
9397
-->
94-
98+
9599
**原子性:合并期间将被替换**
96100

97-
此用户所属的用户组的名称
101+
`groups` 是该用户所属的群组名称
98102

99103
- **userInfo.uid** (string)
100104

101105
<!--
102-
A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.
106+
uid is a unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.
103107
-->
104108

105-
跨时间标识此用户的唯一值。如果此用户被删除且另一个同名用户被添加,他们将具有不同的 UID。
109+
`uid` 是跨时间标识此用户的唯一值。如果此用户被删除且另一个同名用户被添加,他们将具有不同的 UID。
106110

107111
- **userInfo.username** (string)
108112

109113
<!--
110-
The name that uniquely identifies this user among all active users.
114+
username is the name that uniquely identifies this user among all active users.
111115
-->
112116

113-
在所有活跃用户中标识此用户的名称
117+
`username` 是在所有活跃用户中标识此用户的名称
114118

115119
<!--
116120
## Operations {#Operations}
@@ -153,7 +157,7 @@ POST /apis/authentication.k8s.io/v1/selfsubjectreviews
153157
-->
154158
#### 参数
155159

156-
- **body**: <a href="{{< ref "../authentication-resources/self-subject-review-v1#SelfSubjectReview" >}}">SelfSubjectReview</a>, 必需
160+
- **body**: <a href="{{< ref "../authentication-resources/self-subject-review-v1#SelfSubjectReview" >}}">SelfSubjectReview</a>必需
157161

158162
- **dryRun** (**查询参数**): string
159163

content/zh-cn/docs/reference/kubernetes-api/authentication-resources/token-request-v1.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,26 @@ TokenRequest 为给定的服务账号请求一个令牌。
3939

4040
<!--
4141
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
42-
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
42+
metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
4343
44-
- **spec** (<a href="{{< ref "../authentication-resources/token-request-v1#TokenRequestSpec" >}}">TokenRequestSpec</a>), required
45-
Spec holds information about the request being evaluated
44+
- **spec** (<a href="{{< ref "../authentication-resources/token-request-v1#TokenRequestSpec" >}}">TokenRequestSpec</a>)
45+
spec holds information about the request being evaluated
4646
- **status** (<a href="{{< ref "../authentication-resources/token-request-v1#TokenRequestStatus" >}}">TokenRequestStatus</a>)
4747
48-
Status is filled in by the server and indicates whether the token can be authenticated.
48+
status is filled in by the server and indicates whether the token can be authenticated.
4949
-->
5050
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
5151

52-
标准的对象元数据。更多信息:
52+
`metadata` 是标准的对象元数据。更多信息:
5353
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
5454

55-
- **spec** (<a href="{{< ref "../authentication-resources/token-request-v1#TokenRequestSpec" >}}">TokenRequestSpec</a>),必需
55+
- **spec** (<a href="{{< ref "../authentication-resources/token-request-v1#TokenRequestSpec" >}}">TokenRequestSpec</a>)
5656

57-
spec 包含与正被评估的请求相关的信息。
57+
`spec` 包含与正被评估的请求相关的信息。
5858

5959
- **status** (<a href="{{< ref "../authentication-resources/token-request-v1#TokenRequestStatus" >}}">TokenRequestStatus</a>)
6060

61-
status 由服务器填充,表示该令牌是否可用于身份认证。
61+
`status` 由服务器填充,表示该令牌是否可用于身份认证。
6262

6363
## TokenRequestSpec {#TokenRequestSpec}
6464

@@ -70,47 +70,48 @@ TokenRequestSpec 包含客户端提供的令牌请求参数。
7070
<hr>
7171

7272
<!--
73-
- **audiences** ([]string), required
73+
- **audiences** ([]string)
7474
7575
*Atomic: will be replaced during a merge*
7676
77-
Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
77+
audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
7878
-->
79-
- **audiences** ([]string),必需
79+
- **audiences** ([]string)
8080

8181
**原子:将在合并期间被替换**
8282

83-
audiences 是令牌预期的受众。
83+
`audiences` 是令牌预期的受众。
8484
令牌的接收方必须在令牌的受众列表中用一个标识符来标识自己,否则应拒绝该令牌。
8585
为多个受众签发的令牌可用于认证所列举的任意受众的身份,但这意味着目标受众彼此之间的信任程度较高。
8686

8787
- **boundObjectRef** (BoundObjectReference)
8888

8989
<!--
90-
BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.
90+
boundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.
9191
9292
<a name="BoundObjectReference"></a>
9393
*BoundObjectReference is a reference to an object that a token is bound to.*
9494
-->
95-
boundObjectRef 是对令牌所绑定的一个对象的引用。该令牌只有在绑定对象存在时才有效。
96-
注:API 服务器的 TokenReview 端点将校验 boundObjectRef,但其他受众可能不用这样。
97-
如果你想要快速撤销,请为 expirationSeconds 设一个较小的值。
95+
96+
`boundObjectRef` 是对令牌所绑定的一个对象的引用。该令牌只有在绑定对象存在时才有效。
97+
注:API 服务器的 TokenReview 端点将校验 `boundObjectRef`,但其他受众可能不用这样。
98+
如果你想要快速撤销,请为 `expirationSeconds` 设一个较小的值。
9899

99100
<a name="BoundObjectReference"></a>
100101
**BoundObjectReference 是对令牌所绑定的一个对象的引用。**
101102

102103
<!--
103104
- **boundObjectRef.apiVersion** (string)
104-
API version of the referent.
105+
apiVersion of the referent.
105106
106107
- **boundObjectRef.kind** (string)
107-
Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
108+
kind of the referent. Valid kinds are 'Pod' and 'Secret'.
108109
109110
- **boundObjectRef.name** (string)
110-
Name of the referent.
111+
name of the referent.
111112
112113
- **boundObjectRef.uid** (string)
113-
UID of the referent.
114+
uid of the referent.
114115
-->
115116

116117
- **boundObjectRef.apiVersion** (string)
@@ -131,11 +132,11 @@ TokenRequestSpec 包含客户端提供的令牌请求参数。
131132
<!--
132133
- **expirationSeconds** (int64)
133134
134-
ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.
135+
expirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.
135136
-->
136137
- **expirationSeconds** (int64)
137138

138-
expirationSeconds 是请求生效的持续时间。
139+
`expirationSeconds` 是请求生效的持续时间。
139140
令牌签发方可能返回一个生效期不同的令牌,因此客户端需要检查响应中的 “expiration” 字段。
140141

141142
## TokenRequestStatus {#TokenRequestStatus}
@@ -148,25 +149,25 @@ TokenRequestStatus 是一个令牌请求的结果。
148149
<hr>
149150

150151
<!--
151-
- **expirationTimestamp** (Time), required
152-
ExpirationTimestamp is the time of expiration of the returned token.
152+
- **expirationTimestamp** (Time)
153+
expirationTimestamp is the time of expiration of the returned token.
153154
154155
<a name="Time"></a>
155156
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
156157
157-
- **token** (string), required
158-
Token is the opaque bearer token.
158+
- **token** (string)
159+
token is the opaque bearer token.
159160
-->
160-
- **expirationTimestamp** (Time),必需
161+
- **expirationTimestamp** (Time)
161162

162-
expirationTimestamp 是已返回令牌的到期时间。
163+
`expirationTimestamp` 是已返回令牌的到期时间。
163164

164165
<a name="Time"></a>
165166
**Time 是 time.Time 的包装器,支持正确编组为 YAML 和 JSON。为 time 包提供的许多工厂方法提供了包装器。**
166167

167-
- **token** (string),必需
168+
- **token** (string)
168169

169-
token 是不透明的持有者令牌(Bearer Token)。
170+
`token` 是不透明的持有者令牌(Bearer Token)。
170171

171172
<!--
172173
## Operations {#Operations}
@@ -199,7 +200,7 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token
199200

200201
- **name** (**路径参数**): string,必需
201202

202-
TokenRequest 的名称
203+
TokenRequest 的名称
203204

204205
- **namespace** (**路径参数**): string,必需
205206

0 commit comments

Comments
 (0)