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

Security

This page describes the security controls of the AI inference feature. It covers the public API, the token model, the playground, and the stored data.

Trust boundaries

flowchart TB
    subgraph clients["Users and clients"]
        browser["Browser<br/>Web session"]:::diagram-external-window
        tool["Tool or script<br/>OpenAI client"]:::diagram-external-code-bracket
        job["Job container<br/>OpenAI client"]:::diagram-provider-cube
    end

    subgraph core["UCloud/Core"]
        ui["Web interface"]:::diagram-external-window
    end

    subgraph provider["Provider cluster"]
        gateway["Gateway"]:::diagram-provider-globe-alt
        im["UCloud/IM<br/>Inference"]:::diagram-provider-ucloud
        playground["UCX application<br/>Chat playground"]:::diagram-provider-puzzle-piece
        files["Member drive<br/>Threads, attachments & responses"]:::diagram-provider-folder
        backend["Backend server<br/>OpenAI compatible"]:::diagram-provider-server
    end

    class clients diagram-external-user-group
    class core diagram-external-ucloud
    class provider diagram-provider-kubernetes

    clients -->|"authenticated channel"| gateway
    ui -.->|"orchestrates"| playground
    gateway --> im
    im --> files
    im --> backend

The trust boundaries of the AI inference feature. The clients reach the provider through an authenticated channel at the gateway. UCloud/Core orchestrates the provider-hosted playground in UCloud/IM and proxies the browser connection. The dotted arrow shows the control path. The figure does not show the internal request flow.

The feature spans three groups of systems:

  • The clients. Browsers, tools, scripts, and job containers. A client holds a bearer token or a web session.
  • UCloud/Core. The web interface and the accounting system. Core orchestrates the playground and proxies its connection to the provider.
  • The provider. The gateway, UCloud/IM with the provider-hosted playground, the member drive, and the inference backend.

A request crosses into the provider at the gateway. The gateway forwards the request to UCloud/IM. UCloud/IM authenticates the caller, checks the model, applies admission control, and calls the backend.

The playground is a UCX application that runs in UCloud/IM. The browser uses a web session with UCloud/Core. Core communicates with the provider on the user’s behalf through the standard Core-to-provider mechanism. The playground does not use an API token.

Authentication and authorization

Public API

The public inference API authenticates each request with a bearer token in the Authorization header. The token must have the inference/use permission. UCloud/IM resolves the token to its owner, either a user or a project. The owner selects the wallet that pays for the request.

ConditionResult
The request has no bearer token, or the secret is invalid.403
The token does not have inference/use.403
The model is not visible to the owner.403
The model is not in the catalog.404
The wallet of the owner is locked.402
Admission control has no free slot before the timeout.429

The catalog check runs after authentication. A public model is visible to every user. A private model is visible only to the projects in its availableTo list. See Visibility.

Admission control limits the load that one caller can add. The limit is 64 concurrent requests per authenticated user and 4096 concurrent requests for all owners. The wallet owner is the limit key when the request has no username. The request body limit is 16 MB, and a request times out after 30 minutes. See Limits.

Chat playground

The chat playground is a UCX application that the provider hosts in UCloud/IM. It uses the web session of the user and does not use an API token. The owner of the playground session selects the wallet that pays for the calls.

Jobs

UCloud/Core creates the inference tokens for a job, links them to the job, and revokes them when the job ends. The tokens have no fixed expiry. They arrive as environment variables in the job container. A job token has the same inference permission as a token that a user creates. See Inference servers and Provider API Tokens.

Administration

The access.administrators list holds the project IDs that may curate the model catalog. An administrator can see every model, including models that are not visible to the administrator as a user. The access.testers list holds the projects that see newly discovered private models. See Model Discovery and Catalog.

Token protection

The token table stores a salted PBKDF2-SHA512 hash. The secret is shown once when the platform creates the token. A job token is also kept in the provider job secret store until the job starts. Treat the provider database as secret-bearing.

The validator checks the expiry date during validation. A job token has no expiry date and is revoked when the job ends.

For a provider token, UCloud/Core asks the provider to revoke the token before it deletes the token resource. A platform token is deleted with its token resource.

The owner and the permissions of a provider token are fixed when the platform creates the token. 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 project token created by a remaining member stays valid. Job tokens follow the job lifecycle instead. If other people know the secret of a shared token, revoke it manually.

A token is a bearer credential. Anyone who has the secret can use it until it expires or the owner revokes it. Use one token for each client. For a token that a user creates, keep the expiry date short, and revoke the token when it leaks.

Data protection

The feature stores chat content in the member drive of the user or the project. Access to the files follows the normal file permissions of the member drive. The feature does not create a second permission model for the stored content.

ContentWhy it is keptStorageRetention
Playground threadsTo keep the chat history, model choice, and token usage, so the user can reopen and continue a chat.Member driveUntil the user deletes the thread.
Playground attachmentsTo keep the files that the user added to a message, so the user and the model can read them again.Member drive60 minutes after the last activity.
Responses and conversationsTo keep the state that lets the Responses API continue from previous_response_id or conversation.Member drive30 days after the last modification.

A user with access to the member drive can delete any of this content at any time. A thread or an attachment can be deleted from the playground. A response or a conversation can be deleted through the Responses API or with ordinary file operations in the member drive.

An attachment link is an unguessable URL. The inference backend has no UCloud credentials, so it reads the attachment through this link. The link works while the file stays in the member drive. Treat the link as a secret.

The audit record stores the token identity, the model, the outcome, and the token usage. It does not contain the message content. See Audit.

The backend receives the prompt. When the request has an attachment, the backend receives a link to the file. The provider must trust the backend and protect its images, model weights, and network.

Related

  • Provider API Tokens
  • Audit
  • Metrics
  • Architecture
  • Chat Playground
Previous Metrics
Next Integrated applications