TokenRequest

TokenRequest 请求给定服务帐户的令牌。

apiVersion: authentication.k8s.io/v1

import "k8s.io/api/authentication/v1"

TokenRequest

TokenRequest 请求给定服务帐户的令牌。


TokenRequestSpec

TokenRequestSpec 包含客户端提供的令牌请求参数。


  • audiences ([]string), 必需

    Audiences 是令牌的预期目标。令牌的接收者必须使用标识符列表中的标识符来识别自己,否则应拒绝令牌。为多个目标发行的令牌可用于针对列表中的任何目标进行身份验证,但这意味着目标之间存在高度信任关系。

  • boundObjectRef (BoundObjectReference)

    BoundObjectRef 是对令牌将绑定到的对象的引用。令牌仅在绑定对象存在时才有效。注意:API 服务器的 TokenReview 端点将验证 BoundObjectRef,但其他目标可能不会。如果需要立即撤销,请将 ExpirationSeconds 设置为较小的值。

    BoundObjectReference 是对令牌绑定的对象的引用。

    • boundObjectRef.apiVersion (string)

      引用的 API 版本。

    • boundObjectRef.kind (string)

      引用的类型。有效的类型为 'Pod' 和 'Secret'。

    • boundObjectRef.name (string)

      引用的名称。

    • boundObjectRef.uid (string)

      引用的 UID。

  • expirationSeconds (int64)

    ExpirationSeconds 是请求的请求有效期。令牌颁发者可能会返回有效期不同的令牌,因此客户端需要检查响应中的 'expiration' 字段。

TokenRequestStatus

TokenRequestStatus 是令牌请求的结果。


  • expirationTimestamp (Time), 必需

    ExpirationTimestamp 是返回的令牌的过期时间。

    Time 是 time.Time 的包装器,支持正确地将数据编组为 YAML 和 JSON。包装器为 time 包提供的许多工厂方法提供。

  • token (string), 必需

    Token 是不透明的承载令牌。

操作


create 创建服务帐户的令牌

HTTP 请求

POST /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token

参数

响应

200 (TokenRequest): OK

201 (TokenRequest): 已创建

202 (TokenRequest): 已接受

401: 未授权

此页面是自动生成的。

如果您计划报告此页面的问题,请在问题描述中提及页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。

上次修改时间:2022 年 8 月 3 日下午 6:01 PST: v1.25 的 API 参考多页面 (939b45bb27)