Skip to content

Conversation

SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Sep 5, 2025

🎟️ Tracking

PM-25523

📔 Objective

This commit introduces the importCxfPayload function to the VaultRepository interface and its implementation, VaultRepositoryImpl. This function allows for importing vault data from a CXF (Cipher Export Format) payload.

The key changes include:

  • Defining importCxfPayload in VaultRepository.
  • Implementing importCxfPayload in VaultRepositoryImpl, which involves:
    • Retrieving the active user ID.
    • Calling vaultSdkSource.importCxf to process the payload.
    • Calling ciphersService.importCiphers to import the processed ciphers.
    • Triggering a sync operation upon successful import.
  • Introducing ImportCxfPayloadResult sealed class to represent the outcome of the import operation (Success or Error).
  • Adding a corresponding unit test in VaultRepositoryTest to verify the success scenario of importCxfPayload.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@SaintPatrck SaintPatrck force-pushed the PM-25523/vault-repo-import-cxf branch from 5d15ac7 to 1665161 Compare September 5, 2025 17:58
Copy link
Contributor

github-actions bot commented Sep 5, 2025

Logo
Checkmarx One – Scan Summary & Details4e930950-2884-44b9-a5c5-1ab1bcf6487e

Great job! No new security vulnerabilities introduced in this pull request

Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.43%. Comparing base (1d6e733) to head (9f68e87).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...arden/data/vault/repository/VaultRepositoryImpl.kt 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5846      +/-   ##
==========================================
- Coverage   83.91%   83.43%   -0.49%     
==========================================
  Files         693      798     +105     
  Lines       53353    55551    +2198     
  Branches     7331     7377      +46     
==========================================
+ Hits        44773    46347    +1574     
- Misses       5993     6601     +608     
- Partials     2587     2603      +16     

☔ View full report in Codecov by Sentry.
📢 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.

This commit introduces the `importCxfPayload` function to the `VaultRepository` interface and its implementation, `VaultRepositoryImpl`. This function allows for importing vault data from a CXF (Cipher Export Format) payload.

The key changes include:
- Defining `importCxfPayload` in `VaultRepository`.
- Implementing `importCxfPayload` in `VaultRepositoryImpl`, which involves:
    - Retrieving the active user ID.
    - Calling `vaultSdkSource.importCxf` to process the payload.
    - Calling `ciphersService.importCiphers` to import the processed ciphers.
    - Triggering a sync operation upon successful import.
- Introducing `ImportCxfPayloadResult` sealed class to represent the outcome of the import operation (Success or Error).
- Adding a corresponding unit test in `VaultRepositoryTest` to verify the success scenario of `importCxfPayload`.
@SaintPatrck SaintPatrck force-pushed the PM-25523/vault-repo-import-cxf branch from 1665161 to 9f68e87 Compare September 5, 2025 19:35
@SaintPatrck SaintPatrck added this pull request to the merge queue Sep 5, 2025
Merged via the queue into main with commit 0702078 Sep 5, 2025
9 checks passed
@SaintPatrck SaintPatrck deleted the PM-25523/vault-repo-import-cxf branch September 5, 2025 20:27
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.

2 participants