Sources Sync Strategy
Connect an account as a source, use account:// paths for its files, and verify the account is scoped to the right user.
Admin guide · sources runbook
| When to use | Before you start | Steps | Verify | Roll back |
|---|---|---|---|---|
| Adding an email or file source, after an account error | Account credentials in Vault | Register account, test path, run one operation | Path resolves, no credential in logs | Remove the account source |
When to use
Use this runbook when a bot must read a user's mail or files through a connected account rather than through bot-owned storage.
Before you start
USE ACCOUNTis registered inbotbasic_data/src/keywords/use_account.rs;account://<email>/<path>is parsed there and in the file-operations code.- An account source is tied to a user identity. A session must not be able to address another user's account by changing the email in a path.
- Account credentials belong in Vault-backed configuration; the system limits page points to the enforced resource limits.
- Mail sending uses the documented SEND MAIL keyword; the account path is a file-addressing mechanism, not a credential store.
Steps
# 1. Confirm the path parser and its consumers in source.
grep -RIn 'account://\|USE ACCOUNT' botserver/src botserver/crates \
--include='*.rs' | head -30
# 2. Register or update the account source through the documented surface,
# keeping its credential in Vault.
# 3. Run one read through an account path in a test session.
# Example path shape: account://<email>/Documents/file.pdf
# 4. Attempt to read another user's account path; it must be refused.
Verify
| Check | Surface | Pass condition |
|---|---|---|
| Keyword | generated BASIC reference | USE ACCOUNT registered |
| Path | parser source | account:// shape accepted |
| Scope | cross-user path attempt | refused |
SEND MAIL test |
sent from the intended account | |
| Secrets | logs and repository | no credential printed or committed |
Roll back
🔴 Remove the account source through the documented surface and revoke its credential at the provider, then re-run the table. An unexpected cross-user read is an incident under incident response.