hermes - 💡(How to fix) Fix Proposal: generic OAuth broker credential source [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fixed

Code Example

{
  "provider": "openai-codex",
  "credential_id": "team-codex",
  "subject": "connection_123",
  "force": false
}
RAW_BUFFERClick to expand / collapse

Problem

Some OAuth-backed providers use single-use rotating refresh tokens. When Hermes runs in more than one runtime, copying the same refresh token into multiple auth stores lets more than one process act as a refresh authority. The first refresh rotates the token; the next runtime can then fail with a consumed/invalid refresh token.

Proposal

Add a generic oauth_broker credential-pool source. Hermes would keep only a short-lived access token locally and ask a configured broker endpoint for fresh runtime credentials when the cached token is missing, past refresh_after, near expiry, or after a forced auth retry.

This is intentionally not tied to any specific deployment platform. A broker can be any service that owns OAuth refresh state and returns an access token/API key for a provider + credential id.

Contract

Hermes sends:

{
  "provider": "openai-codex",
  "credential_id": "team-codex",
  "subject": "connection_123",
  "force": false
}

The broker returns access_token or api_key, plus optional fields like base_url, expires_at, expires_at_ms, refresh_after, inference_base_url, or provider-specific runtime keys.

Security model

Hermes never stores the broker-owned refresh token for these entries. Broker auth is supplied through an env var containing JSON headers, so deployments can use their own runtime token, mTLS proxy, local sidecar, or other policy layer.

Draft implementation

I have a draft PR ready that keeps the change scoped to agent/credential_pool.py, adds focused credential-pool tests, and documents the JSON contract.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Proposal: generic OAuth broker credential source [1 pull requests]