Resources / APIToken
APIToken
A bearer secret for a principal. The secret is shown once at creation and never stored.
Overview
| API | iam.etorm.com/v1alpha1 |
| Resource | apitokens (cluster-scoped inside its cluster) |
| Short names | token, tokens |
| Available in | the platform and project clusters |
| Status | none: the object is configuration only |
Minimal example
apiVersion: iam.etorm.com/v1alpha1
kind: APIToken
metadata:
name: example
spec:
subject:
kind: User
name: "<name>"
Spec
| Field | Type | Required | Default | Allowed | Description |
description | string | | | up to 512 characters | |
expiresAt | string | | | up to 20 characters | RFC 3339 UTC, e.g. 2027-01-01T00:00:00Z. |
subject | object | yes | | | The principal the token authenticates as. |
subject.kind | string (one of) | yes | | User, ServiceAccount | |
subject.name | string | yes | | length 1 to 63 | |
Status
| Field | Type | Required | Default | Allowed | Description |
secretHash | string | | | | |
subjectUid | string | | | | The uid of the principal the token was issued for; the token stops working if the principal is deleted and recreated. |
token | string | | | | Returned once, in the create response only. |
Columns in listings
| Column | From |
|---|
| Kind | .spec.subject.kind |
| Subject | .spec.subject.name |
| Expires | .spec.expiresAt |
Related guides
All resources