From 647428c289442df02a02f7f34a79bf88896b8763 Mon Sep 17 00:00:00 2001 From: Hinton Date: Fri, 9 Feb 2024 18:14:23 +0100 Subject: [PATCH 1/6] Update readme --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9e3aa325f..a2d0296dd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ -# Bitwarden Secrets Manager SDK +# Bitwarden SDK -This repository houses the Bitwarden Secrets Manager SDK. The core SDK is written in Rust and -provides a Rust API, CLI and Node-API bindings. In the future more language bindings might be added. +This repository houses the Bitwarden SDKs. We currently provide a public Secrets Manager SDK and an +internal SDK for the Bitwarden Password Manager which is used for the native mobile applications. +The SDK is written in Rust and provides a Rust API, CLI and various language bindings. + +### Disclaimer + +The password manager SDK is not intended for public use and is not supported by Bitwarden at this +stage. It is solely intended to centralized the business logic and to provide a single source of +truth for the internal applications. As the SDK evolves into a more stable and feature complete +state we will re-evaluate the possibility of publishing stable bindings for the public. # We're Hiring! @@ -17,18 +25,19 @@ cargo build ## Crates -The project is structured as a monorepo using cargo workspaces. +The project is structured as a monorepo using cargo workspaces. Some of the more noteworthy crates +are: - [`bitwarden`](./crates/bitwarden/): Rust friendly API for interacting with the secrets manager. - [`bitwarden-api-api`](./crates/bitwarden-api-api/): Auto-generated API bindings for the API server. - [`bitwarden-api-identity`](./crates/bitwarden-api-identity/): Auto-generated API bindings for the Identity server. +- [`bws`](./crates/bws/): CLI for interacting with the secrets manager. - [`bitwarden-c`](./crates/bitwarden-c/): C bindings for FFI interop. - [`bitwarden-json`](./crates/bitwarden-json/): JSON wrapper around the `bitwarden` crate. Powers the other language bindings. - [`bitwarden-napi`](./crates/bitwarden-napi/): Node-API bindings. -- [`bws`](./crates/bws/): CLI for interacting with the secrets manager. - [`sdk-schemas`](./crates/sdk-schemas/): Generator for the _json schemas_. ## Schemas @@ -65,21 +74,12 @@ ASPNETCORE_ENVIRONMENT=development dotnet swagger tofile --output ../../identity ### OpenApi Generator -Runs from the root of the SDK project. +To generate a new version of the bindings run the following script from the root of the SDK project. ```bash ./support/build-api.sh ``` -OpenApi Generator works using templates, we have customized our templates to work better with our -codebase. - -- https://github.com/OpenAPITools/openapi-generator/issues/10977 -- https://github.com/OpenAPITools/openapi-generator/issues/12464 - -There is also a scenario where we have a negative integer enum which completely breaks the openapi -generation. In that case we excluded the file from being generated and manually patched it. -`crates/bitwarden-api-api/src/models/organization_user_status_type.rs` - -The hope going forward is that we can continue to use the generator with minimal manual -intervention. +This project uses customized templates which lives in the `support/templates` directory. These +templates resolves some outstanding issues we've experienced with the rust generator. But we strive +towards modifying the templates as little as possible to ease future upgrades. From 0a61c4421a3bece7679590906b4e331e83ca989f Mon Sep 17 00:00:00 2001 From: Hinton Date: Fri, 9 Feb 2024 18:17:30 +0100 Subject: [PATCH 2/6] Add some SM links --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2d0296dd..cac288d16 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ are: server. - [`bitwarden-api-identity`](./crates/bitwarden-api-identity/): Auto-generated API bindings for the Identity server. -- [`bws`](./crates/bws/): CLI for interacting with the secrets manager. +- [`bws`](./crates/bws/): CLI for interacting with the [Bitwarden Secrets Manager][secrets-manager]. + Review the [CLI documentation][bws-help]. - [`bitwarden-c`](./crates/bitwarden-c/): C bindings for FFI interop. - [`bitwarden-json`](./crates/bitwarden-json/): JSON wrapper around the `bitwarden` crate. Powers the other language bindings. @@ -83,3 +84,6 @@ To generate a new version of the bindings run the following script from the root This project uses customized templates which lives in the `support/templates` directory. These templates resolves some outstanding issues we've experienced with the rust generator. But we strive towards modifying the templates as little as possible to ease future upgrades. + +[secrets-manager]: https://bitwarden.com/products/secrets-manager/ +[bws-help]: https://bitwarden.com/help/secrets-manager-cli/ From f3df35b8b7b6dfe82840069de75f2bc601171444 Mon Sep 17 00:00:00 2001 From: Hinton Date: Fri, 9 Feb 2024 18:18:34 +0100 Subject: [PATCH 3/6] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cac288d16..9ed12afa0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The SDK is written in Rust and provides a Rust API, CLI and various language bin ### Disclaimer The password manager SDK is not intended for public use and is not supported by Bitwarden at this -stage. It is solely intended to centralized the business logic and to provide a single source of +stage. It is solely intended to centralize the business logic and to provide a single source of truth for the internal applications. As the SDK evolves into a more stable and feature complete state we will re-evaluate the possibility of publishing stable bindings for the public. From 596250211ca78a6b84ec992a7d9cce3f55dee5fd Mon Sep 17 00:00:00 2001 From: Hinton Date: Fri, 9 Feb 2024 18:26:22 +0100 Subject: [PATCH 4/6] Fix path --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9ed12afa0..c798d47f6 100644 --- a/README.md +++ b/README.md @@ -81,9 +81,9 @@ To generate a new version of the bindings run the following script from the root ./support/build-api.sh ``` -This project uses customized templates which lives in the `support/templates` directory. These -templates resolves some outstanding issues we've experienced with the rust generator. But we strive -towards modifying the templates as little as possible to ease future upgrades. +This project uses customized templates which lives in the `support/openapi-templates` directory. +These templates resolves some outstanding issues we've experienced with the rust generator. But we +strive towards modifying the templates as little as possible to ease future upgrades. [secrets-manager]: https://bitwarden.com/products/secrets-manager/ [bws-help]: https://bitwarden.com/help/secrets-manager-cli/ From bc5fddd66f316377194c3dad00339a2ff0b9dd04 Mon Sep 17 00:00:00 2001 From: Hinton Date: Tue, 13 Feb 2024 11:17:11 +0100 Subject: [PATCH 5/6] Update list --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c798d47f6..3c4d3a98a 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ are: server. - [`bitwarden-api-identity`](./crates/bitwarden-api-identity/): Auto-generated API bindings for the Identity server. -- [`bws`](./crates/bws/): CLI for interacting with the [Bitwarden Secrets Manager][secrets-manager]. - Review the [CLI documentation][bws-help]. - [`bitwarden-c`](./crates/bitwarden-c/): C bindings for FFI interop. - [`bitwarden-json`](./crates/bitwarden-json/): JSON wrapper around the `bitwarden` crate. Powers the other language bindings. - [`bitwarden-napi`](./crates/bitwarden-napi/): Node-API bindings. +- [`bws`](./crates/bws/): CLI for interacting with the [Bitwarden Secrets Manager][secrets-manager]. + Review the [CLI documentation][bws-help]. - [`sdk-schemas`](./crates/sdk-schemas/): Generator for the _json schemas_. ## Schemas From 2c2d3dd135ef98e26a33ba7085dbf98232be3f7c Mon Sep 17 00:00:00 2001 From: Hinton Date: Tue, 13 Feb 2024 21:12:03 +0100 Subject: [PATCH 6/6] Add bolded section --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c4d3a98a..bab08af9a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ The SDK is written in Rust and provides a Rust API, CLI and various language bin The password manager SDK is not intended for public use and is not supported by Bitwarden at this stage. It is solely intended to centralize the business logic and to provide a single source of truth for the internal applications. As the SDK evolves into a more stable and feature complete -state we will re-evaluate the possibility of publishing stable bindings for the public. +state we will re-evaluate the possibility of publishing stable bindings for the public. **The +password manager interface is unstable and will change without warning.** # We're Hiring!