UCloud logo UCloud logo UCloud
v2026.7.0-k8s.18
  1. UCloud/Core
  2. 1. Introduction
  3. 2. Projects
  4. 3. API Tokens
    1. 3.1. Platform API Tokens
    2. 3.2. Provider API Tokens
  5. 4. Accounting
  6. 5. Orchestration
  7. 6. Frontend
  8. UCloud/IM for Slurm-based HPC
  9. 7. Installation
  10. 8. Architecture and Networking
  11. 9. User and Project Management
  12. 10. Filesystem Integration
    1. 10.1. Inter-provider file transfers
  13. 11. Slurm Integration
    1. 11.1. Application Management
    2. 11.2. Built-in Applications
  14. 12. Reference
    1. 12.1. Configuration
    2. 12.2. CLI
  15. 13. Appendix
    1. 13.1. Built-in Application Index
  16. UCloud/IM for Kubernetes
  17. 14. Installation
  18. 15. Architecture and Networking
  19. 16. Filesystem Integration
  20. 17. Compute Jobs
    1. 17.1. Networks
    2. 17.2. Public Links
    3. 17.3. Public IPs
    4. 17.4. License Servers
    5. 17.5. SSH Servers
    6. 17.6. Job Audit Log
    7. 17.7. Virtual machines
  21. 18. AI Inference
    1. 18.1. Architecture
    2. 18.2. Chat Middleware
    3. 18.3. Chat Playground
    4. 18.4. Model Discovery and Catalog
    5. 18.5. Dynamo Deployments
    6. 18.6. Usage and Accounting
    7. 18.7. Audit
    8. 18.8. Metrics
    9. 18.9. Security
  22. 19. Integrated applications
    1. 19.1. Syncthing
    2. 19.2. Integrated terminal
    3. 19.3. Kubernetes clusters
      1. 19.3.1. Architecture
      2. 19.3.2. Stacks
      3. 19.3.3. Creating a cluster
      4. 19.3.4. Cluster dashboard
      5. 19.3.5. Networking and storage
      6. 19.3.6. Maintenance and upgrades
      7. 19.3.7. Backup and recovery
      8. 19.3.8. Reference
  23. 20. UCX applications
    1. 20.1. Hello world
    2. 20.2. Data binding
    3. 20.3. UI events
    4. 20.4. Component reference
    5. 20.5. API reference
  24. 21. Reference
    1. 21.1. Configuration
    2. 21.2. CLI
  25. Style guidelines
  26. 22. Branding and identity for UCloud
  27. 23. Documentation
  28. H: Procedures
  29. 24. H: Procedures
  30. 25. H: Introduction
  31. 26. H: Auditing
  32. 27. H: Auditing scenario
  33. 28. H: GitHub actions
  34. 29. H: Deployment
  35. 30. H: 3rd party dependencies (risk assesment)
  36. Glossary
  37. 31. Glossary
  1. Links
  2. Source Code
  3. Releases

Platform API Tokens

A platform API token is an API token that UCloud/Core validates. It authenticates as its user to UCloud/Core, not to a provider endpoint. It uses one workspace context as the active context. Use it for scripts and tools that call the UCloud/Core API.

You can use a platform API token to manage provider-backed resources through UCloud/Core, for example to submit a job or read a file. UCloud/Core applies the roles and access rules of the user and calls the provider on the user’s behalf. The platform token itself is not sent to the provider.

A platform API token does not carry a provider service permission. It does not work on an endpoint that a provider exposes directly. Examples are the AI inference endpoint and a container repository. Those endpoints validate a provider API token.

flowchart LR
    client["Tool or script<br/>Bearer token"]:::diagram-external-code-bracket
    core["UCloud/Core<br/>Token validation"]:::diagram-external-ucloud
    store["Token store<br/>Hash | salt"]:::diagram-external-circle-stack
    user["User<br/>Roles | workspace access"]:::diagram-external-user
    api["Platform API<br/>Authorized request"]:::diagram-external-globe-alt
    audit["Audit<br/>Token reference"]:::diagram-external-document-text

    client -->|"uc..."| core
    core -->|"checks"| store
    core -->|"loads"| user
    core -->|"authorizes"| api
    core -->|"writes"| audit

The path of a platform API token. UCloud/Core validates the token, loads the user, applies the roles and workspace access, and authorizes the platform API call. The figure does not show how the token is stored.

Token record

A token is created for a user and a workspace, with a title, description, and expiry. UCloud/Core stores the token as a resource and in the API token table.

DataStored byNotes
Token IDUCloud/CoreThe secret prefix uc... includes the ID.
Created byUCloud/CoreThe user that created the token.
WorkspaceUCloud/CoreA project or the personal workspace.
Title and descriptionUCloud/CoreMetadata for the token resource.
PermissionsUCloud/CoreEmpty. The token acts as the user.
ExpiryUCloud/CoreThe platform rejects the token after this time.
Secret hash and saltUCloud/CorePBKDF2-SHA512 hash with a per-token salt.
Server URLUCloud/CoreThe base URL of the UCloud/Core API. A platform token has no provider server URL.
SecretNeitherShown once when the platform creates the token.

A platform API token has no service or action. The platform applies the normal roles and access rules of the user. The token acts as the user for the platform API.

Use a token

Send the secret in the Authorization header:

curl https://cloud.example.org/api/tokens \
    -H "Authorization: Bearer uc..."

The server URL on a platform API token is the base URL of the UCloud/Core API. It has no provider server URL.

Validation

The client sends Authorization: Bearer uc<token-id>-<secret>. UCloud/Core does the following:

  1. Parse the token ID and the secret.
  2. Load the token record.
  3. Check the expiry and the password hash.
  4. Load the user.
  5. Check that the user still has access to the workspace.
  6. Set the token reference.
  7. Apply the roles and access rules of the user.

UCloud/Core rejects an invalid or expired token, and it rejects a token whose user no longer has access to the workspace. The token has no service permissions. It does not authenticate against a provider endpoint.

Scope

A platform API token belongs to one user and uses one workspace context as the active context. The platform checks that the user still has access to that context. If the user is no longer a member of the selected project, the platform rejects the token.

The token acts as the user, with the selected workspace as the active context. It has the same access as the user. Treat it as a password for the user account. Do not share it between people.

Expiry

The platform rejects a token after its expiry date. A token has the expiry date that the user selected when the platform created it.

Revoke a token

A user with edit access can revoke a token. The platform deletes the token resource.

Security

A platform token has the full access of its user. Use a provider token when the client only needs one provider service. Do not share a platform token between people.

Audit

A platform API call records the token reference in the audit log. The secret is not part of the request. See Auditing.

Related

  • API Tokens
  • Provider API Tokens
  • Audit
Previous API Tokens
Next Provider API Tokens