Skip to content

API Reference parrot.auth.broker

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.auth.broker

View source

Surface-agnostic CredentialBroker and CredentialResolverFactory (FEAT-264).

The :class:CredentialBroker owns a provider_id → resolver registry built once from declarative :class:~parrot.auth.credentials.ProviderCredentialConfig entries (per-agent config or an in-package YAML manifest).

The :class:CredentialResolverFactory maps an auth kind (obo | oauth2 | static_key | mcp) to a fully-constructed :class:~parrot.auth.credentials.CredentialResolver strategy so that adding a new provider on an existing auth kind requires only a config entry.

Design principles

  • One signal, N renderers — the broker returns :class:~parrot.auth.credentials.ResolvedCredential on success or :class:~parrot.auth.credentials.NeedsAuth on a miss. It never renders UX; surfaces own card / link generation.
  • Secret hygiene — the raw secret lives only on :class:~parrot.auth.credentials.ResolvedCredential and never enters the broker's logs. Only the key_fingerprint is recorded in the audit ledger.
  • Fail-closed — no resolver for a provider → KeyError; no identity → caller must fail closed; resolver.resolve() is None → NeedsAuth.
  • Pure construction — :meth:CredentialBroker.from_config is synchronous and performs no I/O so it is safe to call from AbstractBot.configure().

Alias CredentialBroker

Re-exported from parrot.auth.broker.core.CredentialBroker.

Alias CredentialBrokerConfigError

Re-exported from parrot.auth.broker.core.CredentialBrokerConfigError.

Alias CredentialResolverFactory

Re-exported from parrot.auth.broker.factory.CredentialResolverFactory.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally