Skip to content

Feat/credential upgrade - #7

Merged
AdminTurnedDevOps merged 4 commits into
mainfrom
feat/credential-upgrade
Sep 6, 2026
Merged

Feat/credential upgrade#7
AdminTurnedDevOps merged 4 commits into
mainfrom
feat/credential-upgrade

Conversation

@AdminTurnedDevOps

Copy link
Copy Markdown
Owner

LLM keys left the guest. The host now owns credential storage and provider HTTPS. MCP tokens still go into the guest.

Why

• Keys used to live in ~/.abox/credentials.env and get copied into every session’s guest-config.json / config.raw.
• The untrusted guest then exported every key and dialed providers itself.
• Goal: host-only LLM credentials, resolve only what this session needs, broker provider HTTPS on the host.

Credential sources (host-only)

• New internal/credsource: env, macOS keychain, Vault KV v2, Azure Key Vault, AWS Secrets Manager.
• Config stores a reference (source + name), never the secret. credential_env still works as {source: env, name: …}.
• Azure name is the secret URI (https://.vault.azure.net/secrets/).
• /provider and /mcp save keychain-first, credentials.env fallback. abox creds migrate moves existing file entries into the keychain.
• New /credential command to add in your credential provider

Secrets off disk and out of the guest

• Session start no longer writes LLM keys into guest-config.json or config.raw.
• Startup scrubs leftover "secrets" from old session dirs, and leftover ~/Library/Application Support/ABox/credentials.env.
• Protocol 2 still pushes the selected LLM key + MCP tokens after hello (legacy).
• Protocol 3 never sends the LLM key. MCP tokens still get pushed because the guest still dials MCP.

Host LLM broker (protocol 3)

• Protocol bumped 2 → 3. Guest sends provider_open / provider_send / provider_cancel (model alias + conversation). Host resolves the credential, dials the configured base_url, streams provider_event back.
• Guest no longer allowlists api.x.ai / OpenAI / Anthropic. TSI inet is MCP-only.
• Proto-2 guests cannot reach the broker. Canceled opens cancel the host stream so slots do not leak.
• Old hosts hang without a protocol check; the guest fails fast (make build).

@AdminTurnedDevOps
AdminTurnedDevOps merged commit bf83bf3 into main Sep 6, 2026
1 check passed
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