Credential Broker Pattern
Foragent never exposes credential values over A2A or in agent prompts. Instead, callers pass a credential reference (an opaque string ID).
How it works
- The A2A caller includes a
credentialIdin the capability request ICredentialBroker.ResolveAsyncis called inside the Foragent process- The broker retrieves the actual credential value from a secret store
- The browser session uses the value directly; it is never serialized or logged
ICredentialBroker
public interface ICredentialBroker
{
Task<CredentialReference> ResolveAsync(
string credentialId,
CancellationToken cancellationToken = default);
}
Implementations are pluggable. Bring your own secret store (Azure Key Vault, AWS Secrets Manager, HashiCorp Vault, environment variables for local dev, etc.).
TODO
- Define
CredentialReferencefields needed by browser session - Implement an environment-variable-backed broker for local development
- Document how to register a custom broker