-
Notifications
You must be signed in to change notification settings - Fork 25
[PM-27232] Implement Registration for TDE Users #596
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
Open
quexten
wants to merge
8
commits into
main
Choose a base branch
from
km/tde-registration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+529
โ12
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ac1e990
Implement TDE v2 registration
quexten 5d6067a
Add tests
quexten 9cdb0b2
Cleanup cargo toml
quexten 9ff75be
Cleanup unused
quexten 571c9cd
Add uniffi
quexten 2d21cfe
Rename result to response
quexten a43b624
Fix uniffi build
quexten df619e4
Run cargo sort on workspace
quexten 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
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
57 changes: 57 additions & 0 deletions
57
crates/bitwarden-api-identity/src/models/account_keys_request_model.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* | ||
| * Bitwarden Identity | ||
| * | ||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
| * | ||
| * The version of the OpenAPI document: v1 | ||
| * | ||
| * Generated by: https://openapi-generator.tech | ||
| */ | ||
|
|
||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| use crate::models; | ||
|
|
||
| #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct AccountKeysRequestModel { | ||
| #[serde( | ||
| rename = "userKeyEncryptedAccountPrivateKey", | ||
| alias = "UserKeyEncryptedAccountPrivateKey" | ||
| )] | ||
| pub user_key_encrypted_account_private_key: Option<String>, | ||
| #[serde(rename = "accountPublicKey", alias = "AccountPublicKey")] | ||
| pub account_public_key: Option<String>, | ||
| #[serde( | ||
| rename = "publicKeyEncryptionKeyPair", | ||
| alias = "PublicKeyEncryptionKeyPair", | ||
| skip_serializing_if = "Option::is_none" | ||
| )] | ||
| pub public_key_encryption_key_pair: Option<Box<models::PublicKeyEncryptionKeyPairRequestModel>>, | ||
| #[serde( | ||
| rename = "signatureKeyPair", | ||
| alias = "SignatureKeyPair", | ||
| skip_serializing_if = "Option::is_none" | ||
| )] | ||
| pub signature_key_pair: Option<Box<models::SignatureKeyPairRequestModel>>, | ||
| #[serde( | ||
| rename = "securityState", | ||
| alias = "SecurityState", | ||
| skip_serializing_if = "Option::is_none" | ||
| )] | ||
| pub security_state: Option<Box<models::SecurityStateModel>>, | ||
| } | ||
|
|
||
| impl AccountKeysRequestModel { | ||
| pub fn new( | ||
| user_key_encrypted_account_private_key: Option<String>, | ||
| account_public_key: Option<String>, | ||
| ) -> AccountKeysRequestModel { | ||
| AccountKeysRequestModel { | ||
| user_key_encrypted_account_private_key, | ||
| account_public_key, | ||
| public_key_encryption_key_pair: None, | ||
| signature_key_pair: None, | ||
| security_state: None, | ||
| } | ||
| } | ||
| } |
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
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
40 changes: 40 additions & 0 deletions
40
crates/bitwarden-api-identity/src/models/public_key_encryption_key_pair_request_model.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * Bitwarden Identity | ||
| * | ||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
| * | ||
| * The version of the OpenAPI document: v1 | ||
| * | ||
| * Generated by: https://openapi-generator.tech | ||
| */ | ||
|
|
||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| use crate::models; | ||
|
|
||
| #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct PublicKeyEncryptionKeyPairRequestModel { | ||
| #[serde(rename = "wrappedPrivateKey", alias = "WrappedPrivateKey")] | ||
| pub wrapped_private_key: Option<String>, | ||
| #[serde(rename = "publicKey", alias = "PublicKey")] | ||
| pub public_key: Option<String>, | ||
| #[serde( | ||
| rename = "signedPublicKey", | ||
| alias = "SignedPublicKey", | ||
| skip_serializing_if = "Option::is_none" | ||
| )] | ||
| pub signed_public_key: Option<String>, | ||
| } | ||
|
|
||
| impl PublicKeyEncryptionKeyPairRequestModel { | ||
| pub fn new( | ||
| wrapped_private_key: Option<String>, | ||
| public_key: Option<String>, | ||
| ) -> PublicKeyEncryptionKeyPairRequestModel { | ||
| PublicKeyEncryptionKeyPairRequestModel { | ||
| wrapped_private_key, | ||
| public_key, | ||
| signed_public_key: None, | ||
| } | ||
| } | ||
| } |
30 changes: 30 additions & 0 deletions
30
crates/bitwarden-api-identity/src/models/security_state_model.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Bitwarden Identity | ||
| * | ||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
| * | ||
| * The version of the OpenAPI document: v1 | ||
| * | ||
| * Generated by: https://openapi-generator.tech | ||
| */ | ||
|
|
||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| use crate::models; | ||
|
|
||
| #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct SecurityStateModel { | ||
| #[serde(rename = "securityState", alias = "SecurityState")] | ||
| pub security_state: Option<String>, | ||
| #[serde(rename = "securityVersion", alias = "SecurityVersion")] | ||
| pub security_version: i32, | ||
| } | ||
|
|
||
| impl SecurityStateModel { | ||
| pub fn new(security_state: Option<String>, security_version: i32) -> SecurityStateModel { | ||
| SecurityStateModel { | ||
| security_state, | ||
| security_version, | ||
| } | ||
| } | ||
| } |
37 changes: 37 additions & 0 deletions
37
crates/bitwarden-api-identity/src/models/signature_key_pair_request_model.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * Bitwarden Identity | ||
| * | ||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
| * | ||
| * The version of the OpenAPI document: v1 | ||
| * | ||
| * Generated by: https://openapi-generator.tech | ||
| */ | ||
|
|
||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| use crate::models; | ||
|
|
||
| #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct SignatureKeyPairRequestModel { | ||
| #[serde(rename = "signatureAlgorithm", alias = "SignatureAlgorithm")] | ||
| pub signature_algorithm: Option<String>, | ||
| #[serde(rename = "wrappedSigningKey", alias = "WrappedSigningKey")] | ||
| pub wrapped_signing_key: Option<String>, | ||
| #[serde(rename = "verifyingKey", alias = "VerifyingKey")] | ||
| pub verifying_key: Option<String>, | ||
| } | ||
|
|
||
| impl SignatureKeyPairRequestModel { | ||
| pub fn new( | ||
| signature_algorithm: Option<String>, | ||
| wrapped_signing_key: Option<String>, | ||
| verifying_key: Option<String>, | ||
| ) -> SignatureKeyPairRequestModel { | ||
| SignatureKeyPairRequestModel { | ||
| signature_algorithm, | ||
| wrapped_signing_key, | ||
| verifying_key, | ||
| } | ||
| } | ||
| } |
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
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.
Uh oh!
There was an error while loading. Please reload this page.