Skip to content

refactor(auth): move search credentials from providers to search in auth.yaml #2578

Closed

Description

@jbeda

Problem

auth.yaml currently stores search credentials under providers.exa, providers.brave, and providers.websearch, alongside LLM provider credentials. With #2577 introducing a distinct mcp namespace, organize credentials by their consuming subsystem rather than continuing to overload providers.

Proposed schema

providers:
  anthropic:
    api_key: "<llm-key>"
search:
  exa:
    api_key: "<search-key>"
  brave:
    api_key: "<search-key>"
  websearch:
    api_key: "<search-key>"

Reserve providers for LLM provider IDs (built-in and operator-defined); move the built-in search credentials to search.

Compatibility decision

The operator explicitly accepts a breaking auth-file schema change here. Do not retain aliases, fallback lookup, or a deprecation compatibility path for the old search locations. Reject legacy search entries under providers with a safe migration diagnostic instead of silently ignoring them or starting with unexpected credentials. Never include credential values or arbitrary auth-file content in diagnostics.

Assess operator-defined provider IDs that coincide with built-in search IDs: the namespace split must not accidentally prohibit valid LLM provider entries or reinterpret them as search credentials.

Preserve existing search environment-over-file precedence and anonymous-search behavior when credentials are genuinely absent. Keep existing LLM credential formats unchanged.

Acceptance criteria

  • Exa, Brave, and WebSearch resolve credentials from search.<id>.api_key.
  • Old built-in search locations are no longer read; invalid legacy usage gets a value-free migration diagnostic where distinguishable from an explicitly configured LLM provider ID.
  • Missing, malformed, duplicate, and unknown entries follow the auth-file validation/security policy; no secret values appear in errors or logs.
  • Offline tests cover all three search adapters, environment precedence, custom auth-file paths, LLM/search namespace independence, and isolation from ambient operator state.
  • Update user documentation and publish a clear breaking-change migration example. No automatic credential-file rewriting.

Scope

Separate follow-up to #2577; MCP auth-file support does not depend on this cleanup. No generic secret vault, new credential backends, OAuth redesign, or live reload.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions