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

Provider API Tokens

A provider API token is an API token that a service provider validates. It is bound to one provider and one service. It carries one or more actions of that service. Use it for an endpoint that the provider exposes directly, such as the AI inference API or a container registry.

A provider API token does not authenticate to the UCloud/Core API. For the platform API, use a platform API token.

flowchart LR
    client["Tool, script, or job<br/>Bearer token"]:::diagram-external-code-bracket
    endpoint["Provider endpoint"]:::diagram-provider-globe-alt
    service["Provider service<br/>Inference or registry"]:::diagram-provider-cog-6-tooth
    store["Token store<br/>Hash | permissions"]:::diagram-provider-circle-stack
    backend["Backend<br/>Model or image store"]:::diagram-provider-server
    audit["Audit<br/>Token reference"]:::diagram-provider-document-text

    client -->|"uci..."| endpoint
    endpoint --> service
    service -->|"checks"| store
    service -->|"authorizes"| backend
    service -->|"writes"| audit

The path of a provider API token. The provider endpoint accepts the request, the service validates the token against its permission store, and the service authorizes the call. The figure does not show how the service implements the request.

Token record

A token is created with a title, description, provider, service, actions, scope, and expiry. The platform returns the secret once. UCloud/Core and the provider store different parts of the record.

DataStored byNotes
Token IDUCloud/Core and providerThe secret prefix uci-... includes the ID. The provider uses the ID to find the token.
Created byUCloud/Core and providerThe user that created the token.
Title and descriptionUCloud/CoreMetadata for the token resource.
Provider and serviceUCloud/Core and providerA provider token names exactly one service.
OwnerUCloud/Core and providerA user, or a project when the service uses a project scope.
PermissionsUCloud/Core and providerThe service and its actions.
ExpiryUCloud/Core and providerThe validator rejects the token after this time. A job token has no expiry.
Secret hash and saltProviderPBKDF2-SHA512 hash with a per-token salt. UCloud/Core does not store the hash for a provider token.
Last usedProviderUpdated when the provider validates the token.
Server URLUCloud/CoreThe base URL that the provider returns.
SecretThe provider job secret store for a job token. The token table stores no secret.Shown once when the platform creates the token. A job token is kept until the job starts.

A provider token must name exactly one service. It can name several actions of that service. The token is bound to the provider that issued it. It does not work on another provider.

Permissions

PermissionActionsContextUsed by
inferenceuseProjectAI Inference
containerRepositorypull, pushPersonalContainer repositories

A provider token acts as its owner for the permissions it names. The provider checks the permissions on each request.

Use a token

Send the secret in the Authorization header:

curl https://chat.example.org/v1/models \
    -H "Authorization: Bearer uci-..."

The server URL on the token is the base URL of the provider service. The inference API uses the routes in Public surface.

Validation

The client sends Authorization: Bearer uci-<token-id>-<secret>. The provider does the following:

  1. Parse the token ID and the secret.
  2. Load the token record for the service.
  3. Check the expiry and the password hash.
  4. Check the service and its actions.
  5. Update last_used_at when it loads the record.

The provider rejects an invalid or expired token, and it rejects a request that the token permissions do not allow. A provider token is not accepted by UCloud/Core.

Scope

A provider token has one owner, either a user or a project. The owner and the permissions are fixed when the platform creates the token. The service decides which scopes it allows. For inference, the token uses a project. For container repositories, the token uses a personal scope.

The token can do only what its service and actions allow. It cannot give more access than its owner has in the provider.

Project membership

The provider does not check the current project membership on each request. UCloud/Core sends project membership updates to the provider, and the provider revokes a project token when its creator is no longer a member. A short delay is possible.

A project token that a remaining member created stays valid. A token that other people know is a shared secret. If such a person leaves the project, revoke the token manually.

Job tokens follow the job lifecycle instead. See Job tokens.

Expiry

An inference token created from the model page expires after 90 days. See Where users meet the feature.

Revoke a token

A user with edit access can revoke a token. The platform asks the provider to revoke the token before it deletes the token resource. If the provider fails, the token remains.

Revocation removes the token from the provider. It does not remove data that a client already received.

Job tokens

UCloud/Core creates one inference token per available provider when a job asks for inference servers. The token is linked to the job and has no fixed expiry. UCloud/Core revokes it when the job ends. The Integration Module receives each token as a transient api_server resource and exposes it to the job as an environment variable. See Inference servers.

A job token is a provider token for the inference service. It is not a user-managed token, and it is hidden from the default token list. It appears in the environment of the job container. Every process in the container can read it.

Security

A job token is visible to every process in the job container. Do not print it. For a token that a user creates, use one token for each client or person when you need to tell them apart in the audit log.

Audit

An inference request records the token ID in the token_reference field. See Audit.

Related

  • API Tokens
  • Platform API Tokens
  • Security
  • Audit
Previous Platform API Tokens
Next Accounting