-
Notifications
You must be signed in to change notification settings - Fork 24
[PM-25821] Migrate Cipher Admin operation API calls to SDK #560
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
f426fba
Add create and edit admin operations
nikwithak 3756f38
Add delete operations
nikwithak 99d1685
Add soft delete (PUT delete) operations
nikwithak 0cd1aee
Add update_collection call for ciphers
nikwithak 9f82e22
Add get_ciphers_for_org to CiphersClient
nikwithak f89f43d
Add admin endpoints for update and restore
nikwithak fe95edd
Add CipherError::Api(ApiError) variant
nikwithak bd13498
Clean up error handling
nikwithak c173c98
index on vault/pm-25821/cipher-admin-ops: bd134987 Clean up error hanโฆ
nikwithak 079cb89
Consolidate delete & restore operations
nikwithak f9eaafa
Cleanup and logic consolidation
nikwithak 4e48743
Update docs for CiphersClient::list_org_ciphers
nikwithak f3a06f6
Add separate delete_as_admin functions
nikwithak eb3291a
Add tests for new create methods
nikwithak 74714e6
Add tests for edit admin cipher endpoints
nikwithak 3330a78
Add tests for delete cipher endpoints
nikwithak 8307f07
Update repository when a cipher is soft-deleted
nikwithak 6485b2e
Update tests for delete
nikwithak 28880f9
Move restore operations to separate file
nikwithak 0356b2d
Fix test_restore_many tests
nikwithak 2246af5
Fix soft_delete_as_admin test
nikwithak 0a558c1
Housekeeping - remove comments & warnings
nikwithak 7dc66a5
Fix edit_as_admin tests
nikwithak 28aac12
Merge branch 'main' of https://github.com/bitwarden/sdk-internal intoโฆ
nikwithak a0ba6e3
Fix clippy warnings
nikwithak f90129b
Add soft-delete funciton to Cipher
nikwithak 8c633b9
Move cipher admin functions to separate client
nikwithak 3e38626
Move delete logic to isolated functions, outside of CiphersClient
nikwithak 7467c01
Move restore functions to isolated functions, remove wiremock use
nikwithak 6d59590
Move admin delete ops to new CipherAdminClient
nikwithak ef3fef3
Move restore operations to CipherAdminClient
nikwithak 715f75c
Move create admin operations to CreateAdminClient
nikwithak feb335f
Improve docs on delete.rs
nikwithak 1f6c8ab
Move admin edit operations to CipherAdminController
nikwithak a1c61ec
Fix cipher admin create tests
nikwithak f029f56
Fix edit cipher admin tests
nikwithak 8cbf8c8
Remove helper function for get_api_configurations in CiphersClient
nikwithak 8aa3692
Move list_org_ciphers operation to admin client
nikwithak 16e28b0
Housekeeping: Remove commented code, change ::into -> ::from
nikwithak ca6ae3f
Merge branch 'main' of https://github.com/bitwarden/sdk-internal intoโฆ
nikwithak 1cf82de
Remove test code added to real function by mistake
nikwithak a3c29f0
Add admin() function to get CipherAdminClient
nikwithak 2077e04
Fix date string format for API requests
nikwithak 58e01df
Change TryFrom implementations to PartialCipher on partial server resโฆ
nikwithak d1d5639
Move collection_ids into request struct
nikwithak 43d7bbb
Map EditCipherError::Decrypt to CryptoError
nikwithak 89e8bf5
Make orgnization_id required in admin delete many endpoints
nikwithak c27f110
Update visibility of CipherCreateRequestInternal::create_request to pโฆ
nikwithak 1aed2c3
Change impl syntax to use Generics, for consistency with folders client
nikwithak 13d9d56
Add docs to Cipher::soft_delete
nikwithak bd60140
REmove wiremock from test_create_org_cipher
nikwithak 26bc2ee
Merge branch 'main' of https://github.com/bitwarden/sdk-internal intoโฆ
nikwithak 6792a1b
Remove VaultParse and Api variants from GEtCipherError
nikwithak 602759a
Fix clippy errors
nikwithak 3e7752a
Add cfg(feature) check for wasm imports
nikwithak 4a3855b
Fix clippy errors
nikwithak 9237631
Update admin operations to use CreateCipherAdminError instead of Creaโฆ
nikwithak f4105a7
No longer update archived date on soft delete of ciphers
nikwithak 1dd2f05
Fix duplicated word in CipherAdminClient::create docs
nikwithak ce8d187
Rename GetOrganizationCiphersError -> GetOrganizationCiphersAdminError
nikwithak 374a157
Improve docs on CiphersClient::admin()
nikwithak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The methods putting
Apierrors inCipherErrorshould really be updated to not use cipher error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only one still using CipherError is the
shareoperations, which calls existing functions that currently returnsCipherErroralready (e.g. https://github.com/bitwarden/sdk-internal/blob/vault/pm-25821/cipher-admin-ops/crates/bitwarden-vault/src/cipher/cipher_client/share_cipher.rs#L180-L184) - I think we can migrate this one to its own error type in the future.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea sounds good.