1A: API Key Authentication Client - #4
Merged
Merged
Conversation
Adds inbound API key validation via X-API-Key header on all endpoints except /health, /docs, /openapi.json, and /redoc. Auth is disabled when the api_key setting is empty (default), enabling frictionless local development. Includes 8 new tests covering auth-enabled and auth-disabled scenarios. bead: ar-czw Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements ApiKeyStore (file-backed, base64-encoded key storage per seller URL) and AuthMiddleware (attaches X-Api-Key or Bearer headers to outgoing httpx requests, detects 401 for key rotation). Includes 20 unit tests covering CRUD, persistence, header attachment, URL normalization, and 401/403 response handling. bead: buyer-jin Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
aleksUIX
pushed a commit
to aleksUIX/buyer-agent
that referenced
this pull request
Jul 26, 2026
…Lab#4 deleted) interfaces/chat/main.py no longer defines the four inline CrewAI booking tools (MultiSellerSearchTool, CallSellerToolTool, BookPGDealTool, CreatePMPDealTool) that spoke a bespoke seller-MCP dialect and surfaced seller-minted-or-fake ids outside the canonical contract. Replacement: two THIN wrappers over MultiSellerOrchestrator — - request_quotes: discover -> quote -> rank preview (no money committed) - book_deals: full orchestrate within a hard budget bound; every Deal ID in the output is SELLER-issued. Discovery is seeded from configured SELLER_ENDPOINTS via a small AgentCard adapter (quoting/booking still run the real quotes -> deals contract); with no endpoints configured the default registry-backed orchestrator is used. ChatInterface public surface (constructor, process_message, get_connected_sellers, close) is unchanged. New tests/unit/test_chat_canonical_tools.py: delegation + budget bound, preview-never-books, registry adapter, and a guard that the four rival tools stay dead. bead: ar-j2nw Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ApiKeyStorefor secure per-seller API key storage (file-backed, encrypted at rest)AuthMiddlewarefor automatic header attachment (X-Api-KeyorBearermode)Bead
buyer-jin
Tests
129/129 passed, Quinn VERIFIED
🤖 Generated with Claude Code