This page describes how TengineAI handles credentials, session boundaries, and secret management. It is intended for security reviewers, infrastructure buyers, and developers who need to understand the trust model before integrating.
When TengineAI calls your API on behalf of a tool execution, it can authenticate the request so your API can verify the call came from TengineAI and not an arbitrary caller.
Three strategies are available per tool:
| Strategy | auth_strategy | How TengineAI authenticates |
|---|---|---|
| None | none | No auth headers added |
| Static Bearer | static_bearer | Authorization: Bearer <secret> |
| HMAC Signature | hmac_signature | X-Tengine-Signature: tng1=<hex> over canonical string |
HMAC signature is recommended for production. It provides origin verification, body integrity, and replay protection via timestamp.
See Outbound Authentication for the full canonical string specification and Python verification code.
encrypted_auth_secret)When you configure outbound auth for a custom tool, the encrypted_auth_secret is:
Project API keys (tengine_...) are hashed before storage using a one-way hash. TengineAI cannot recover the plaintext of an existing key. If a key is lost, it must be rotated by creating a new integration.
Each project has its own API keys, tool list, and credential configuration. A token authenticated against Project A cannot access Project B's tools or secrets under any circumstances. Isolation is enforced at the data layer.
Member session tokens (tng_mst_...) are short-lived JWTs (default 15-minute TTL) signed by TengineAI. They encode project_id, integration_id, and member_external_id. A token for Project A, Member Alice cannot be used to execute tools under Project B or as Member Bob — the claims are verified on every request.
The model only receives tool definitions for tools explicitly enabled in the project. Disabled tools are invisible at the protocol level — they are never returned in list_tools and cannot be called even if the caller knows the tool name.
User-scoped sessions use asymmetric cryptography:
member_assertion JWT — it lives on your backend only and is never sent to TengineAIkid)This means:
For tools using hmac_signature, the signature covers:
See the Outbound Authentication reference for the exact canonical string format.
TengineAI injects the following headers on every outbound tool call. Your API can use these to identify the caller and enforce access control without a separate token exchange:
| Header | Always Present | Value |
|---|---|---|
X-Tengine-Project-Id | ✅ | Your TengineAI project ID |
X-Tengine-Integration-Id | ✅ | The integration ID |
X-Tengine-Request-Id | ✅ | UUID per request — use for deduplication/logging |
X-Tengine-Timestamp | ✅ | Unix seconds — use for replay protection |
X-Tengine-Member-Id | When inject_member_identity.id = true | Member's external ID |
Validate X-Tengine-Project-Id in your API to confirm the request originated from your expected project.
| Credential | How to Rotate |
|---|---|
| Project API key | Delete and recreate the integration. Old key is invalidated immediately. |
| Custom tool HMAC secret | PATCH /api/v1/custom-tools/<id> with new encrypted_auth_secret. |
| Custom tool bearer token | Same — PATCH with new encrypted_auth_secret. |
| Assertion public key | Register new key with new kid, update signing code, then deactivate old key via DELETE /api/v1/assertion-keys/<id>. |
encrypted_auth_secret values cannot be retrieved; only updated