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

APIsecrets.etorm.com/v1alpha1
Resourceprovidertokens (cluster-scoped inside its cluster)
Short namesnone
Available inthe platform and project clusters
Statuswritten 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

FieldTypeRequiredDefaultAllowedDescription
providerstring (one of)yesedgeWhose token it is: edge, the provider of the platform's edge and deployment services.
modestring (one of)"plan"plan, applyplan: report the difference and write nothing. apply: add the permitted declared permissions and remove those named in remove.
tokenIdstringup to 64 charactersThe provider's id of the token. Found from the token itself when empty.
secretRefobjectyesThe 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.namestringyeslength 1 to 63Name of the Secret.
secretRef.keystringyeslength 1 to 63Which key of its data holds the token.
createobjectCreate 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.usingobjectyesThe credential that makes tokens: a Secret that holds a token which may edit tokens.
create.using.namestringyeslength 1 to 63Name of the Secret.
create.using.keystring"token"up to 63 charactersWhich key of its data holds the token.
create.using.projectstringup to 63 charactersThe project (cluster) that holds it; this object's own cluster when empty.
create.tokenNamestringyeslength 1 to 64The name the new token has at the provider.
policieslist of objectyesup to 8 itemsThe permissions the token should hold, by scope.
policies[].scopestring (one of)yesaccount, zoneaccount: the platform's account. zone: one zone of it, named in zone.
policies[].zonestringup to 253 charactersThe zone's name (scope zone).
policies[].permissionslist of stringyesup to 32 itemsPermission names as the provider's API spells them (its dashboard's Edit is Write).
removelist of stringup to 32 itemsPermissions 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.
permissionsAllowlistlist of stringyesup to 64 itemsThe 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

FieldTypeRequiredDefaultAllowedDescription
phasestring (one of)Planned, Ready, Drifted, Unverified, FailedPlanned: 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.
lastCreatedAtstringWhen create mode last made a token (RFC 3339); at most once in ten minutes.
conditionslist of objectDetailed state: Drifted, Updated.
conditions[].typestringAspect.
conditions[].statusstringTrue or False.
conditions[].reasonstringMachine-readable reason.
conditions[].messagestringHuman-readable detail: the missing and extra permissions, never the token.
conditions[].lastTransitionTimestringWhen the status last changed (RFC 3339).
driftstringThe difference in one line (empty when none).
tokenIdstringThe provider's id of the token.
holdslist of stringWhat the token holds now, as scope and permission.
selfManagingbooleanTrue when the token holds the right to edit tokens (which this kind neither declares nor limits).
lastUpdatedAtstringWhen it was last changed by the operator (RFC 3339).
historylist of objectThe last twenty changes the operator made.
history[].atstringWhen (RFC 3339).
history[].addedlist of stringPermissions added.
history[].removedlist of stringPermissions removed.
history[].outcomestringUpdated

Columns in listings

ColumnFrom
Mode.spec.mode
Phase.status.phase
Drifted.status.drift

All resources