Resources / ProviderToken
ProviderToken
The permissions of an API token the platform uses at an outside provider, as desired state. Every pass the operator reads the token's live permissions back and reports the difference from what is declared here; in apply mode it adds the declared permissions that the allowlist and the platform's fixed safe list permit, and removes only what the remove list names. Starts in plan mode. Only in the root cluster and in system projects.
Overview
| API | secrets.etorm.com/v1alpha1 |
| Resource | providertokens (cluster-scoped inside its cluster) |
| Short names | none |
| Available in | the platform and project clusters |
| Status | written by a controller through /status |
Minimal example
apiVersion: secrets.etorm.com/v1alpha1
kind: ProviderToken
metadata:
name: example
spec:
provider: edge
secretRef:
name: "<name>"
key: "<key>"
policies:
- scope: account
permissions:
- "<permissions>"
permissionsAllowlist:
- "<permissionsAllowlist>"
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
provider | string (one of) | yes | edge | Whose token it is: edge, the provider of the platform's edge and deployment services. | |
mode | string (one of) | "plan" | plan, apply | plan: report the difference and write nothing. apply: add the permitted declared permissions and remove those named in remove. | |
tokenId | string | up to 64 characters | The provider's id of the token. Found from the token itself when empty. | ||
secretRef | object | yes | The Secret in this cluster that holds the token: it exists when the object is made, except in create mode, where the operator makes it. | ||
secretRef.name | string | yes | length 1 to 63 | Name of the Secret. | |
secretRef.key | string | yes | length 1 to 63 | Which key of its data holds the token. | |
create | object | Create mode: when the Secret named by secretRef has no value (it was never made, or it was lost) the operator makes the token at the provider with exactly the permissions declared in policies, writes its value straight into that Secret and nowhere else (the provider returns it once; it is never logged or shown), and revokes the token it replaces. Only in apply mode. | |||
create.using | object | yes | The credential that makes tokens: a Secret that holds a token which may edit tokens. | ||
create.using.name | string | yes | length 1 to 63 | Name of the Secret. | |
create.using.key | string | "token" | up to 63 characters | Which key of its data holds the token. | |
create.using.project | string | up to 63 characters | The project (cluster) that holds it; this object's own cluster when empty. | ||
create.tokenName | string | yes | length 1 to 64 | The name the new token has at the provider. | |
policies | list of object | yes | up to 8 items | The permissions the token should hold, by scope. | |
policies[].scope | string (one of) | yes | account, zone | account: the platform's account. zone: one zone of it, named in zone. | |
policies[].zone | string | up to 253 characters | The zone's name (scope zone). | ||
policies[].permissions | list of string | yes | up to 32 items | Permission names as the provider's API spells them (its dashboard's Edit is Write). | |
remove | list of string | up to 32 items | Permissions to take away from the token, as 'account: Name' or 'zone:<zone name>: Name'. Without this list the operator only ever adds: a permission the token holds that is not declared is left alone (it may be in use). A permission cannot be both declared and removed. | ||
permissionsAllowlist | list of string | yes | up to 64 items | The permissions this token may ever be given. Each must be on the platform's fixed safe list; a declared permission outside it is refused. |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
phase | string (one of) | Planned, Ready, Drifted, Unverified, Failed | Planned: plan mode. Ready: the token holds every permitted declared permission and nothing named in remove. Drifted: it does not. Failed: the token could not be read or updated. | ||
lastCreatedAt | string | When create mode last made a token (RFC 3339); at most once in ten minutes. | |||
conditions | list of object | Detailed state: Drifted, Updated. | |||
conditions[].type | string | Aspect. | |||
conditions[].status | string | True or False. | |||
conditions[].reason | string | Machine-readable reason. | |||
conditions[].message | string | Human-readable detail: the missing and extra permissions, never the token. | |||
conditions[].lastTransitionTime | string | When the status last changed (RFC 3339). | |||
drift | string | The difference in one line (empty when none). | |||
tokenId | string | The provider's id of the token. | |||
holds | list of string | What the token holds now, as scope and permission. | |||
selfManaging | boolean | True when the token holds the right to edit tokens (which this kind neither declares nor limits). | |||
lastUpdatedAt | string | When it was last changed by the operator (RFC 3339). | |||
history | list of object | The last twenty changes the operator made. | |||
history[].at | string | When (RFC 3339). | |||
history[].added | list of string | Permissions added. | |||
history[].removed | list of string | Permissions removed. | |||
history[].outcome | string | Updated |
Columns in listings
| Column | From |
|---|---|
| Mode | .spec.mode |
| Phase | .status.phase |
| Drifted | .status.drift |