Skip to content

feat: add 1Password secret source backend - #55055

Closed
Francescolatorre wants to merge 1 commit into
NousResearch:mainfrom
Francescolatorre:feat/onepassword-secrets-backend
Closed

feat: add 1Password secret source backend#55055
Francescolatorre wants to merge 1 commit into
NousResearch:mainfrom
Francescolatorre:feat/onepassword-secrets-backend

Conversation

@Francescolatorre

Copy link
Copy Markdown

Summary

Adds a native 1Password CLI secret-source backend alongside the existing Bitwarden Secrets Manager integration.

What changed

  • Add agent.secret_sources.onepassword backend using op read over op://... references.
  • Add hermes secrets onepassword / hermes secrets op CLI commands:
    • setup
    • status
    • sync
    • disable
  • Add secrets.onepassword defaults in config.yaml schema.
  • Extend env_loader to apply multiple external secret sources and label 1Password-provided credentials as (from 1Password).
  • Add user docs at website/docs/user-guide/secrets/onepassword.md and link from the Secrets overview.
  • Add unit tests for parsing, fake op read, override behavior, startup source tracking, and HERMES_HOME/profile-aware references-file resolution.

Design notes

The backend stores only references in the configured env-style file, for example:

OPENROUTER_API_KEY=op://Private/OpenRouter API Key/credential

Secret values are resolved at Hermes startup via op read and are never printed in status, sync output, warnings, or errors. Missing op, missing references files, invalid references, or auth failures are fail-open and do not block Hermes startup.

Verification

Ran locally on branch feat/onepassword-secrets-backend:

uv run --extra dev python -m pytest \
  tests/test_onepassword_secret_source.py \
  tests/test_env_loader_secret_sources.py \
  -o 'addopts=' -q
# 15 passed

uv run --extra dev ruff check \
  agent/secret_sources/onepassword.py \
  hermes_cli/onepassword_secrets_cli.py \
  hermes_cli/env_loader.py \
  tests/test_onepassword_secret_source.py \
  tests/test_env_loader_secret_sources.py
# All checks passed

git diff --check
# no output

Also manually verified with temporary HERMES_HOME:

  • hermes secrets onepassword --help
  • hermes secrets onepassword status
  • hermes secrets onepassword setup
  • hermes secrets onepassword sync with a fake op binary

Security

  • No plaintext provider keys are stored in config or docs.
  • The references file is created with mode 0600.
  • Plaintext-looking entries in the references file are skipped with warnings.
  • op://... references in error output are redacted.
  • External source failures remain fail-open, consistent with Bitwarden.

@alt-glitch alt-glitch added type/feature New feature or request comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard area/auth Authentication, OAuth, credential pools P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 29, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #36896 — the earliest open PR implementing the same op:// 1Password CLI secret source (op read). This is a saturated cluster: #36896 (canonical op CLI), #32254 (near-identical), #38569, #39445 (SDK-based), all tracking feature issue #36949 (roadmap #3630 Phase 4). A maintainer should pick one.

@teknium1

teknium1 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

1Password support landed on main via PR #59498, which also ships a pluggable SecretSource interface — an ABC + orchestrator that lets multiple secret managers run simultaneously with deterministic precedence, conflict warnings, and per-var provenance. The merged backend is a salvage of #36896 (earliest full-cluster credit to #32254). This PR is superseded by that interface; thanks for the contribution and sorry we couldn't land them all — six independent 1Password PRs is exactly why the interface now exists. If you'd like to build further secret-manager backends, they now plug in as standalone plugins via ctx.register_secret_source() with a conformance kit in tests/secret_sources/conformance.py — see https://hermes-agent.nousresearch.com/docs/user-guide/secrets/ .

@teknium1 teknium1 closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants