Security Boundaries
TokenDance Account handles sign-in, Hub manages product permissions and sessions, and Edge controls local execution. Model API credentials and collaboration events have separate access boundaries.
Identity
TokenDance Account is the identity authority:
- GitHub, Google, Feishu, and other third-party providers are managed by TokenDance Account.
- AgentHub consumes TokenDance Account OIDC as a relying party.
- Hub Server can issue AgentHub-local sessions.
- The marketing website stores no authentication session; the app uses Hub-owned sessions.
Third-party sign-in and account binding go through Account. AgentHub does not authenticate directly with Feishu, GitHub or Google.
The website opens the AgentHub application. Hub performs Account OIDC code exchange on the server and issues its own session. The Web client currently stores a Hub refresh token in tab-scoped browser storage, so XSS protection remains part of its security boundary. Account RP/back-channel logout is not implemented in this integration.
Authorization
After authentication, authorization is AgentHub-local:
- whether a user belongs to an organization or project;
- whether a user can access a workspace, device, or Edge;
- whether a user can start, cancel, approve, or inspect a run;
- whether a user can read diffs, artifacts, logs, and audit records.
Authorization decisions should be written to Hub audit, including denied actions.
Authorization should be checked at the point of action, not only at page load. Opening a project view, starting a run, approving a tool call, reading a diff, downloading an artifact, and routing to an Edge target are separate decisions and should remain separately auditable.
Secrets And Credentials
These must not appear in frontend code, card payloads, public logs, or public docs:
- model API keys;
- Feishu verification token, encrypt key, app secret, tenant token;
- TokenDance Account client secret;
- Hub session signing secret;
- Edge local execution secrets;
- production host paths, backup paths, and rollback commands.
TokenDance API keys authenticate model API calls. They are not AgentHub login credentials.
Use placeholders in public examples and keep values out of screenshots. If an example needs a credential-shaped field, use names such as <agenthub_session_token>, <local_edge_token>, or <provider_api_key> and state who owns it. Do not publish real callback payloads, refresh tokens, provider responses, or local secret paths.
Local Execution And Sandbox
Edge Server sits close to the filesystem and process boundary, so it should default to conservative behavior:
- restrict accessible directories with a workspace allowlist;
- require approval for high-risk tool calls;
- run runtime adapters in sanitized environments;
- expose file changes through diff and artifacts for user review;
- emit events for failure, cancellation, timeout, and permission denial.
Remote/Cloud Edge, device proof, and relay/provisioning remain development surfaces. See Product status for the current coverage.
Local execution should default to least privilege. The UI should make dangerous operations visible before execution, Edge should enforce workspace policy even if the UI is bypassed, and adapter output should be converted into structured events before it is shown in Web, Desktop, or IM surfaces.
Feishu/Lark Security
Feishu/Lark is a collaboration entry, not the identity system:
- verify signatures and decrypt events before business handling;
- respond to
card.action.triggerwithin 3 seconds; - deduplicate
im.message.receive_v1withmessage_id; - keep card actions to action ids and business object ids;
- send account binding back through TokenDance Account.
Long-running work should leave the webhook request path quickly. The integration gateway should acknowledge, enqueue, and then let AgentHub update the user through later card or message events. Raw prompts, full file content, provider keys, and local absolute paths should not be copied into card payloads.
Audit
Recommended audit events:
- login, logout, session refresh, and binding state changes;
- project membership, device, workspace allowlist, and permission changes;
- run creation, cancellation, failure, completion, and approval;
- tool calls, file changes, diff, artifacts, and preview;
- IM event handling result and external platform error codes.
Logs should not record full prompts, message bodies, secrets, or sensitive content from raw model responses by default.
Minimum useful audit records should include actor, organization/project, target Edge or workspace id, run id, action, result, timestamp, request id, and a redacted reason for denial or failure. Restrict access to operational logs and redact sensitive fields before sharing a diagnostic record.
Edit this page on GitHub