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

[PM-10405] Add SSH key cipher type #4158

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Conversation

SaintPatrck
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-10405

📔 Objective

Add support for viewing and creating SSH key vault items.

📸 Screenshots

Coming soon!

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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 Oct 24, 2024

Logo
Checkmarx One – Scan Summary & Details72599c42-6bf5-42e6-95ed-5b80a0e78eca

No New Or Fixed Issues Found

)
}

sshKeyItemState.publicKey?.let { publicKey ->
Copy link

@quexten quexten Oct 24, 2024

Choose a reason for hiding this comment

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

Note: On clients (bitwarden/clients#10825) we are not hiding publicKey/fingerprint, only private key. The former 2 are not considered private, so, these probably should be BitwardenTextField?

(I hope this comment isn't too early as this is still in draft. Great work on the PR!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not too early at all! Thank you for taking a look and calling this out. I'll update it accordingly.

@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch from 06fd347 to 3705603 Compare October 25, 2024 13:09
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 93.26683% with 27 lines in your changes missing coverage. Please review.

Project coverage is 89.09%. Comparing base (a5e57f1) to head (639a33d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../vault/repository/util/VaultSdkCipherExtensions.kt 61.53% 2 Missing and 3 partials ⚠️
...warden/ui/vault/feature/item/VaultItemViewModel.kt 84.61% 1 Missing and 3 partials ⚠️
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 95.38% 2 Missing and 1 partial ⚠️
...vault/feature/addedit/util/CipherViewExtensions.kt 25.00% 0 Missing and 3 partials ⚠️
...ui/vault/feature/item/util/CipherViewExtensions.kt 62.50% 0 Missing and 3 partials ⚠️
...itemlisting/util/VaultItemListingDataExtensions.kt 40.00% 2 Missing and 1 partial ⚠️
...rm/feature/search/util/SearchTypeDataExtensions.kt 33.33% 1 Missing and 1 partial ⚠️
...bitwarden/ui/vault/feature/vault/VaultViewModel.kt 95.65% 2 Missing ⚠️
...rden/ui/platform/feature/search/SearchViewModel.kt 80.00% 1 Missing ⚠️
...i/vault/feature/addedit/VaultAddEditItemContent.kt 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4158      +/-   ##
==========================================
+ Coverage   88.98%   89.09%   +0.11%     
==========================================
  Files         441      445       +4     
  Lines       38250    38645     +395     
  Branches     5352     5406      +54     
==========================================
+ Hits        34036    34430     +394     
+ Misses       2347     2343       -4     
- Partials     1867     1872       +5     

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

@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch 8 times, most recently from e0e635a to c2629e3 Compare October 25, 2024 18:29
@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch 6 times, most recently from 675efb2 to 931154f Compare October 25, 2024 20:18
@SaintPatrck SaintPatrck changed the title Add SSH key cipher type [PM-10405] Add SSH key cipher type Oct 25, 2024
@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch from 931154f to 304e96e Compare October 25, 2024 20:27
@SaintPatrck SaintPatrck marked this pull request as ready for review October 25, 2024 20:27
Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

LGTM, just one small ⛏️

@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch 3 times, most recently from 5059ce0 to 0e0e0b8 Compare October 28, 2024 16:48
@@ -122,7 +123,7 @@ fun VaultContent(
item {
BitwardenListHeaderTextWithSupportLabel(
label = stringResource(id = R.string.types),
supportingLabel = "4",
supportingLabel = state.itemTypesCount.toString(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch 2 times, most recently from b7c4447 to f5754e6 Compare October 29, 2024 14:13
@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch from f5754e6 to a5c2558 Compare October 29, 2024 14:17
@SaintPatrck SaintPatrck force-pushed the ssh-keys/add-edit-content branch from a5c2558 to 8ccffae Compare October 29, 2024 18:42
Copy link
Collaborator

@dseverns-livefront dseverns-livefront left a comment

Choose a reason for hiding this comment

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

Looking good to me, lots of code here but well organized and follows the existing patterns!

@@ -104,6 +105,7 @@ private fun determineSearchType(
SEARCH_TYPE_VAULT_FOLDER -> SearchType.Vault.Folder(requireNotNull(id))
SEARCH_TYPE_VAULT_TRASH -> SearchType.Vault.Trash
SEARCH_TYPE_VAULT_VERIFICATION_CODES -> SearchType.Vault.VerificationCodes
SEARCH_TYPE_VAULT_SSH_KEYS -> SearchType.Vault.SshKeys
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@SaintPatrck SaintPatrck enabled auto-merge October 29, 2024 21:19
@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 78e7adf Oct 29, 2024
10 checks passed
@SaintPatrck SaintPatrck deleted the ssh-keys/add-edit-content branch October 29, 2024 22:08
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