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-1371] Expose a new generate_secret function #986

Merged
merged 9 commits into from
Aug 23, 2024
Merged

Conversation

coltonhurst
Copy link
Member

@coltonhurst coltonhurst commented Aug 20, 2024

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/SM-1371

๐Ÿ“” Objective

Exposes the password generator function for generating secrets.

This PR also fixes typos in crates/bitwarden-generators/src/password.rs.

Alternate solution with an abstraction layer between SM and Bitwarden core generation functionality: #936

โฐ 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

Copy link
Contributor

github-actions bot commented Aug 20, 2024

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 78983eb1-f7eb-4c1a-a387-bc5b30a3d73d

No New Or Fixed Issues Found

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

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

Project coverage is 57.96%. Comparing base (723ef32) to head (8f6544f).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/bitwarden-json/src/client.rs 0.00% 3 Missing โš ๏ธ
crates/bitwarden-json/src/command.rs 0.00% 1 Missing โš ๏ธ
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #986      +/-   ##
==========================================
- Coverage   57.98%   57.96%   -0.02%     
==========================================
  Files         197      197              
  Lines       13647    13651       +4     
==========================================
  Hits         7913     7913              
- Misses       5734     5738       +4     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

mzieniukbw
mzieniukbw previously approved these changes Aug 21, 2024
@coltonhurst coltonhurst changed the title SM-1371: Expose a new generate_secret function [SM-1371] Expose a new generate_secret function Aug 22, 2024
@coltonhurst coltonhurst merged commit 5afe12b into main Aug 23, 2024
62 checks passed
@coltonhurst coltonhurst deleted the sm/sm-1371_parta branch August 23, 2024 13:54
coltonhurst added a commit that referenced this pull request Aug 23, 2024
## ๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/SM-1371

## ๐Ÿ“” Objective

Add a `GenerateSecret` function to the Go SDK.

**Note** this depends on the #986
PR, which should be merged first.

This PR is parallel to this: #937.
One will be merged and the other closed based on the decided approach.

## โฐ 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

<!-- Suggested interactions but feel free to use (or not) as you desire!
-->

- ๐Ÿ‘ (`:+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
Comment on lines +94 to +98
pub mod generators {
pub use bitwarden_generators::{
password, ClientGeneratorExt, PasswordError, PasswordGeneratorRequest,
};
}
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to put this under the secrets manager module instead of exposing generators like we do for the internal feature?

Copy link
Member Author

Choose a reason for hiding this comment

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

No specific reason. Thinking more about it, refactoring it to this is probably a better approach going forward.

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.

5 participants