Skip to content

QA-2360: Add organization cipher seeder scenes for remaining item types - #8323

Open
Corbet-BW wants to merge 1 commit into
mainfrom
QA-2360/org-cipher-seeder-scenes
Open

QA-2360: Add organization cipher seeder scenes for remaining item types#8323
Corbet-BW wants to merge 1 commit into
mainfrom
QA-2360/org-cipher-seeder-scenes

Conversation

@Corbet-BW

Copy link
Copy Markdown

🎟️ Tracking

https://bitwarden.atlassian.net/browse/QA-2360

📔 Objective

Adds the remaining organization-owned cipher seeder scenes so the seeder can create org ciphers of every item type (login + card already existed):

  • OrganizationSecureNoteCipherScene
  • OrganizationIdentityCipherScene
  • OrganizationPassportCipherScene
  • OrganizationDriversLicenseCipherScene
  • OrganizationBankAccountCipherScene

Each mirrors the existing OrganizationCardCipherScene (#8294): resolve the org, build the type's view DTO, seed via the matching {Type}CipherSeeder with the org key and UserId null, and persist to the requested collections. Type-specific fields come from the corresponding User{Type}CipherScene.

Per direction from Ned/Andrew these are per-type scenes following the card example; a later refactor may consolidate them into a single parameterized OrganizationItemTypeCipherScene.

No new tests — cipher-seeder coverage already exists in RustSdkCipherTests (per the #8294 review, which removed a redundant per-factory test).

📸 Screenshots

N/A — seeder/back-end only, no UI.

Adds Organization{SecureNote,Identity,Passport,DriversLicense,BankAccount}
CipherScene, mirroring the existing OrganizationCardCipherScene: each resolves
the org, builds the type's view DTO, seeds via the matching {Type}CipherSeeder
with the org key and UserId null, and persists to the requested collections.
Completes the org-owned cipher scenes (login + card already existed).
@Corbet-BW Corbet-BW added t:misc Change Type - ¯\_(ツ)_/¯ Prefer using other type labels ai-review Request a Claude code review labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed five new organization-owned cipher seeder scenes under util/Seeder/Scenes/ (secure note, identity, passport, driver's license, bank account). Each mirrors the existing OrganizationCardCipherScene exactly: resolve and null-check the organization, build the type's view DTO, seed via the matching internal {Type}CipherSeeder with the org key and UserId = null, then persist with the requested collection IDs. Verified every request property maps to a real property on the corresponding *ViewDto in Models/CipherViewDto.cs, that the field sets match the parallel User{Type}CipherScene requests, and that plaintext PII (SSN, passport, bank account fields) flows only through the Rust SDK encrypt_fields path before persistence — no plaintext is stored or logged. Scenes are discovered by reflection in SeederApi/Extensions/ServiceCollectionExtensions.cs, so no manual DI registration is required, and the absence of new tests matches the existing precedent for cipher scenes (RustSdkCipherTests covers the seeder/encryption path).

Code Review Details

No findings met the confidence threshold for posting.

The per-type duplication across these five scenes was considered and not flagged: the PR body records it as a deliberate direction to follow the card example, with a possible later consolidation into a parameterized OrganizationItemTypeCipherScene.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.89%. Comparing base (4a58a9f) to head (44241cb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8323      +/-   ##
==========================================
- Coverage   63.89%   63.89%   -0.01%     
==========================================
  Files        2471     2471              
  Lines      105959   105959              
  Branches     9603     9603              
==========================================
- Hits        67701    67700       -1     
- Misses      35916    35917       +1     
  Partials     2342     2342              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

ai-review Request a Claude code review t:misc Change Type - ¯\_(ツ)_/¯ Prefer using other type labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant