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-1174] Access Token Login State by Default in bws #930

Merged
merged 9 commits into from
Aug 15, 2024
Merged

Conversation

coltonhurst
Copy link
Member

@coltonhurst coltonhurst commented Aug 1, 2024

🎟️ Tracking

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

📔 Objective

This PR switches bws to use access token login state by default. This will help prevent many users from running into rate limiting issues. The two related config keys in a profile:

  • state_dir -> this is the same as it has been; a custom directory for where state files will be stored
  • state_opt_out -> this is a new key. If it's true or 1, state files will not be used

Note: the gnu build failures are already happening on main and have been brought up internally

⏰ 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

@coltonhurst coltonhurst self-assigned this Aug 1, 2024
Copy link
Contributor

github-actions bot commented Aug 1, 2024

Logo
Checkmarx One – Scan Summary & Details9e7d13af-9579-45fe-9406-b3d7dd0ea34c

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Privacy_Violation /languages/java/example/Example.java: 16 Attack Vector
MEDIUM Privacy_Violation /languages/java/example/Example.java: 17 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM Privacy_Violation /languages/java/src/main/java/com/bitwarden/sdk/BitwardenClient.java: 41

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 41.93548% with 36 lines in your changes missing coverage. Please review.

Project coverage is 58.41%. Comparing base (6e65f97) to head (b5961a5).
Report is 12 commits behind head on main.

Files Patch % Lines
crates/bws/src/main.rs 0.00% 18 Missing ⚠️
crates/bws/src/state.rs 0.00% 12 Missing ⚠️
crates/bws/src/command/mod.rs 0.00% 4 Missing ⚠️
crates/bws/src/config.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
- Coverage   58.45%   58.41%   -0.04%     
==========================================
  Files         194      195       +1     
  Lines       13358    13406      +48     
==========================================
+ Hits         7808     7831      +23     
- Misses       5550     5575      +25     

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

@coltonhurst coltonhurst changed the title [SM-1174] Turn on bws state by default [SM-1174] Access Token Login State by Default in bws Aug 1, 2024
@coltonhurst coltonhurst marked this pull request as ready for review August 1, 2024 21:01
@coltonhurst coltonhurst requested a review from a team as a code owner August 1, 2024 21:01
crates/bws/src/state.rs Outdated Show resolved Hide resolved
crates/bws/src/main.rs Outdated Show resolved Hide resolved
crates/bws/src/command/mod.rs Outdated Show resolved Hide resolved
crates/bws/src/cli.rs Show resolved Hide resolved
crates/bws/src/state.rs Outdated Show resolved Hide resolved
crates/bws/src/state.rs Show resolved Hide resolved
Thomas-Avery
Thomas-Avery previously approved these changes Aug 7, 2024
Copy link
Contributor

@Thomas-Avery Thomas-Avery left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM

dani-garcia
dani-garcia previously approved these changes Aug 7, 2024
crates/bws/src/main.rs Outdated Show resolved Hide resolved
mzieniukbw
mzieniukbw previously approved these changes Aug 8, 2024
@coltonhurst coltonhurst merged commit 9e4df97 into main Aug 15, 2024
99 of 103 checks passed
@coltonhurst coltonhurst deleted the sm/sm-1174 branch August 15, 2024 21:52
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.

4 participants