|
| 1 | +# KiloClaw Composio Manual Configuration |
| 2 | + |
| 3 | +## Role of This Document |
| 4 | + |
| 5 | +This spec defines the security and product rules for user-provided Composio CLI credentials configured in KiloClaw Settings. Managed Composio identity provisioning and managed connection onboarding are retired and are not supported behavior. |
| 6 | + |
| 7 | +It deliberately does not prescribe implementation details such as endpoint names, column layouts, or controller helper structure. |
| 8 | + |
| 9 | +## Status |
| 10 | + |
| 11 | +Draft -- created for managed Composio onboarding in PR #3348 on 2026-05-20. |
| 12 | +Updated 2026-05-27 -- reduced to manual Settings configuration after retiring managed onboarding and storage. |
| 13 | + |
| 14 | +## Conventions |
| 15 | + |
| 16 | +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC 2119] [RFC 8174] when, and only when, they appear in all capitals, as shown here. |
| 17 | + |
| 18 | +## Definitions |
| 19 | + |
| 20 | +- **Composio CLI credentials**: The user API key and organization identifier required to sign the `composio` CLI into a user's Composio account or organization. |
| 21 | +- **Manual Composio configuration**: User-provided Composio CLI credentials saved through KiloClaw Settings and injected into that user's OpenClaw instance. |
| 22 | +- **OpenClaw instance**: The provider-backed KiloClaw environment where OpenClaw and the `composio` CLI run. |
| 23 | + |
| 24 | +## Overview |
| 25 | + |
| 26 | +KiloClaw supports Composio only as explicitly user-provided Settings secrets. A user may enter Composio CLI credentials, which are validated, encrypted, transported through the existing instance secret pipeline, and used by the controller to make the Composio CLI available inside that user's instance. |
| 27 | + |
| 28 | +Kilo MUST NOT provision managed Composio identities, create managed Connect Link onboarding flows, store managed Composio credential state, or inject operator-owned or previously managed credentials into instances. |
| 29 | + |
| 30 | +## Rules |
| 31 | + |
| 32 | +### Manual Configuration |
| 33 | + |
| 34 | +1. Manual Composio configuration MUST be opt-in. An instance without both required Composio fields MUST continue to boot without Composio CLI sign-in. |
| 35 | +2. The system MUST validate manual Composio fields according to the secret catalog contract before saving or provisioning them. If either required Composio field is supplied during provision, both MUST be supplied together. |
| 36 | +3. Manual Composio credentials MUST be treated as user-provided secrets. Both the user API key and organization value MUST be encrypted before reaching the KiloClaw Worker and MUST use the existing encrypted instance-secret transport pipeline. |
| 37 | +4. Manual Composio fields MAY remain configurable through Settings and MAY be updated or removed through the normal instance secret update path. |
| 38 | +5. Kilo MUST NOT rotate, revoke, claim, share, or otherwise manage manually provided Composio credentials unless a future supported flow explicitly requests that behavior. |
| 39 | +6. Manual personal Composio credentials MUST NOT be reused for an organization instance unless the user explicitly configures them in that organization context. |
| 40 | + |
| 41 | +### Removed Managed Behavior |
| 42 | + |
| 43 | +7. Kilo MUST NOT create new managed Composio identities, managed connected-account onboarding flows, Connect Links for managed onboarding, or managed credential injection for KiloClaw. |
| 44 | +8. Kilo MUST NOT fall back from missing manual Composio credentials to any operator-owned, shared, historical, or managed credential. |
| 45 | +9. New instances and Settings updates MUST NOT create retired managed-onboarding metadata for manual Composio configuration. |
| 46 | +10. Direct Google Calendar onboarding, when offered, is independent of Composio and MUST NOT depend on retired managed Composio state. |
| 47 | + |
| 48 | +### Instance CLI Sign-In |
| 49 | + |
| 50 | +11. The OpenClaw instance MAY contain the Composio CLI when no Composio credentials are configured. |
| 51 | +12. When valid manual Composio credentials are present, the controller SHOULD sign the CLI in during bootstrap so `composio` commands work without interactive browser login. |
| 52 | +13. Composio CLI sign-in MUST be best-effort and MUST NOT prevent controller startup unless a future product contract makes it required. |
| 53 | +14. If sign-in uses a subprocess, the implementation MUST invoke a direct executable rather than a shell and MUST suppress logs containing credentials. |
| 54 | +15. Any Composio CLI state files written by the controller MUST use owner-only permissions and remain inside the instance user's Composio configuration directory. |
| 55 | +16. Credentials used only for CLI sign-in MUST NOT remain unnecessarily available to unrelated child processes. |
| 56 | + |
| 57 | +### Data Protection and Logging |
| 58 | + |
| 59 | +17. Logs, analytics, audit records, Sentry events, command output, and user-facing errors MUST NOT contain raw Composio credentials, OAuth tokens, or generated login commands containing credential material. |
| 60 | +18. Manual Composio secrets MUST follow the normal KiloClaw secret encryption, transport, update, and deletion rules. |
| 61 | + |
| 62 | +## Error Handling |
| 63 | + |
| 64 | +1. If manual Composio credentials are missing or incomplete, the controller MUST skip Composio CLI sign-in and continue startup. |
| 65 | +2. If manual Composio credential validation fails, the save or provision request MUST fail before transporting invalid credentials to the Worker. |
| 66 | +3. If Composio CLI sign-in fails, the controller MUST log a sanitized failure and SHOULD continue startup in a usable state. |
| 67 | + |
| 68 | +## Changelog |
| 69 | + |
| 70 | +### 2026-05-27 -- Retained manual configuration only |
| 71 | + |
| 72 | +- Removed managed identity provisioning, managed Connect Link onboarding, managed persistence, and instance-source tracking from supported behavior. |
| 73 | +- Retained explicit user-provided Composio Settings credentials through the encrypted secret pipeline. |
| 74 | +- Preserved security requirements for validation, owner scoping, controller sign-in, and sensitive logging. |
| 75 | + |
| 76 | +### 2026-05-20 -- Managed onboarding experiment |
| 77 | + |
| 78 | +- Introduced managed onboarding behavior later removed from supported product behavior. |
0 commit comments