diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index b67e9ed7b..4fd1cc975 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -102,7 +102,7 @@ jobs: run: ./build-schemas.sh - name: Publish - uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1 + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 with: arguments: sdk:publish build-root-directory: languages/kotlin diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index 461bcab02..4cef3fe63 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -109,7 +109,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/get-keyvault-secrets@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: keyvault: "bitwarden-ci" secrets: "cratesio-api-token" diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 8e4cc0fd9..5d4d3c3e7 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -58,7 +58,7 @@ jobs: - name: Download all Release artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/download-artifacts@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: workflow: build-cli.yml path: packages @@ -67,7 +67,7 @@ jobs: - name: Dry Run - Download all artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/download-artifacts@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: workflow: build-cli.yml path: packages @@ -75,7 +75,7 @@ jobs: branch: master - name: Get checksum files - uses: bitwarden/gh-actions/get-checksum@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/get-checksum@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: packages_dir: "packages" file_path: "packages/bws-sha256-checksums-${{ steps.version.outputs.version }}.txt" @@ -134,7 +134,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/get-keyvault-secrets@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: keyvault: "bitwarden-ci" secrets: "cratesio-api-token" diff --git a/.github/workflows/release-napi.yml b/.github/workflows/release-napi.yml index 35040d19f..5c4992fc5 100644 --- a/.github/workflows/release-napi.yml +++ b/.github/workflows/release-napi.yml @@ -47,7 +47,7 @@ jobs: - name: Check Release Version id: version - uses: bitwarden/gh-actions/release-version-check@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/release-version-check@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: release-type: ${{ github.event.inputs.release_type }} project-type: ts @@ -101,7 +101,7 @@ jobs: - name: Download schemas if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/download-artifacts@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: workflow: build-napi.yml artifacts: schemas.ts @@ -111,7 +111,7 @@ jobs: - name: Dry Run - Download schemas if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/download-artifacts@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: workflow: build-napi.yml artifacts: schemas.ts @@ -132,14 +132,14 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/get-keyvault-secrets@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: keyvault: "bitwarden-ci" secrets: "npm-api-key" - name: Download artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/download-artifacts@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: workflow: build-napi.yml path: ${{ github.workspace }}/crates/bitwarden-napi/artifacts @@ -148,7 +148,7 @@ jobs: - name: Dry Run - Download artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/download-artifacts@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: workflow: build-napi.yml path: ${{ github.workspace }}/crates/bitwarden-napi/artifacts diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 1cbb87b47..c672edb61 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -49,7 +49,7 @@ jobs: - name: Retrieve secrets id: retrieve-secrets - uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + uses: bitwarden/gh-actions/get-keyvault-secrets@f1125802b1ccae8c601d7c4f61ce39ea254b10c8 with: keyvault: "bitwarden-ci" secrets: "github-gpg-private-key, github-gpg-private-key-passphrase" diff --git a/Cargo.lock b/Cargo.lock index 814fe5318..58fb5ff26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,9 +63,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -77,15 +77,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "askama" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47cbc3cf73fa8d9833727bbee4835ba5c421a0d65b72daf9a7b5d0e0f9cfb57e" +checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" dependencies = [ "askama_derive", "askama_escape", @@ -145,18 +145,18 @@ dependencies = [ [[package]] name = "askama_derive" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22fbe0413545c098358e56966ff22cdd039e10215ae213cfbd65032b119fc94" +checksum = "9a0fc7dcf8bd4ead96b1d36b41df47c14beedf7b0301fc543d8f2384e66a2ec0" dependencies = [ + "askama_parser", "basic-toml", "mime", "mime_guess", - "nom", "proc-macro2", "quote", "serde", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -165,6 +165,15 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" +[[package]] +name = "askama_parser" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c268a96e01a4c47c8c5c2472aaa570707e006a875ea63e819f75474ceedaf7b4" +dependencies = [ + "nom", +] + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -209,7 +218,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -533,7 +542,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "toml 0.8.0", + "toml 0.8.2", "uuid", ] @@ -545,9 +554,9 @@ checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -642,9 +651,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.4" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", @@ -652,9 +661,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.4" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", @@ -664,9 +673,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.1" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4110a1e6af615a9e6d0a36f805d5c99099f8bab9b8042f5bc1fa220a4a89e36f" +checksum = "e3ae8ba90b9d8b007efe66e55e48fb936272f5ca00349b5b0e89877520d35ea7" dependencies = [ "clap", ] @@ -680,7 +689,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -748,9 +757,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -909,12 +918,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f34ba9a9bcb8645379e9de8cb3ecfcf4d1c85ba66d90deb3259206fa5aa193b" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" dependencies = [ "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -932,9 +941,9 @@ dependencies = [ [[package]] name = "deadpool-runtime" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" +checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" [[package]] name = "der" @@ -1107,9 +1116,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" dependencies = [ "errno-dragonfly", "libc", @@ -1153,9 +1162,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "flate2" @@ -1274,7 +1283,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1410,9 +1419,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "heck" @@ -1594,12 +1603,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -1723,9 +1732,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "line-wrap" @@ -1744,9 +1753,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "lock_api" @@ -1766,9 +1775,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -2055,7 +2064,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2100,9 +2109,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -2244,9 +2253,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "5b1106fec09662ec6dd98ccac0f81cef56984d0b49f75c92d8cbad76e20c005c" dependencies = [ "unicode-ident", ] @@ -2467,9 +2476,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ "aho-corasick", "memchr", @@ -2479,9 +2488,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", @@ -2496,9 +2505,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.20" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "base64 0.21.4", "bytes", @@ -2522,6 +2531,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", "tower-service", @@ -2577,9 +2587,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.14" +version = "0.38.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" dependencies = [ "bitflags 2.4.0", "errno", @@ -2680,7 +2690,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2745,7 +2755,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2800,7 +2810,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2842,7 +2852,7 @@ version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "itoa", "ryu", "serde", @@ -2862,9 +2872,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2873,9 +2883,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -3043,9 +3053,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -3071,6 +3081,27 @@ dependencies = [ "walkdir", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "target-lexicon" version = "0.12.11" @@ -3084,7 +3115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", "rustix", "windows-sys 0.48.0", @@ -3101,22 +3132,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3197,7 +3228,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3235,9 +3266,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", @@ -3256,11 +3287,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -3430,7 +3461,7 @@ version = "0.24.1" source = "git+https://github.com/mozilla/uniffi-rs?rev=53d5ac7274d8b4d66ad35b68cb6e2d89898f96af#53d5ac7274d8b4d66ad35b68cb6e2d89898f96af" dependencies = [ "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3460,7 +3491,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.37", + "syn 2.0.38", "toml 0.5.11", "uniffi_build", "uniffi_meta", @@ -3562,9 +3593,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" @@ -3620,7 +3651,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -3654,7 +3685,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3881,9 +3912,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" dependencies = [ "memchr", ] diff --git a/crates/bitwarden-napi/src-ts/bitwarden_client/index.ts b/crates/bitwarden-napi/src-ts/bitwarden_client/index.ts index 9f48fe938..eefbb1204 100644 --- a/crates/bitwarden-napi/src-ts/bitwarden_client/index.ts +++ b/crates/bitwarden-napi/src-ts/bitwarden_client/index.ts @@ -4,7 +4,6 @@ import { ClientSettings, Convert, ResponseForAPIKeyLoginResponse, - ResponseForPasswordLoginResponse, ResponseForSecretIdentifiersResponse, ResponseForSecretResponse, ResponseForSecretsDeleteResponse, @@ -19,19 +18,6 @@ export class BitwardenClient { this.client = new rust.BitwardenClient(settingsJson, loggingLevel ?? LogLevel.Info); } - async login(email: string, password: string): Promise { - const response = await this.client.runCommand( - Convert.commandToJson({ - passwordLogin: { - email: email, - password: password, - }, - }), - ); - - return Convert.toResponseForPasswordLoginResponse(response); - } - async loginWithAccessToken(accessToken: string): Promise { const commandInput = Convert.commandToJson({ accessTokenLogin: { diff --git a/crates/bitwarden-uniffi/src/auth/mod.rs b/crates/bitwarden-uniffi/src/auth/mod.rs index a1a0a2884..a5107768e 100644 --- a/crates/bitwarden-uniffi/src/auth/mod.rs +++ b/crates/bitwarden-uniffi/src/auth/mod.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use bitwarden::{ auth::{password::MasterPasswordPolicyOptions, RegisterKeyResponse}, - client::auth_settings::Kdf, + client::kdf::Kdf, }; use crate::{error::Result, Client}; diff --git a/crates/bitwarden-uniffi/src/docs.rs b/crates/bitwarden-uniffi/src/docs.rs index 94a40a0e9..bd30e974e 100644 --- a/crates/bitwarden-uniffi/src/docs.rs +++ b/crates/bitwarden-uniffi/src/docs.rs @@ -1,6 +1,6 @@ use bitwarden::{ auth::password::MasterPasswordPolicyOptions, - client::auth_settings::Kdf, + client::kdf::Kdf, mobile::crypto::InitCryptoRequest, tool::{ExportFormat, PassphraseGeneratorRequest, PasswordGeneratorRequest}, vault::{Cipher, CipherView, Collection, Folder, FolderView, Send, SendListView, SendView}, diff --git a/crates/bitwarden/src/auth/client_auth.rs b/crates/bitwarden/src/auth/client_auth.rs index 7c5d1d98e..8ffca0a44 100644 --- a/crates/bitwarden/src/auth/client_auth.rs +++ b/crates/bitwarden/src/auth/client_auth.rs @@ -3,7 +3,7 @@ use super::{ register::{make_register_keys, register}, RegisterKeyResponse, RegisterRequest, }; -use crate::{client::auth_settings::Kdf, error::Result, Client}; +use crate::{client::kdf::Kdf, error::Result, Client}; pub struct ClientAuth<'a> { pub(crate) client: &'a mut crate::Client, diff --git a/crates/bitwarden/src/auth/login/access_token.rs b/crates/bitwarden/src/auth/login/access_token.rs index ec3583bba..46fa35779 100644 --- a/crates/bitwarden/src/auth/login/access_token.rs +++ b/crates/bitwarden/src/auth/login/access_token.rs @@ -9,7 +9,7 @@ use crate::{ api::{request::AccessTokenRequest, response::IdentityTokenResponse}, login::{response::two_factor::TwoFactorProviders, PasswordLoginResponse}, }, - client::{AccessToken, LoginMethod}, + client::{AccessToken, LoginMethod, ServiceAccountLoginMethod}, crypto::{EncString, SymmetricCryptoKey}, error::{Error, Result}, util::{decode_token, BASE64_ENGINE}, @@ -59,11 +59,11 @@ pub(crate) async fn access_token_login( r.access_token.clone(), r.refresh_token.clone(), r.expires_in, - LoginMethod::AccessToken { + LoginMethod::ServiceAccount(ServiceAccountLoginMethod::AccessToken { service_account_id: access_token.service_account_id, client_secret: access_token.client_secret, organization_id, - }, + }), ); client.initialize_crypto_single_key(encryption_key); diff --git a/crates/bitwarden/src/auth/login/api_key.rs b/crates/bitwarden/src/auth/login/api_key.rs index 4f3167aee..a9fa954d7 100644 --- a/crates/bitwarden/src/auth/login/api_key.rs +++ b/crates/bitwarden/src/auth/login/api_key.rs @@ -6,12 +6,9 @@ use serde::{Deserialize, Serialize}; use crate::{ auth::{ api::{request::ApiTokenRequest, response::IdentityTokenResponse}, - login::{ - determine_password_hash, response::two_factor::TwoFactorProviders, - PasswordLoginResponse, - }, + login::{response::two_factor::TwoFactorProviders, PasswordLoginResponse}, }, - client::LoginMethod, + client::{LoginMethod, UserLoginMethod}, crypto::EncString, error::{Error, Result}, util::decode_token, @@ -28,16 +25,6 @@ pub(crate) async fn api_key_login( let response = request_api_identity_tokens(client, input).await?; if let IdentityTokenResponse::Authenticated(r) = &response { - client.set_tokens( - r.access_token.clone(), - r.refresh_token.clone(), - r.expires_in, - LoginMethod::ApiKey { - client_id: input.client_id.to_owned(), - client_secret: input.client_secret.to_owned(), - }, - ); - let access_token_obj = decode_token(&r.access_token)?; // This should always be Some() when logging in with an api key @@ -45,7 +32,19 @@ pub(crate) async fn api_key_login( .email .ok_or(Error::Internal("Access token doesn't contain email"))?; - let _ = determine_password_hash(client, &email, &input.password).await?; + let kdf = client.prelogin(email.clone()).await?; + + client.set_tokens( + r.access_token.clone(), + r.refresh_token.clone(), + r.expires_in, + LoginMethod::User(UserLoginMethod::ApiKey { + client_id: input.client_id.to_owned(), + client_secret: input.client_secret.to_owned(), + email, + kdf, + }), + ); let user_key = EncString::from_str(r.key.as_deref().unwrap()).unwrap(); let private_key = EncString::from_str(r.private_key.as_deref().unwrap()).unwrap(); diff --git a/crates/bitwarden/src/auth/login/mod.rs b/crates/bitwarden/src/auth/login/mod.rs index e3b3ebffa..9e1dbb818 100644 --- a/crates/bitwarden/src/auth/login/mod.rs +++ b/crates/bitwarden/src/auth/login/mod.rs @@ -1,7 +1,7 @@ #[cfg(feature = "internal")] use { crate::{ - client::{auth_settings::AuthSettings, Client}, + client::{kdf::Kdf, Client}, error::Result, }, bitwarden_api_identity::{ @@ -40,21 +40,18 @@ pub(crate) use access_token::access_token_login; pub use access_token::{AccessTokenLoginRequest, AccessTokenLoginResponse}; #[cfg(feature = "internal")] -async fn determine_password_hash( - client: &mut Client, - email: &str, - password: &str, -) -> Result { - let pre_login = request_prelogin(client, email.to_owned()).await?; - let auth_settings = AuthSettings::new(pre_login, email.to_owned()); - let password_hash = auth_settings.derive_user_password_hash(password)?; - client.set_auth_settings(auth_settings); +async fn determine_password_hash(email: &str, kdf: &Kdf, password: &str) -> Result { + use crate::crypto::{HashPurpose, MasterKey}; - Ok(password_hash) + let master_key = MasterKey::derive(password.as_bytes(), email.as_bytes(), kdf)?; + master_key.derive_master_key_hash(password.as_bytes(), HashPurpose::ServerAuthorization) } #[cfg(feature = "internal")] -async fn request_prelogin(client: &mut Client, email: String) -> Result { +pub(crate) async fn request_prelogin( + client: &mut Client, + email: String, +) -> Result { let request_model = PreloginRequestModel::new(email); let config = client.get_api_configurations().await; Ok(accounts_prelogin_post(&config.identity, Some(request_model)).await?) diff --git a/crates/bitwarden/src/auth/login/password.rs b/crates/bitwarden/src/auth/login/password.rs index 0101f2ce1..33f7ea338 100644 --- a/crates/bitwarden/src/auth/login/password.rs +++ b/crates/bitwarden/src/auth/login/password.rs @@ -12,7 +12,7 @@ use crate::{ api::request::PasswordTokenRequest, login::{determine_password_hash, TwoFactorRequest}, }, - client::LoginMethod, + client::{kdf::Kdf, LoginMethod}, crypto::EncString, Client, }; @@ -29,10 +29,12 @@ pub(crate) async fn password_login( client: &mut Client, input: &PasswordLoginRequest, ) -> Result { + use crate::client::UserLoginMethod; + info!("password logging in"); debug!("{:#?}, {:#?}", client, input); - let password_hash = determine_password_hash(client, &input.email, &input.password).await?; + let password_hash = determine_password_hash(&input.email, &input.kdf, &input.password).await?; let response = request_identity_tokens(client, input, &password_hash).await?; if let IdentityTokenResponse::Authenticated(r) = &response { @@ -40,9 +42,11 @@ pub(crate) async fn password_login( r.access_token.clone(), r.refresh_token.clone(), r.expires_in, - LoginMethod::Username { + LoginMethod::User(UserLoginMethod::Username { client_id: "web".to_owned(), - }, + email: input.email.to_owned(), + kdf: input.kdf.to_owned(), + }), ); let user_key = EncString::from_str(r.key.as_deref().unwrap()).unwrap(); @@ -77,6 +81,8 @@ pub struct PasswordLoginRequest { pub password: String, // Two-factor authentication pub two_factor: Option, + /// Kdf from prelogin + pub kdf: Kdf, } #[derive(Serialize, Deserialize, Debug, JsonSchema)] diff --git a/crates/bitwarden/src/auth/login/two_factor.rs b/crates/bitwarden/src/auth/login/two_factor.rs index 6b49332e5..04c411349 100644 --- a/crates/bitwarden/src/auth/login/two_factor.rs +++ b/crates/bitwarden/src/auth/login/two_factor.rs @@ -19,7 +19,10 @@ pub(crate) async fn send_two_factor_email( client: &mut Client, input: &TwoFactorEmailRequest, ) -> Result<()> { - let password_hash = determine_password_hash(client, &input.email, &input.password).await?; + // TODO: This should be resolved from the client + let kdf = client.prelogin(input.email.clone()).await?; + + let password_hash = determine_password_hash(&input.email, &kdf, &input.password).await?; let config = client.get_api_configurations().await; bitwarden_api_api::apis::two_factor_api::two_factor_send_email_login_post( diff --git a/crates/bitwarden/src/auth/register.rs b/crates/bitwarden/src/auth/register.rs index 1815b5457..8336ec9c9 100644 --- a/crates/bitwarden/src/auth/register.rs +++ b/crates/bitwarden/src/auth/register.rs @@ -6,7 +6,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::{ - client::auth_settings::Kdf, + client::kdf::Kdf, crypto::{HashPurpose, MasterKey, RsaKeyPair}, error::Result, util::default_pbkdf2_iterations, diff --git a/crates/bitwarden/src/auth/renew.rs b/crates/bitwarden/src/auth/renew.rs index 1752f3466..3b2dbef7d 100644 --- a/crates/bitwarden/src/auth/renew.rs +++ b/crates/bitwarden/src/auth/renew.rs @@ -1,10 +1,10 @@ use std::time::{Duration, Instant}; #[cfg(feature = "internal")] -use crate::auth::api::request::ApiTokenRequest; +use crate::{auth::api::request::ApiTokenRequest, client::UserLoginMethod}; use crate::{ auth::api::{request::AccessTokenRequest, response::IdentityTokenResponse}, - client::{Client, LoginMethod}, + client::{Client, LoginMethod, ServiceAccountLoginMethod}, error::{Error, Result}, }; @@ -18,37 +18,41 @@ pub(crate) async fn renew_token(client: &mut Client) -> Result<()> { let res = match login_method { #[cfg(feature = "internal")] - LoginMethod::Username { client_id } => { - let refresh = client - .refresh_token - .as_deref() - .ok_or(Error::NotAuthenticated)?; + LoginMethod::User(u) => match u { + UserLoginMethod::Username { client_id, .. } => { + let refresh = client + .refresh_token + .as_deref() + .ok_or(Error::NotAuthenticated)?; - crate::auth::api::request::RenewTokenRequest::new( - refresh.to_owned(), - client_id.to_owned(), - ) - .send(&client.__api_configurations) - .await? - } - #[cfg(feature = "internal")] - LoginMethod::ApiKey { - client_id, - client_secret, - } => { - ApiTokenRequest::new(client_id, client_secret) - .send(&client.__api_configurations) - .await? - } - LoginMethod::AccessToken { - service_account_id, - client_secret, - .. - } => { - AccessTokenRequest::new(*service_account_id, client_secret) + crate::auth::api::request::RenewTokenRequest::new( + refresh.to_owned(), + client_id.to_owned(), + ) .send(&client.__api_configurations) .await? - } + } + UserLoginMethod::ApiKey { + client_id, + client_secret, + .. + } => { + ApiTokenRequest::new(client_id, client_secret) + .send(&client.__api_configurations) + .await? + } + }, + LoginMethod::ServiceAccount(s) => match s { + ServiceAccountLoginMethod::AccessToken { + service_account_id, + client_secret, + .. + } => { + AccessTokenRequest::new(*service_account_id, client_secret) + .send(&client.__api_configurations) + .await? + } + }, }; match res { diff --git a/crates/bitwarden/src/client/client.rs b/crates/bitwarden/src/client/client.rs index 357b13aa1..f6eb0c954 100644 --- a/crates/bitwarden/src/client/client.rs +++ b/crates/bitwarden/src/client/client.rs @@ -1,24 +1,20 @@ use std::time::{Duration, Instant}; -use reqwest::header::{self}; -use uuid::Uuid; #[cfg(feature = "internal")] -use { - crate::{ - auth::login::{ - api_key_login, password_login, send_two_factor_email, ApiKeyLoginRequest, - ApiKeyLoginResponse, PasswordLoginRequest, PasswordLoginResponse, - TwoFactorEmailRequest, - }, - client::auth_settings::AuthSettings, - crypto::EncString, - platform::{ - generate_fingerprint, get_user_api_key, sync, FingerprintRequest, FingerprintResponse, - SecretVerificationRequest, SyncRequest, SyncResponse, UserApiKeyResponse, - }, +use crate::{ + auth::login::{ + api_key_login, password_login, send_two_factor_email, ApiKeyLoginRequest, + ApiKeyLoginResponse, PasswordLoginRequest, PasswordLoginResponse, TwoFactorEmailRequest, + }, + client::kdf::Kdf, + crypto::EncString, + platform::{ + generate_fingerprint, get_user_api_key, sync, FingerprintRequest, FingerprintResponse, + SecretVerificationRequest, SyncRequest, SyncResponse, UserApiKeyResponse, }, - log::debug, }; +use reqwest::header::{self}; +use uuid::Uuid; #[cfg(feature = "secrets")] use crate::auth::login::{access_token_login, AccessTokenLoginRequest, AccessTokenLoginResponse}; @@ -42,12 +38,31 @@ pub(crate) struct ApiConfigurations { #[derive(Debug, Clone)] pub(crate) enum LoginMethod { #[cfg(feature = "internal")] - Username { client_id: String }, - #[cfg(feature = "internal")] + User(UserLoginMethod), + // TODO: Organizations supports api key + // Organization(OrganizationLoginMethod), + ServiceAccount(ServiceAccountLoginMethod), +} + +#[derive(Debug, Clone)] +#[cfg(feature = "internal")] +pub(crate) enum UserLoginMethod { + Username { + client_id: String, + email: String, + kdf: Kdf, + }, ApiKey { client_id: String, client_secret: String, + + email: String, + kdf: Kdf, }, +} + +#[derive(Debug, Clone)] +pub(crate) enum ServiceAccountLoginMethod { AccessToken { service_account_id: Uuid, client_secret: String, @@ -67,9 +82,6 @@ pub struct Client { #[doc(hidden)] pub(crate) __api_configurations: ApiConfigurations, - #[cfg(feature = "internal")] - auth_settings: Option, - encryption_settings: Option, } @@ -114,8 +126,6 @@ impl Client { api, device_type: settings.device_type, }, - #[cfg(feature = "internal")] - auth_settings: None, encryption_settings: None, } } @@ -127,6 +137,13 @@ impl Client { &self.__api_configurations } + #[cfg(feature = "internal")] + pub async fn prelogin(&mut self, email: String) -> Result { + use crate::auth::login::request_prelogin; + + request_prelogin(self, email).await?.try_into() + } + #[cfg(feature = "internal")] pub async fn password_login( &mut self, @@ -165,15 +182,16 @@ impl Client { } #[cfg(feature = "internal")] - pub(crate) fn get_auth_settings(&self) -> &Option { - &self.auth_settings + pub(crate) fn get_login_method(&self) -> &Option { + &self.login_method } pub fn get_access_token_organization(&self) -> Option { - match &self.login_method { - Some(LoginMethod::AccessToken { - organization_id, .. - }) => Some(*organization_id), + match self.login_method { + Some(LoginMethod::ServiceAccount(ServiceAccountLoginMethod::AccessToken { + organization_id, + .. + })) => Some(organization_id), _ => None, } } @@ -182,10 +200,12 @@ impl Client { self.encryption_settings.as_ref().ok_or(Error::VaultLocked) } - #[cfg(feature = "internal")] - pub(crate) fn set_auth_settings(&mut self, auth_settings: AuthSettings) { - debug! {"setting auth settings: {:#?}", auth_settings} - self.auth_settings = Some(auth_settings); + #[cfg(feature = "mobile")] + pub(crate) fn set_login_method(&mut self, login_method: LoginMethod) { + use log::debug; + + debug! {"setting login method: {:#?}", login_method} + self.login_method = Some(login_method); } pub(crate) fn set_tokens( @@ -209,7 +229,7 @@ impl Client { #[cfg(feature = "internal")] pub fn is_authed(&self) -> bool { - self.token.is_some() || self.auth_settings.is_some() + self.token.is_some() || self.login_method.is_some() } #[cfg(feature = "internal")] @@ -219,13 +239,13 @@ impl Client { user_key: EncString, private_key: EncString, ) -> Result<&EncryptionSettings> { - let auth = match &self.auth_settings { - Some(a) => a, - None => return Err(Error::NotAuthenticated), + let login_method = match &self.login_method { + Some(LoginMethod::User(u)) => u, + _ => return Err(Error::NotAuthenticated), }; self.encryption_settings = Some(EncryptionSettings::new( - auth, + login_method, password, user_key, private_key, diff --git a/crates/bitwarden/src/client/encryption_settings.rs b/crates/bitwarden/src/client/encryption_settings.rs index 56f4b2628..9c79a1781 100644 --- a/crates/bitwarden/src/client/encryption_settings.rs +++ b/crates/bitwarden/src/client/encryption_settings.rs @@ -4,7 +4,7 @@ use rsa::RsaPrivateKey; use uuid::Uuid; #[cfg(feature = "internal")] use { - crate::client::auth_settings::AuthSettings, + crate::client::UserLoginMethod, rsa::{pkcs8::DecodePrivateKey, Oaep}, }; @@ -28,30 +28,38 @@ impl std::fmt::Debug for EncryptionSettings { impl EncryptionSettings { #[cfg(feature = "internal")] pub(crate) fn new( - auth: &AuthSettings, + login_method: &UserLoginMethod, password: &str, user_key: EncString, private_key: EncString, ) -> Result { use crate::crypto::MasterKey; - // Derive master key from password - let master_key = MasterKey::derive(password.as_bytes(), auth.email.as_bytes(), &auth.kdf)?; - - // Decrypt the user key - let user_key = master_key.decrypt_user_key(user_key)?; - - // Decrypt the private key with the user key - let private_key = { - let dec = private_key.decrypt_with_key(&user_key)?; - Some(rsa::RsaPrivateKey::from_pkcs8_der(&dec).map_err(|_| CryptoError::InvalidKey)?) - }; - - Ok(EncryptionSettings { - user_key, - private_key, - org_keys: HashMap::new(), - }) + match login_method { + UserLoginMethod::Username { email, kdf, .. } + | UserLoginMethod::ApiKey { email, kdf, .. } => { + // Derive master key from password + let master_key = MasterKey::derive(password.as_bytes(), email.as_bytes(), kdf)?; + + // Decrypt the user key + let user_key = master_key.decrypt_user_key(user_key)?; + + // Decrypt the private key with the user key + let private_key = { + let dec = private_key.decrypt_with_key(&user_key)?; + Some( + rsa::RsaPrivateKey::from_pkcs8_der(&dec) + .map_err(|_| CryptoError::InvalidKey)?, + ) + }; + + Ok(EncryptionSettings { + user_key, + private_key, + org_keys: HashMap::new(), + }) + } + } } pub(crate) fn new_single_key(key: SymmetricCryptoKey) -> Self { diff --git a/crates/bitwarden/src/client/auth_settings.rs b/crates/bitwarden/src/client/kdf.rs similarity index 65% rename from crates/bitwarden/src/client/auth_settings.rs rename to crates/bitwarden/src/client/kdf.rs index 8d9aac3ca..4f1edfdb0 100644 --- a/crates/bitwarden/src/client/auth_settings.rs +++ b/crates/bitwarden/src/client/kdf.rs @@ -6,20 +6,9 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; #[cfg(feature = "internal")] -use crate::{ - crypto::{HashPurpose, MasterKey}, - error::Result, -}; +use crate::error::{Error, Result}; -#[derive(Debug)] -pub(crate) struct AuthSettings { - #[cfg(feature = "internal")] - pub email: String, - #[cfg(feature = "internal")] - pub(crate) kdf: Kdf, -} - -#[derive(Serialize, Deserialize, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Debug, JsonSchema, Clone)] #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Enum))] pub enum Kdf { @@ -33,15 +22,19 @@ pub enum Kdf { }, } -impl AuthSettings { - #[cfg(feature = "internal")] - pub fn new(response: PreloginResponseModel, email: String) -> Self { +#[cfg(feature = "internal")] +impl TryFrom for Kdf { + type Error = Error; + + fn try_from(response: PreloginResponseModel) -> Result { use crate::util::{ default_argon2_iterations, default_argon2_memory, default_argon2_parallelism, default_pbkdf2_iterations, }; - let kdf = match response.kdf.unwrap_or_default() { + let kdf = response.kdf.ok_or(Error::Internal("KDF not found"))?; + + Ok(match kdf { KdfType::Variant0 => Kdf::PBKDF2 { iterations: response .kdf_iterations @@ -62,14 +55,6 @@ impl AuthSettings { .and_then(|e| NonZeroU32::new(e as u32)) .unwrap_or_else(default_argon2_parallelism), }, - }; - - Self { email, kdf } - } - - #[cfg(feature = "internal")] - pub fn derive_user_password_hash(&self, password: &str) -> Result { - let master_key = MasterKey::derive(password.as_bytes(), self.email.as_bytes(), &self.kdf)?; - master_key.derive_master_key_hash(password.as_bytes(), HashPurpose::ServerAuthorization) + }) } } diff --git a/crates/bitwarden/src/client/mod.rs b/crates/bitwarden/src/client/mod.rs index 017d14ec8..25a2f5db0 100644 --- a/crates/bitwarden/src/client/mod.rs +++ b/crates/bitwarden/src/client/mod.rs @@ -2,11 +2,11 @@ pub(crate) use client::*; pub(crate) mod access_token; -pub mod auth_settings; #[allow(clippy::module_inception)] mod client; pub mod client_settings; pub(crate) mod encryption_settings; +pub mod kdf; pub use access_token::AccessToken; pub use client::Client; diff --git a/crates/bitwarden/src/crypto/master_key.rs b/crates/bitwarden/src/crypto/master_key.rs index dd4dd5019..f908d5299 100644 --- a/crates/bitwarden/src/crypto/master_key.rs +++ b/crates/bitwarden/src/crypto/master_key.rs @@ -1,18 +1,13 @@ -use aes::cipher::typenum::U32; +use aes::cipher::{generic_array::GenericArray, typenum::U32}; use base64::Engine; use rand::Rng; - -use crate::util::BASE64_ENGINE; +use sha2::Digest; use super::{ encrypt_aes256, hkdf_expand, EncString, PbkdfSha256Hmac, SymmetricCryptoKey, UserKey, PBKDF_SHA256_HMAC_OUT_SIZE, }; -use { - crate::{client::auth_settings::Kdf, error::Result}, - aes::cipher::generic_array::GenericArray, - sha2::Digest, -}; +use crate::{client::kdf::Kdf, error::Result, util::BASE64_ENGINE}; #[derive(Copy, Clone)] pub(crate) enum HashPurpose { @@ -115,10 +110,10 @@ fn stretch_master_key(master_key: &MasterKey) -> Result { #[cfg(test)] mod tests { - use crate::crypto::SymmetricCryptoKey; + use std::num::NonZeroU32; use super::{stretch_master_key, HashPurpose, MasterKey}; - use {crate::client::auth_settings::Kdf, std::num::NonZeroU32}; + use crate::{client::kdf::Kdf, crypto::SymmetricCryptoKey}; #[test] fn test_master_key_derive_pbkdf2() { diff --git a/crates/bitwarden/src/lib.rs b/crates/bitwarden/src/lib.rs index 31af93419..a61857992 100644 --- a/crates/bitwarden/src/lib.rs +++ b/crates/bitwarden/src/lib.rs @@ -12,7 +12,7 @@ //! //! # Basic setup //! -//! All operations in this crate are done via a [Client](crate::client::Client): +//! All operations in this crate are done via a [Client]: //! //! ```rust //! use bitwarden::{ diff --git a/crates/bitwarden/src/mobile/client_kdf.rs b/crates/bitwarden/src/mobile/client_kdf.rs index 92d226b59..320a03571 100644 --- a/crates/bitwarden/src/mobile/client_kdf.rs +++ b/crates/bitwarden/src/mobile/client_kdf.rs @@ -1,4 +1,4 @@ -use crate::{client::auth_settings::Kdf, error::Result, mobile::kdf::hash_password, Client}; +use crate::{client::kdf::Kdf, error::Result, mobile::kdf::hash_password, Client}; pub struct ClientKdf<'a> { pub(crate) client: &'a crate::Client, diff --git a/crates/bitwarden/src/mobile/crypto.rs b/crates/bitwarden/src/mobile/crypto.rs index fec569cfe..f4d26dc6c 100644 --- a/crates/bitwarden/src/mobile/crypto.rs +++ b/crates/bitwarden/src/mobile/crypto.rs @@ -3,12 +3,7 @@ use std::collections::HashMap; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use crate::{ - client::auth_settings::{AuthSettings, Kdf}, - crypto::EncString, - error::Result, - Client, -}; +use crate::{client::kdf::Kdf, crypto::EncString, error::Result, Client}; #[cfg(feature = "internal")] #[derive(Serialize, Deserialize, Debug, JsonSchema)] @@ -31,11 +26,12 @@ pub struct InitCryptoRequest { #[cfg(feature = "internal")] pub async fn initialize_crypto(client: &mut Client, req: InitCryptoRequest) -> Result<()> { - let auth_settings = AuthSettings { + let login_method = crate::client::LoginMethod::User(crate::client::UserLoginMethod::Username { + client_id: "".to_string(), email: req.email, kdf: req.kdf_params, - }; - client.set_auth_settings(auth_settings); + }); + client.set_login_method(login_method); let user_key = req.user_key.parse::()?; let private_key = req.private_key.parse::()?; diff --git a/crates/bitwarden/src/mobile/kdf.rs b/crates/bitwarden/src/mobile/kdf.rs index e79e0ab12..a34b339bb 100644 --- a/crates/bitwarden/src/mobile/kdf.rs +++ b/crates/bitwarden/src/mobile/kdf.rs @@ -1,5 +1,6 @@ use crate::{ - client::auth_settings::{AuthSettings, Kdf}, + client::kdf::Kdf, + crypto::{HashPurpose, MasterKey}, error::Result, Client, }; @@ -10,10 +11,7 @@ pub async fn hash_password( password: String, kdf_params: Kdf, ) -> Result { - let auth_settings = AuthSettings { - email, - kdf: kdf_params, - }; - let hash = auth_settings.derive_user_password_hash(&password)?; - Ok(hash) + let master_key = MasterKey::derive(password.as_bytes(), email.as_bytes(), &kdf_params)?; + + master_key.derive_master_key_hash(password.as_bytes(), HashPurpose::ServerAuthorization) } diff --git a/crates/bitwarden/src/platform/get_user_api_key.rs b/crates/bitwarden/src/platform/get_user_api_key.rs index 629bfc8c4..a1cfc389d 100644 --- a/crates/bitwarden/src/platform/get_user_api_key.rs +++ b/crates/bitwarden/src/platform/get_user_api_key.rs @@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize}; use super::SecretVerificationRequest; use crate::{ - client::auth_settings::AuthSettings, + client::{LoginMethod, UserLoginMethod}, + crypto::{HashPurpose, MasterKey}, error::{Error, Result}, Client, }; @@ -20,7 +21,7 @@ pub(crate) async fn get_user_api_key( info!("Getting Api Key"); debug!("{:?}", input); - let auth_settings = get_auth_settings(client)?; + let auth_settings = get_login_method(client)?; let request = get_secret_verification_request(auth_settings, input)?; let config = client.get_api_configurations().await; @@ -29,33 +30,40 @@ pub(crate) async fn get_user_api_key( UserApiKeyResponse::process_response(response) } -fn get_auth_settings(client: &Client) -> Result<&AuthSettings> { +fn get_login_method(client: &Client) -> Result<&LoginMethod> { if client.is_authed() { - let auth_settings = client - .get_auth_settings() + client + .get_login_method() .as_ref() - .ok_or(Error::NotAuthenticated)?; - Ok(auth_settings) + .ok_or(Error::NotAuthenticated) } else { Err(Error::NotAuthenticated) } } fn get_secret_verification_request( - auth_settings: &AuthSettings, + login_method: &LoginMethod, input: &SecretVerificationRequest, ) -> Result { - let master_password_hash = input - .master_password - .as_ref() - .map(|p| auth_settings.derive_user_password_hash(p)) - .transpose()?; - Ok(SecretVerificationRequestModel { - master_password_hash, - otp: input.otp.as_ref().cloned(), - secret: None, - auth_request_access_code: None, - }) + if let LoginMethod::User(UserLoginMethod::Username { email, kdf, .. }) = login_method { + let master_password_hash = input + .master_password + .as_ref() + .map(|p| { + let master_key = MasterKey::derive(p.as_bytes(), email.as_bytes(), kdf)?; + + master_key.derive_master_key_hash(p.as_bytes(), HashPurpose::ServerAuthorization) + }) + .transpose()?; + Ok(SecretVerificationRequestModel { + master_password_hash, + otp: input.otp.as_ref().cloned(), + secret: None, + auth_request_access_code: None, + }) + } else { + Err(Error::Internal("Unsupported login method")) + } } #[derive(Serialize, Deserialize, Debug, JsonSchema)] diff --git a/crates/bitwarden/src/vault/cipher/cipher.rs b/crates/bitwarden/src/vault/cipher/cipher.rs index 49586028d..9bf4bbd25 100644 --- a/crates/bitwarden/src/vault/cipher/cipher.rs +++ b/crates/bitwarden/src/vault/cipher/cipher.rs @@ -59,9 +59,9 @@ pub struct Cipher { pub view_password: bool, pub local_data: Option, - pub attachments: Vec, - pub fields: Vec, - pub password_history: Vec, + pub attachments: Option>, + pub fields: Option>, + pub password_history: Option>, pub creation_date: DateTime, pub deleted_date: Option>, @@ -93,9 +93,9 @@ pub struct CipherView { pub view_password: bool, pub local_data: Option, - pub attachments: Vec, - pub fields: Vec, - pub password_history: Vec, + pub attachments: Option>, + pub fields: Option>, + pub password_history: Option>, pub creation_date: DateTime, pub deleted_date: Option>, @@ -202,7 +202,7 @@ impl Cipher { let Some(login) = &self.login else { return Ok(String::new()); }; - login.username.decrypt(enc, org_id).unwrap_or_default() + login.username.decrypt(enc, org_id)?.unwrap_or_default() } CipherType::SecureNote => String::new(), CipherType::Card => { @@ -273,7 +273,11 @@ impl Decryptable for Cipher { reprompt: self.reprompt, edit: self.edit, view_password: self.view_password, - attachments: self.attachments.len() as u32, + attachments: self + .attachments + .as_ref() + .map(|a| a.len() as u32) + .unwrap_or(0), creation_date: self.creation_date, deleted_date: self.deleted_date, revision_date: self.revision_date, diff --git a/crates/bitwarden/src/vault/cipher/field.rs b/crates/bitwarden/src/vault/cipher/field.rs index df492eac6..9fa05257a 100644 --- a/crates/bitwarden/src/vault/cipher/field.rs +++ b/crates/bitwarden/src/vault/cipher/field.rs @@ -24,8 +24,8 @@ pub enum FieldType { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct Field { - name: EncString, - value: EncString, + name: Option, + value: Option, r#type: FieldType, linked_id: Option, @@ -35,8 +35,8 @@ pub struct Field { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct FieldView { - name: String, - value: String, + name: Option, + value: Option, r#type: FieldType, linked_id: Option, diff --git a/crates/bitwarden/src/vault/cipher/login.rs b/crates/bitwarden/src/vault/cipher/login.rs index bbcb7b232..941aed221 100644 --- a/crates/bitwarden/src/vault/cipher/login.rs +++ b/crates/bitwarden/src/vault/cipher/login.rs @@ -27,7 +27,7 @@ pub enum UriMatchType { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct LoginUri { - pub uri: EncString, + pub uri: Option, pub r#match: Option, } @@ -35,7 +35,7 @@ pub struct LoginUri { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct LoginUriView { - pub uri: String, + pub uri: Option, pub r#match: Option, } @@ -43,11 +43,11 @@ pub struct LoginUriView { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct Login { - pub username: EncString, - pub password: EncString, + pub username: Option, + pub password: Option, pub password_revision_date: Option>, - pub uris: Vec, + pub uris: Option>, pub totp: Option, pub autofill_on_page_load: Option, } @@ -56,11 +56,11 @@ pub struct Login { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct LoginView { - pub username: String, - pub password: String, + pub username: Option, + pub password: Option, pub password_revision_date: Option>, - pub uris: Vec, + pub uris: Option>, pub totp: Option, pub autofill_on_page_load: Option, } diff --git a/crates/bitwarden/src/vault/send.rs b/crates/bitwarden/src/vault/send.rs index 7c9360e0f..124b9dc2f 100644 --- a/crates/bitwarden/src/vault/send.rs +++ b/crates/bitwarden/src/vault/send.rs @@ -36,7 +36,7 @@ pub struct SendFileView { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct SendText { - pub text: EncString, + pub text: Option, pub hidden: bool, } @@ -44,7 +44,7 @@ pub struct SendText { #[serde(rename_all = "camelCase", deny_unknown_fields)] #[cfg_attr(feature = "mobile", derive(uniffi::Record))] pub struct SendTextView { - pub text: String, + pub text: Option, pub hidden: bool, } @@ -280,16 +280,14 @@ impl Encryptable for SendView { #[cfg(test)] mod tests { use super::Send; - use crate::client::{ - auth_settings::{AuthSettings, Kdf}, - encryption_settings::EncryptionSettings, - }; + use crate::client::{encryption_settings::EncryptionSettings, kdf::Kdf, UserLoginMethod}; #[test] fn test_get_send_key() { // Initialize user encryption with some test data let enc = EncryptionSettings::new( - &AuthSettings { + &UserLoginMethod::Username { + client_id: "test".into(), email: "test@bitwarden.com".into(), kdf: Kdf::PBKDF2 { iterations: 345123.try_into().unwrap(), diff --git a/crates/bw/Cargo.toml b/crates/bw/Cargo.toml index bb1621184..29252d133 100644 --- a/crates/bw/Cargo.toml +++ b/crates/bw/Cargo.toml @@ -24,6 +24,7 @@ inquire = "0.6.2" bitwarden = { path = "../bitwarden", version = "0.3.0", features = [ "internal", + "mobile", ] } bitwarden-cli = { path = "../bitwarden-cli", version = "0.1.0" } diff --git a/crates/bw/src/auth/login.rs b/crates/bw/src/auth/login.rs index 6ba3c7929..1c169817f 100644 --- a/crates/bw/src/auth/login.rs +++ b/crates/bw/src/auth/login.rs @@ -15,11 +15,14 @@ pub(crate) async fn password_login(mut client: Client, email: Option) -> let password = Password::new("Password").without_confirmation().prompt()?; + let kdf = client.prelogin(email.clone()).await?; + let result = client .password_login(&PasswordLoginRequest { email: email.clone(), password: password.clone(), two_factor: None, + kdf: kdf.clone(), }) .await?; @@ -65,6 +68,7 @@ pub(crate) async fn password_login(mut client: Client, email: Option) -> email, password, two_factor, + kdf, }) .await?; diff --git a/languages/js_webassembly/package-lock.json b/languages/js_webassembly/package-lock.json index 81c910b90..da527fe32 100644 --- a/languages/js_webassembly/package-lock.json +++ b/languages/js_webassembly/package-lock.json @@ -7,7 +7,7 @@ "devDependencies": { "html-webpack-plugin": "5.5.3", "text-encoding": "0.7.0", - "ts-loader": "9.4.4", + "ts-loader": "9.5.0", "wasm-pack": "0.12.1", "webpack": "5.88.2", "webpack-cli": "5.1.4", @@ -3534,15 +3534,16 @@ } }, "node_modules/ts-loader": { - "version": "9.4.4", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz", - "integrity": "sha512-MLukxDHBl8OJ5Dk3y69IsKVFRA/6MwzEqBgh+OXMPB/OD01KQuWPFd1WAQP8a5PeSCAxfnkhiuWqfmFJzJQt9w==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.0.tgz", + "integrity": "sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg==", "dev": true, "dependencies": { "chalk": "^4.1.0", "enhanced-resolve": "^5.0.0", "micromatch": "^4.0.0", - "semver": "^7.3.4" + "semver": "^7.3.4", + "source-map": "^0.7.4" }, "engines": { "node": ">=12.0.0" @@ -3552,6 +3553,15 @@ "webpack": "^5.0.0" } }, + "node_modules/ts-loader/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", diff --git a/languages/js_webassembly/package.json b/languages/js_webassembly/package.json index 602cbc7a4..df67eb9b7 100644 --- a/languages/js_webassembly/package.json +++ b/languages/js_webassembly/package.json @@ -6,7 +6,7 @@ "devDependencies": { "html-webpack-plugin": "5.5.3", "text-encoding": "0.7.0", - "ts-loader": "9.4.4", + "ts-loader": "9.5.0", "wasm-pack": "0.12.1", "webpack": "5.88.2", "webpack-cli": "5.1.4", diff --git a/package-lock.json b/package-lock.json index 38af38025..22f0e6282 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "@openapitools/openapi-generator-cli": "2.7.0", "handlebars": "^4.7.8", "prettier": "3.0.3", - "quicktype-core": "23.0.75", - "rimraf": "5.0.1", + "quicktype-core": "23.0.76", + "rimraf": "5.0.5", "ts-node": "10.9.1", "typescript": "5.2.2" } @@ -1191,9 +1191,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz", - "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -1491,9 +1491,9 @@ } }, "node_modules/quicktype-core": { - "version": "23.0.75", - "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-23.0.75.tgz", - "integrity": "sha512-aVXb5MpCdWCyrWUqw906+dBU7C3wFWwSax1ySu/0wk4QNGnpg1DPJDDUdOXXMNKmLlAeA9+3Cs1kPHWNXxovBQ==", + "version": "23.0.76", + "resolved": "https://registry.npmjs.org/quicktype-core/-/quicktype-core-23.0.76.tgz", + "integrity": "sha512-QinZRNovSTQcFuhRKxeHb22eFmyucbG96EPaQDSbz9qvIPxUhs1BZviNc8HAkHWYFqTSET/xZcEoHpm1DeDbRg==", "dev": true, "dependencies": { "@glideapps/ts-necessities": "2.1.3", @@ -1602,15 +1602,15 @@ } }, "node_modules/rimraf": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", - "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", "dev": true, "dependencies": { - "glob": "^10.2.5" + "glob": "^10.3.7" }, "bin": { - "rimraf": "dist/cjs/src/bin.js" + "rimraf": "dist/esm/bin.mjs" }, "engines": { "node": ">=14" @@ -1629,13 +1629,13 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.7.tgz", - "integrity": "sha512-wCMbE1m9Nx5yD9LYtgsVWq5VhHlk5WzJirw594qZR6AIvQYuHrdDtIktUVjQItalD53y7dqoedu9xP0u0WaxIQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", + "jackspeak": "^2.3.5", "minimatch": "^9.0.1", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", "path-scurry": "^1.10.1" diff --git a/package.json b/package.json index 62ca39163..fdeb8fe58 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "@openapitools/openapi-generator-cli": "2.7.0", "handlebars": "^4.7.8", "prettier": "3.0.3", - "quicktype-core": "23.0.75", - "rimraf": "5.0.1", + "quicktype-core": "23.0.76", + "rimraf": "5.0.5", "ts-node": "10.9.1", "typescript": "5.2.2" }