Skip to content

Add secure in-chat connector authorization - #226

Merged
milind-soni merged 1 commit into
mainfrom
codex/in-chat-connectors
Aug 18, 2026
Merged

Add secure in-chat connector authorization#226
milind-soni merged 1 commit into
mainfrom
codex/in-chat-connectors

Conversation

@milind-soni

Copy link
Copy Markdown
Owner

What changed

  • Adds trusted in-chat connector cards when an agent needs Gmail or another connected app.
  • Opens authorization in the system browser, polls connection state, and automatically resumes the exact task once every requested app is connected.
  • Makes connector mounting work across Claude, Codex, and ACP-based providers without exposing durable credentials to provider processes.
  • Replaces the normal Composio-key setup with a managed per-installation broker while preserving a documented self-host path.
  • Adds a Cloudflare Worker backed by D1, per-route rate limits, hashed installation tokens, strict Composio URL validation, and secure project-key storage.

Why

Users should be able to ask an agent to use an app without knowing what an API key or MCP server is. The previous flow required configuration outside the conversation and could leave the agent unable to continue after authorization.

User impact

When a connector is missing, OpenMausBot now shows a first-party card directly in chat. The user clicks Connect securely, completes authorization on Composio, and the bot continues automatically. Self-hosters can deploy the included broker or continue using a direct project key as an advanced fallback.

Security design

  • The Composio project key remains only in the Cloudflare Worker secret store.
  • Installation tokens are stored hashed in D1 and encrypted locally with Electron safe storage.
  • Provider processes receive only a per-boot loopback token, never the durable broker token.
  • Authorization URLs are never persisted and must be HTTPS URLs on *.composio.dev.
  • Connector actions and continuation are bound to the originating bot, thread, message, and resume key.

Validation

  • pnpm test — 976 application tests passed, 8 skipped; broker, updater, and packaged-server checks also passed.
  • pnpm build
  • pnpm broker:check
  • Live Cloudflare smoke test for registration, identity, catalog, status, authorization, and cleanup.

The production broker is deployed at https://openmausbot-composio.milindsoni201.workers.dev.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d9fef7c9-3ce0-4c94-958f-20eb2a50cfc6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@milind-soni
milind-soni marked this pull request as ready for review August 18, 2026 08:55
@milind-soni
milind-soni merged commit 7750359 into main Aug 18, 2026
6 checks passed
@milind-soni
milind-soni deleted the codex/in-chat-connectors branch August 18, 2026 08:55
kargnas added a commit to kargnas/OpenMausBot that referenced this pull request Aug 18, 2026
main의 milind-soni#227(iOS QR 페어링), milind-soni#226(인챗 커넥터 인증) 병합 충돌을
해결했다. codex/ACP capabilities에 추가된 composioMcp는 채택하고
정적 effortLevels 노출은 계속 제거했다. qrcode.react 의존성을
lockfile에서 받았다.

Tested: pnpm typecheck, pnpm vitest run (103 files, 990 passed, 8 skipped)

Confidence: high
Scope-risk: narrow
Reversibility: clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant