Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SM-1153] Part 2 Secrets sync | Expose in SM SDK #678

Merged
merged 16 commits into from
May 15, 2024

Conversation

Thomas-Avery
Copy link
Contributor

@Thomas-Avery Thomas-Avery commented Mar 22, 2024

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

The purpose of this PR is to expose the ability to preform secrets syncs via the Secrets Manager SDK.

Requires API bindings in #674

This should not be merged into main prior to:

Code changes

  • crates/bitwarden/src/secrets_manager/client_secrets.rs:
    Add the sync method to the client secrets.

  • crates/bitwarden/src/secrets_manager/secrets/mod.rs:
    Expose sync SecretsSyncRequest, and SecretsSyncResponse

  • crates/bitwarden/src/secrets_manager/secrets/sync.rs:
    Implement sync SecretsSyncRequest, and SecretsSyncResponse

Before you submit

  • Please add unit tests where it makes sense to do so

@Thomas-Avery Thomas-Avery self-assigned this Mar 22, 2024
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 42 lines in your changes are missing coverage. Please review.

Project coverage is 58.56%. Comparing base (f07d9a7) to head (a47032d).

Files Patch % Lines
...ates/bitwarden/src/secrets_manager/secrets/sync.rs 0.00% 39 Missing ⚠️
...es/bitwarden/src/secrets_manager/client_secrets.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #678      +/-   ##
==========================================
- Coverage   58.77%   58.56%   -0.22%     
==========================================
  Files         177      178       +1     
  Lines       11501    11543      +42     
==========================================
  Hits         6760     6760              
- Misses       4741     4783      +42     

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

@Thomas-Avery Thomas-Avery requested review from Hinton, dani-garcia and a team March 25, 2024 21:01
@Thomas-Avery Thomas-Avery marked this pull request as ready for review March 25, 2024 21:02
Copy link
Member

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just needs some changes around the use of the MissingFields error, which has been changed very recently to include more information on which field is actually missing. I've included a suggestion on how to apply that change.

crates/bitwarden/src/secrets_manager/secrets/sync.rs Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Apr 2, 2024

Logo
Checkmarx One – Scan Summary & Details41eeb922-905d-4028-bb5f-ac0acb3bae98

No New Or Fixed Issues Found

dani-garcia
dani-garcia previously approved these changes Apr 3, 2024
Copy link
Member

@dani-garcia dani-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

coltonhurst
coltonhurst previously approved these changes Apr 24, 2024
Copy link
Member

@coltonhurst coltonhurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @Thomas-Avery

Base automatically changed from sm/sm-1153-update-bitwarden-api to main May 15, 2024 16:31
@Thomas-Avery Thomas-Avery dismissed stale reviews from coltonhurst and dani-garcia May 15, 2024 16:31

The base branch was changed.

dani-garcia
dani-garcia previously approved these changes May 15, 2024
crates/bitwarden/CHANGELOG.md Outdated Show resolved Hide resolved
@Thomas-Avery Thomas-Avery merged commit 295d3c5 into main May 15, 2024
104 checks passed
@Thomas-Avery Thomas-Avery deleted the sm/sm-1153-secrets-sync branch May 15, 2024 17:34
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.

None yet

3 participants