Skip to content

Extract shared OnePasswordClient into fides.common.onepassword#7698

Draft
adamsachs wants to merge 1 commit intomainfrom
shared-onepassword-client
Draft

Extract shared OnePasswordClient into fides.common.onepassword#7698
adamsachs wants to merge 1 commit intomainfrom
shared-onepassword-client

Conversation

@adamsachs
Copy link
Contributor

Description Of Changes

Extract the duplicated 1Password SDK integration from test helpers into a shared, instance-based OnePasswordClient class in fides.common.onepassword. This enables multiple consumers (SaaS test secrets, seed profile resolution in fidesplus) to each instantiate their own client with different service account tokens and vault IDs.

The existing test helper module-level API (get_secrets, get_item_by_title, list_available_items) is preserved as thin wrappers so no callers need to change.

Code Changes

  • src/fides/common/onepassword/__init__.py - New package, exports OnePasswordClient
  • src/fides/common/onepassword/client.py - New instance-based client with lazy init, get_item(), get_secrets(), get_item_notes(), get_item_notes_json(), list_items(), plus sync wrappers
  • tests/ops/test_helpers/onepassword_client.py - Refactored to thin wrappers around OnePasswordClient

Steps to Confirm

  1. Verify from fides.common.onepassword import OnePasswordClient imports cleanly
  2. Verify existing SaaS test fixtures that use onepassword_client.get_secrets() still work (the module-level API is preserved)
  3. Verify OnePasswordClient can be instantiated with different tokens/vault IDs for independent consumers

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • No UX review needed
  • Followup issues:
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

Downstream: fidesplus seed-secret-profiles depends on this PR

🤖 Generated with Claude Code

Move the duplicated 1Password SDK integration from test helpers into a
shared, instance-based client class. Each consumer (SaaS test secrets,
seed profile resolution) can instantiate its own client with different
tokens and vault IDs. The existing test helper module-level API is
preserved as thin wrappers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Contributor

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Mar 19, 2026 2:08am
fides-privacy-center Ignored Ignored Mar 19, 2026 2:08am

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant