The principles#
- Every call is checked. An agent reaches tools only through
https://mcp.bastn.ai/mcp, and every call goes through identity, policy, approvals and the audit log first. - Closed until opened. New servers hide their tools until you pin them and redact secrets in tool results, destructive calls wait for a person by default, and a connector offers nothing until you list a capability and expose it.
- Credentials stay where they are used. Agents hold a bastn credential, never the credentials of the tools behind it.
- Edits are detectable. The audit log is a keyed hash chain. On Hosted, bastn verifies it; on Enterprise you hold the key and verify it yourself.
Tenants and teams#
The org is the tenant. Inside an org, the team is the boundary: servers, keys, agents, categories, connectors, approvals, activity log rows and analytics each belong to one team. A caller sees its own teams' rows.
- A credential's team decides which servers it reaches. A tool of another team's server answers as if it did not exist.
- Something that belongs to another org answers like a missing object (not found), so its existence is not revealed.
- Roles limit who can change what: org admins, team admins, members and read-only viewers. See Concepts.
- A team's HTTP servers cannot point bastn at its own internal addresses: loopback, link-local (including cloud metadata) and other host-local addresses are refused, at every connection.
Credentials#
What agents hold#
An agent authenticates with a bastn virtual key (bastn-sk-…) or an OAuth sign-in from its MCP client. Neither is the credential of an upstream tool. The upstream credentials stay with bastn or on your connector, and the agent's own key is never forwarded to an upstream tool.
Shown once, stored as hashes#
Keys, join tokens and session tokens are shown once, when they are created. bastn stores a SHA-256 hash of each, never the token itself, so a copy of the database yields no working credential. Passwords are stored with PBKDF2 and a per-user salt.
Secrets bastn must send to an upstream, such as a server's auth token, cannot be hashed. They are encrypted at rest and never returned after you save them.
Two-step verification#
Your dashboard account can ask for a code from an authenticator app after the password. Turn it on under Settings, Account, Two-step verification:
- Choose Set up and enter your password again.
- Scan the QR code with an authenticator app, or type the key into it.
- Enter a code from the app and choose Turn on.
- Save the ten recovery codes: copy them or choose Download codes. They are shown once. Each one signs you in once in place of a code. The drawer stays open until you choose I saved them.
From then on, signing in has a second step: after your password, a card asks for your Two-step code. This applies on the dashboard and on the bastn sign-in page that MCP clients open. A code works once. To sign in with a recovery code, choose Use a recovery code under the field. After too many wrong tries the page says how long to wait; a password reset by email unlocks the account at once. New recovery codes replaces the old ones, and Turn off goes back to the password alone; both ask for your password and a code.
The key behind the codes is encrypted at rest, and recovery codes are stored as hashes. A password reset by email leaves two-step verification on, so someone who gets into your mailbox still needs your code. If you lose the app and the recovery codes, contact support@bastn.ai.
Limiting and revoking#
- Keys can expire (at most a year) and can be disabled or deleted at any time.
- Killing an agent revokes all of its keys and the OAuth grants and delegated credentials bound to it, at once. See Stop an agent.
- Pausing, killing or retiring an agent, or any other stop, reaches every part of bastn within a second or two.
- Credentials that belong to no agent can be stopped too: an org admin can suspend a member of the org or block an app for the org, and a user or team admin can pause an OAuth login. See Stop other credentials.
- Removing someone from a team removes or disables the keys they hold in it.
Connectors#
A connector runs on your host and dials out to bastn. See Connectors.
- No inbound port. The connection is outbound, over mutual TLS.
- The key stays on the host. At enrollment the connector generates its private key locally and sends only a certificate request. The certificate lasts 30 days and is renewed while the connector runs.
- Single-use join tokens. A join token enrolls one connector, expires after 1 hour by default, and is passed in the environment rather than on the command line.
- API credentials stay on the host. For
openapiandhttp_upstreamcapabilities, the credential is read on the connector and added to the request there. It is never sent to bastn. - Results are scrubbed. The connector removes the secret values it holds from every result before sending it back.
- Your ceiling wins. The connector only offers what
connector.yamllists. For an OpenAPI capability, an operation outsideincludehas no tool, whatever bastn sends. Requests reach only theallowed_hostsyou set. - Relays. At a site that lets one machine out, a relay dials bastn for the connectors behind it. They are admitted only through a relay of their own team and site, with their own secret, and disabling the relay disconnects them all. The hop to the relay can use TLS, with a relay certificate bastn issues for that site. See Relays.
- Release checks. Connector releases are signed with Ed25519. The installer and the upgrade verify the signature of the release's checksums, then the binary's SHA-256, before installing. A failed upgrade rolls back to the previous binary.
Calls#
- Strict parsing. A request with duplicate keys, case variants of known fields or invalid UTF-8 is refused. What reaches the tool is a re-encoding of exactly what bastn checked and recorded.
- Untrusted tool metadata. Tool names and descriptions from servers and connectors are treated as untrusted: names outside a safe character set are dropped, and long descriptions are cut.
- Pinning and drift. A pinned tool whose definition changes is flagged, and can be blocked or held for a person to review. A pinned tool's effect cannot be lowered by the server later.
- Result scan and redaction. A server scans results for private keys, cloud tokens and token-shaped secrets (it redacts them unless you turn the scan off), and can redact personal data such as email addresses and card numbers. See Policies and tool access.
- Approvals with four eyes. Nobody approves their own call by default, and an approval is good for one identical call, once. See Approvals.
The audit log#
Every call, decision and approval event is sealed into a keyed hash chain. Rows store keyed digests of arguments and results, not their content. A call is sealed before it is sent to the tool, and is not sent if it cannot be recorded. See Audit log.
Report a vulnerability#
To report a vulnerability, email comms@dflux.io. Please include what you tried and how to reproduce it. We will reply to confirm we received the report.
For anything else, write to support@bastn.ai.