Skip to content

Commit ff35e2d

Browse files
committed
[zh-cn]Update abac.md
1 parent fec5593 commit ff35e2d

File tree

1 file changed

+8
-8
lines changed
  • content/zh-cn/docs/reference/access-authn-authz

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Attribute-based access control (ABAC) defines an access control paradigm whereby
3131
3232
To enable `ABAC` mode, specify `--authorization-policy-file=SOME_FILENAME` and `--authorization-mode=ABAC` on startup.
3333
34-
The file format is [one JSON object per line](http://jsonlines.org/). There
34+
The file format is [one JSON object per line](https://jsonlines.org/). There
3535
should be no enclosing list or map, only one map per line.
3636
3737
Each line is a "policy object", where each such object is a map with the following
@@ -57,7 +57,7 @@ properties:
5757
- Non-resource-matching properties:
5858
- `nonResourcePath`, type string; non-resource request paths.
5959
- Ex: `/version` or `/apis`
60-
- Wildcard:
60+
- Wildcard:
6161
- `*` matches all non-resource requests.
6262
- `/foo/*` matches all subpaths of `/foo/`.
6363
- `readonly`, type boolean, when true, means that the Resource-matching policy only applies to get, list, and watch operations, Non-resource-matching policy only applies to get operation.
@@ -155,7 +155,7 @@ resource, and nonResourcePath properties set to `"*"`.
155155
<!--
156156
## Kubectl
157157
158-
Kubectl uses the `/api` and `/apis` endpoints of api-server to discover
158+
Kubectl uses the `/api` and `/apis` endpoints of apiserver to discover
159159
served resource types, and validates objects sent to the API by create/update
160160
operations using schema information located at `/openapi/v2`.
161161
@@ -174,7 +174,7 @@ up the verbosity:
174174

175175
## kubectl
176176

177-
kubectl 使用 api-server`/api``/apis` 端点来发现服务资源类型,
177+
kubectl 使用 apiserver`/api``/apis` 端点来发现服务资源类型,
178178
并使用位于 `/openapi/v2` 的模式信息来验证通过创建/更新操作发送到 API 的对象。
179179

180180
当使用 ABAC 鉴权时,这些特殊资源必须显式地通过策略中的 `nonResourcePath` 属性暴露出来(参见下面的 [示例](#examples)):
@@ -249,11 +249,11 @@ kubectl 使用 api-server 的 `/api` 和 `/apis` 端点来发现服务资源类
249249
```
250250

251251
<!--
252-
[Complete file example](http://releases.k8s.io/{{< param "fullversion" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
252+
[Complete file example](https://releases.k8s.io/{{< param "fullversion" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
253253

254254
## A quick note on service accounts
255255

256-
Every service account has a corresponding ABAC username, and that service account's user name is generated according to the naming convention:
256+
Every service account has a corresponding ABAC username, and that service account's username is generated according to the naming convention:
257257

258258
```shell
259259
system:serviceaccount:<namespace>:<serviceaccountname>
@@ -277,14 +277,14 @@ Creating a new namespace leads to the creation of a new service account in the f
277277
system:serviceaccount:<namespace>:default
278278
```
279279
280-
For example, if you wanted to grant the default service account (in the `kube-system` namespace) full
280+
For example, if you wanted to grant the default service account (in the `kube-system` namespace) full
281281
privilege to the API using ABAC, you would add this line to your policy file:
282282
283283
```json
284284
{"apiVersion":"abac.authorization.kubernetes.io/v1beta1","kind":"Policy","spec":{"user":"system:serviceaccount:kube-system:default","namespace":"*","resource":"*","apiGroup":"*"}}
285285
```
286286
287-
The apiserver will need to be restarted to pickup the new policy lines.
287+
The apiserver will need to be restarted to pick up the new policy lines.
288288
-->
289289

290290
创建新的命名空间也会导致创建一个新的服务帐户:

0 commit comments

Comments
 (0)