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:API 参考多页面 v1.25 (939b45bb27)