Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(deps): Update dependencies to reject compromised CAs (#14930)

Anurag Thakur17f12d4743aa
diff --git a/Cargo.lock b/Cargo.lock
index 85a63c7078..ea08ddb627 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -55,7 +55,7 @@ dependencies = [
"flate2",
"foldhash",
"futures-core",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"httparse",
"httpdate",
@@ -192,11 +192,10 @@ dependencies = [
"pin-project-lite",
"rustls-pki-types",
"tokio 1.48.0",
- "tokio-rustls 0.23.4",
"tokio-rustls 0.26.2",
"tokio-util",
"tracing",
- "webpki-roots 0.22.6",
+ "webpki-roots 0.26.11",
]
[[package]]
@@ -747,9 +746,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "awc"
-version = "3.7.0"
+version = "3.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e76d68b4f02400c2f9110437f254873e8f265b35ea87352f142bc7c8e878115a"
+checksum = "3c170039c11c7f6c0a28f7b3bd4fb0c674cbfa317fabc1560022ad3ec2d69e7c"
dependencies = [
"actix-codec",
"actix-http",
@@ -764,7 +763,7 @@ dependencies = [
"derive_more 2.0.1",
"futures-core",
"futures-util",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"itoa",
"log 0.4.27",
@@ -772,7 +771,7 @@ dependencies = [
"percent-encoding 2.3.1",
"pin-project-lite",
"rand 0.9.2",
- "rustls 0.20.9",
+ "rustls 0.23.27",
"serde",
"serde_json",
"serde_urlencoded",
@@ -781,9 +780,9 @@ dependencies = [
[[package]]
name = "aws-config"
-version = "1.5.10"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b49afaa341e8dd8577e1a2200468f98956d6eda50bcf4a53246cc00174ba924"
+checksum = "6a84fe2c5e9965fba0fbc2001db252f1d57527d82a905cca85127df227bca748"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -791,8 +790,8 @@ dependencies = [
"aws-sdk-ssooidc",
"aws-sdk-sts",
"aws-smithy-async",
- "aws-smithy-http 0.60.12",
- "aws-smithy-json 0.60.7",
+ "aws-smithy-http 0.62.1",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -800,7 +799,7 @@ dependencies = [
"bytes 1.10.1",
"fastrand",
"hex",
- "http 0.2.12",
+ "http 1.3.1",
"ring 0.17.14",
"time 0.3.41",
"tokio 1.48.0",
@@ -823,9 +822,9 @@ dependencies = [
[[package]]
name = "aws-lc-rs"
-version = "1.14.1"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d"
+checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e"
dependencies = [
"aws-lc-sys",
"zeroize",
@@ -833,16 +832,15 @@ dependencies = [
[[package]]
name = "aws-lc-sys"
-version = "0.32.2"
+version = "0.44.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2b715a6010afb9e457ca2b7c9d2b9c344baa8baed7b38dc476034c171b32575"
+checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483"
dependencies = [
- "bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
- "libloading",
+ "pkg-config",
]
[[package]]
@@ -880,7 +878,7 @@ dependencies = [
"aws-runtime",
"aws-smithy-async",
"aws-smithy-http 0.60.12",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -903,7 +901,7 @@ dependencies = [
"aws-smithy-async",
"aws-smithy-eventstream",
"aws-smithy-http 0.60.12",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -928,7 +926,7 @@ dependencies = [
"aws-smithy-checksums",
"aws-smithy-eventstream",
"aws-smithy-http 0.62.1",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -960,7 +958,7 @@ dependencies = [
"aws-runtime",
"aws-smithy-async",
"aws-smithy-http 0.60.12",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -974,15 +972,15 @@ dependencies = [
[[package]]
name = "aws-sdk-sso"
-version = "1.50.0"
+version = "1.62.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05ca43a4ef210894f93096039ef1d6fa4ad3edfabb3be92b80908b9f2e4b4eab"
+checksum = "1d5330ad4e8a1ff49e9f26b738611caa72b105c41d41733801d1a36e8f9de936"
dependencies = [
"aws-credential-types",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-http 0.60.12",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-http 0.62.1",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -996,15 +994,15 @@ dependencies = [
[[package]]
name = "aws-sdk-ssooidc"
-version = "1.51.0"
+version = "1.63.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abaf490c2e48eed0bb8e2da2fb08405647bd7f253996e0f93b981958ea0f73b0"
+checksum = "7956b1a85d49082347a7d17daa2e32df191f3e23c03d47294b99f95413026a78"
dependencies = [
"aws-credential-types",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-http 0.60.12",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-http 0.62.1",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -1018,15 +1016,15 @@ dependencies = [
[[package]]
name = "aws-sdk-sts"
-version = "1.51.0"
+version = "1.63.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b68fde0d69c8bfdc1060ea7da21df3e39f6014da316783336deff0a9ec28f4bf"
+checksum = "065c533fbe6f84962af33fcf02b0350b7c1f79285baab5924615d2be3b232855"
dependencies = [
"aws-credential-types",
"aws-runtime",
"aws-smithy-async",
- "aws-smithy-http 0.60.12",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-http 0.62.1",
+ "aws-smithy-json",
"aws-smithy-query",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
@@ -1181,15 +1179,6 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "aws-smithy-json"
-version = "0.60.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6"
-dependencies = [
- "aws-smithy-types",
-]
-
[[package]]
name = "aws-smithy-json"
version = "0.61.3"
@@ -1470,6 +1459,12 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+[[package]]
+name = "base64"
+version = "0.23.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
+
[[package]]
name = "base64-serde"
version = "0.8.0"
@@ -1557,26 +1552,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bindgen"
-version = "0.72.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
-dependencies = [
- "bitflags 2.9.0",
- "cexpr",
- "clang-sys",
- "itertools 0.11.0",
- "log 0.4.27",
- "prettyplease",
- "proc-macro2",
- "quote",
- "regex",
- "rustc-hash 2.1.3",
- "shlex",
- "syn 2.0.101",
-]
-
[[package]]
name = "bit-set"
version = "0.5.3"
@@ -1929,15 +1904,6 @@ dependencies = [
"shlex",
]
-[[package]]
-name = "cexpr"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
-dependencies = [
- "nom 7.1.3",
-]
-
[[package]]
name = "cfb"
version = "0.7.3"
@@ -2047,17 +2013,6 @@ dependencies = [
"half",
]
-[[package]]
-name = "clang-sys"
-version = "1.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
-dependencies = [
- "glob",
- "libc",
- "libloading",
-]
-
[[package]]
name = "clap"
version = "3.2.25"
@@ -2256,7 +2211,7 @@ dependencies = [
"quick-xml",
"rand 0.8.5",
"regex",
- "reqwest 0.11.27",
+ "reqwest 0.13.5",
"ring 0.17.14",
"router_env",
"rsa",
@@ -3657,10 +3612,10 @@ dependencies = [
"error-stack 0.4.1",
"futures 0.3.31",
"hex",
- "http 0.2.12",
+ "http 1.3.1",
"http-body 1.0.1",
"http-body-util",
- "hyper 0.14.32",
+ "hyper 1.6.0",
"hyper-util",
"hyperswitch_interfaces",
"hyperswitch_masking",
@@ -3670,7 +3625,7 @@ dependencies = [
"prost-reflect",
"prost-types 0.14.3",
"quick-xml",
- "reqwest 0.11.27",
+ "reqwest 0.13.5",
"router_env",
"rust-grpc-client",
"serde",
@@ -4370,9 +4325,9 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.3.26"
+version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
+checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d"
dependencies = [
"bytes 1.10.1",
"fnv",
@@ -4705,7 +4660,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"http-body 0.4.6",
"httparse",
@@ -4804,7 +4759,7 @@ dependencies = [
"tokio 1.48.0",
"tokio-rustls 0.26.2",
"tower-service",
- "webpki-roots 1.0.0",
+ "webpki-roots 1.0.10",
]
[[package]]
@@ -4855,18 +4810,23 @@ version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf9f1e950e0d9d1d3c47184416723cf29c0d1f93bd8cccf37e4beb6b44f31710"
dependencies = [
+ "base64 0.22.1",
"bytes 1.10.1",
"futures-channel",
"futures-util",
"http 1.3.1",
"http-body 1.0.1",
"hyper 1.6.0",
+ "ipnet",
"libc",
+ "percent-encoding 2.3.1",
"pin-project-lite",
"socket2 0.5.10",
+ "system-configuration 0.6.1",
"tokio 1.48.0",
"tower-service",
"tracing",
+ "windows-registry 0.4.0",
]
[[package]]
@@ -4907,7 +4867,7 @@ dependencies = [
"quick-xml",
"rand 0.8.5",
"regex",
- "reqwest 0.11.27",
+ "reqwest 0.13.5",
"ring 0.17.14",
"router_env",
"roxmltree",
@@ -4994,7 +4954,7 @@ dependencies = [
"hyperswitch_masking",
"mime 0.3.17",
"prost 0.14.3",
- "reqwest 0.11.27",
+ "reqwest 0.13.5",
"router_env",
"rust-grpc-client",
"serde",
@@ -5295,7 +5255,7 @@ dependencies = [
"error-stack 0.4.1",
"hyperswitch_masking",
"nom 7.1.3",
- "reqwest 0.12.7",
+ "reqwest 0.13.5",
"router_env",
"serde",
"serde_json",
@@ -5462,6 +5422,55 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+[[package]]
+name = "jni"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"
+dependencies = [
+ "cfg-if 1.0.0",
+ "combine",
+ "jni-macros",
+ "jni-sys",
+ "log 0.4.27",
+ "simd_cesu8",
+ "thiserror 2.0.12",
+ "walkdir",
+ "windows-link 0.2.1",
+]
+
+[[package]]
+name = "jni-macros"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "rustc_version 0.4.1",
+ "simd_cesu8",
+ "syn 2.0.101",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
+dependencies = [
+ "jni-sys-macros",
+]
+
+[[package]]
+name = "jni-sys-macros"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
+dependencies = [
+ "quote",
+ "syn 2.0.101",
+]
+
[[package]]
name = "jobserver"
version = "0.1.33"
@@ -5492,11 +5501,12 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.77"
+version = "0.3.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
+checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
dependencies = [
- "once_cell",
+ "cfg-if 1.0.0",
+ "futures-util",
"wasm-bindgen",
]
@@ -5709,16 +5719,6 @@ dependencies = [
"pkg-config",
]
-[[package]]
-name = "libloading"
-version = "0.8.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
-dependencies = [
- "cfg-if 1.0.0",
- "windows-targets 0.53.5",
-]
-
[[package]]
name = "libm"
version = "0.2.11"
@@ -6271,17 +6271,17 @@ dependencies = [
[[package]]
name = "native-tls"
-version = "0.2.14"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
+checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
dependencies = [
"libc",
"log 0.4.27",
"openssl",
- "openssl-probe",
+ "openssl-probe 0.2.1",
"openssl-sys",
"schannel",
- "security-framework 2.11.1",
+ "security-framework 3.5.1",
"security-framework-sys",
"tempfile",
]
@@ -6566,7 +6566,6 @@ dependencies = [
"getrandom 0.2.16",
"http 0.2.12",
"rand 0.8.5",
- "reqwest 0.11.27",
"serde",
"serde_json",
"serde_path_to_error",
@@ -6707,15 +6706,14 @@ dependencies = [
[[package]]
name = "openssl"
-version = "0.10.72"
+version = "0.10.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da"
+checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
dependencies = [
"bitflags 2.9.0",
"cfg-if 1.0.0",
"foreign-types",
"libc",
- "once_cell",
"openssl-macros",
"openssl-sys",
]
@@ -6737,6 +6735,12 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
+[[package]]
+name = "openssl-probe"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
+
[[package]]
name = "openssl-src"
version = "300.5.4+3.5.4"
@@ -6748,9 +6752,9 @@ dependencies = [
[[package]]
name = "openssl-sys"
-version = "0.9.108"
+version = "0.9.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847"
+checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
dependencies = [
"cc",
"libc",
@@ -7848,6 +7852,7 @@ version = "0.11.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e"
dependencies = [
+ "aws-lc-rs",
"bytes 1.10.1",
"getrandom 0.3.3",
"lru-slab",
@@ -8318,28 +8323,24 @@ version = "0.11.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62"
dependencies = [
- "async-compression",
"base64 0.21.7",
"bytes 1.10.1",
"encoding_rs",
"futures-core",
"futures-util",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.32",
- "hyper-rustls 0.24.2",
"hyper-tls 0.5.0",
"ipnet",
"js-sys",
"log 0.4.27",
"mime 0.3.17",
- "mime_guess 2.0.5",
"native-tls",
"once_cell",
"percent-encoding 2.3.1",
"pin-project-lite",
- "rustls 0.21.12",
"rustls-pemfile 1.0.4",
"serde",
"serde_json",
@@ -8348,15 +8349,11 @@ dependencies = [
"system-configuration 0.5.1",
"tokio 1.48.0",
"tokio-native-tls",
- "tokio-rustls 0.24.1",
- "tokio-util",
"tower-service",
"url 2.5.4",
"wasm-bindgen",
"wasm-bindgen-futures",
- "wasm-streams",
"web-sys",
- "webpki-roots 0.25.4",
"winreg",
]
@@ -8406,10 +8403,58 @@ dependencies = [
"url 2.5.4",
"wasm-bindgen",
"wasm-bindgen-futures",
- "wasm-streams",
+ "wasm-streams 0.4.1",
"web-sys",
"webpki-roots 0.26.11",
- "windows-registry",
+ "windows-registry 0.2.0",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.13.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029"
+dependencies = [
+ "base64 0.23.1",
+ "bytes 1.10.1",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2 0.4.8",
+ "http 1.3.1",
+ "http-body 1.0.1",
+ "http-body-util",
+ "hyper 1.6.0",
+ "hyper-rustls 0.27.6",
+ "hyper-tls 0.6.0",
+ "hyper-util",
+ "js-sys",
+ "log 0.4.27",
+ "mime 0.3.17",
+ "mime_guess 2.0.5",
+ "native-tls",
+ "percent-encoding 2.3.1",
+ "pin-project-lite",
+ "quinn",
+ "rustls 0.23.27",
+ "rustls-pki-types",
+ "rustls-platform-verifier",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.2",
+ "tokio 1.48.0",
+ "tokio-native-tls",
+ "tokio-rustls 0.26.2",
+ "tokio-util",
+ "tower 0.5.2",
+ "tower-http",
+ "tower-service",
+ "url 2.5.4",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams 0.5.0",
+ "web-sys",
]
[[package]]
@@ -8591,7 +8636,7 @@ dependencies = [
"rdkafka",
"redis_interface",
"regex",
- "reqwest 0.11.27",
+ "reqwest 0.13.5",
"ring 0.17.14",
"router_derive",
"router_env",
@@ -8931,7 +8976,7 @@ dependencies = [
"once_cell",
"ring 0.17.14",
"rustls-pki-types",
- "rustls-webpki 0.103.3",
+ "rustls-webpki 0.103.16",
"subtle",
"zeroize",
]
@@ -8942,7 +8987,7 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [
- "openssl-probe",
+ "openssl-probe 0.1.6",
"rustls-pemfile 1.0.4",
"schannel",
"security-framework 2.11.1",
@@ -8954,7 +8999,7 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
dependencies = [
- "openssl-probe",
+ "openssl-probe 0.1.6",
"rustls-pemfile 2.1.3",
"rustls-pki-types",
"schannel",
@@ -8967,7 +9012,7 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3"
dependencies = [
- "openssl-probe",
+ "openssl-probe 0.1.6",
"rustls-pki-types",
"schannel",
"security-framework 3.5.1",
@@ -8994,13 +9039,41 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.11.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
+checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79"
dependencies = [
"web-time",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-platform-verifier"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98"
+dependencies = [
+ "core-foundation 0.10.1",
+ "core-foundation-sys",
+ "jni",
+ "log 0.4.27",
+ "once_cell",
+ "rustls 0.23.27",
+ "rustls-native-certs 0.8.1",
+ "rustls-platform-verifier-android",
+ "rustls-webpki 0.103.16",
+ "security-framework 3.5.1",
+ "security-framework-sys",
+ "webpki-root-certs",
+ "windows-sys 0.61.2",
]
+[[package]]
+name = "rustls-platform-verifier-android"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f"
+
[[package]]
name = "rustls-webpki"
version = "0.101.7"
@@ -9024,9 +9097,9 @@ dependencies = [
[[package]]
name = "rustls-webpki"
-version = "0.103.3"
+version = "0.103.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435"
+checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281"
dependencies = [
"aws-lc-rs",
"ring 0.17.14",
@@ -9092,11 +9165,11 @@ dependencies = [
[[package]]
name = "schannel"
-version = "0.1.27"
+version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
+checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5"
dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -9615,6 +9688,16 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+[[package]]
+name = "simd_cesu8"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520"
+dependencies = [
+ "rustc_version 0.4.1",
+ "simdutf8",
+]
+
[[package]]
name = "simdutf8"
version = "0.1.4"
@@ -10230,7 +10313,7 @@ checksum = "732c84601c078655a4ee6f7888ad4f6a1fef3e619027de03d94837c4df881094"
dependencies = [
"aws-smithy-async",
"aws-smithy-http 0.62.1",
- "aws-smithy-json 0.61.3",
+ "aws-smithy-json",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -11415,6 +11498,29 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "tower-http"
+version = "0.6.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"
+dependencies = [
+ "async-compression",
+ "bitflags 2.9.0",
+ "bytes 1.10.1",
+ "futures-core",
+ "futures-util",
+ "http 1.3.1",
+ "http-body 1.0.1",
+ "http-body-util",
+ "pin-project-lite",
+ "tokio 1.48.0",
+ "tokio-util",
+ "tower 0.5.2",
+ "tower-layer",
+ "tower-service",
+ "url 2.5.4",
+]
+
[[package]]
name = "tower-layer"
version = "0.3.3"
@@ -12299,47 +12405,33 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
[[package]]
name = "wasm-bindgen"
-version = "0.2.100"
+version = "0.2.129"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
+checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
dependencies = [
"cfg-if 1.0.0",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
-]
-
-[[package]]
-name = "wasm-bindgen-backend"
-version = "0.2.100"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
-dependencies = [
- "bumpalo",
- "log 0.4.27",
- "proc-macro2",
- "quote",
- "syn 2.0.101",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.43"
+version = "0.4.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed"
+checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e"
dependencies = [
- "cfg-if 1.0.0",
"js-sys",
+ "tokio 1.48.0",
"wasm-bindgen",
- "web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.100"
+version = "0.2.129"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
+checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -12347,22 +12439,22 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.100"
+version = "0.2.129"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
+checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
dependencies = [
+ "bumpalo",
"proc-macro2",
"quote",
- "syn 2.0.101",
- "wasm-bindgen-backend",
+ "syn 3.0.4",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.100"
+version = "0.2.129"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
+checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
dependencies = [
"unicode-ident",
]
@@ -12402,6 +12494,19 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "wasm-streams"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb"
+dependencies = [
+ "futures-util",
+ "js-sys",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
[[package]]
name = "wasmparser"
version = "0.244.0"
@@ -12416,9 +12521,9 @@ dependencies = [
[[package]]
name = "web-sys"
-version = "0.3.77"
+version = "0.3.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
+checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -12464,34 +12569,28 @@ dependencies = [
]
[[package]]
-name = "webpki-roots"
-version = "0.22.6"
+name = "webpki-root-certs"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
+checksum = "e49d0e65abc00c142e8f9428da991da9f1a250c39be97459901eb12b9b49f62a"
dependencies = [
- "webpki",
+ "rustls-pki-types",
]
-[[package]]
-name = "webpki-roots"
-version = "0.25.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"
-
[[package]]
name = "webpki-roots"
version = "0.26.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
dependencies = [
- "webpki-roots 1.0.0",
+ "webpki-roots 1.0.10",
]
[[package]]
name = "webpki-roots"
-version = "1.0.0"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb"
+checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9"
dependencies = [
"rustls-pki-types",
]
@@ -12577,6 +12676,12 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-link"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
+
[[package]]
name = "windows-link"
version = "0.2.1"
@@ -12589,11 +12694,22 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
dependencies = [
- "windows-result",
- "windows-strings",
+ "windows-result 0.2.0",
+ "windows-strings 0.1.0",
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-registry"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"
+dependencies = [
+ "windows-result 0.3.4",
+ "windows-strings 0.3.1",
+ "windows-targets 0.53.5",
+]
+
[[package]]
name = "windows-result"
version = "0.2.0"
@@ -12603,16 +12719,34 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-result"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
+dependencies = [
+ "windows-link 0.1.3",
+]
+
[[package]]
name = "windows-strings"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
dependencies = [
- "windows-result",
+ "windows-result 0.2.0",
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-strings"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
+dependencies = [
+ "windows-link 0.1.3",
+]
+
[[package]]
name = "windows-sys"
version = "0.48.0"
@@ -12655,7 +12789,7 @@ version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
- "windows-link",
+ "windows-link 0.2.1",
]
[[package]]
@@ -12695,7 +12829,7 @@ version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [
- "windows-link",
+ "windows-link 0.2.1",
"windows_aarch64_gnullvm 0.53.1",
"windows_aarch64_msvc 0.53.1",
"windows_i686_gnu 0.53.1",
diff --git a/crates/analytics/Cargo.toml b/crates/analytics/Cargo.toml
index 41b8ee0646..10e54059ce 100644
--- a/crates/analytics/Cargo.toml
+++ b/crates/analytics/Cargo.toml
@@ -27,7 +27,7 @@ currency_conversion = { version = "0.1.0", path = "../currency_conversion" }
#Third Party dependencies
actix-web = "4.11.0"
async-trait = "0.1.92"
-aws-config = { version = "1.5.10", features = ["behavior-version-latest"] }
+aws-config = { version = "1.6.0", features = ["behavior-version-latest"] }
aws-sdk-lambda = { version = "1.60.0" }
aws-smithy-types = { version = "1.3.1" }
bigdecimal = { version = "0.4.8", features = ["serde"] }
diff --git a/crates/cloud_services/Cargo.toml b/crates/cloud_services/Cargo.toml
index cf1f10fb39..a9c4ba4884 100644
--- a/crates/cloud_services/Cargo.toml
+++ b/crates/cloud_services/Cargo.toml
@@ -28,7 +28,7 @@ smtp = ["dep:lettre", "dep:tokio", "dep:tokio-socks", "dep:tracing"]
oci_kms = ["dep:oci_kms"]
[dependencies]
-aws-config = { version = "1.5.10", optional = true, features = [
+aws-config = { version = "1.6.0", optional = true, features = [
"behavior-version-latest",
] }
aws-sdk-kms = { version = "1.51.0", optional = true }
diff --git a/crates/common_utils/Cargo.toml b/crates/common_utils/Cargo.toml
index cd07268d4a..ce83837f40 100644
--- a/crates/common_utils/Cargo.toml
+++ b/crates/common_utils/Cargo.toml
@@ -11,7 +11,7 @@ license.workspace = true
default = []
diesel = ["dep:diesel", "hyperswitch_masking/diesel"]
keymanager = ["dep:router_env"]
-keymanager_mtls = ["reqwest/rustls-tls"]
+keymanager_mtls = ["reqwest/rustls"]
encryption_service = ["dep:router_env"]
km_forward_x_request_id = ["dep:router_env", "router_env/actix_web"]
ext_services_latency = ["dep:router_env"]
@@ -50,7 +50,7 @@ phonenumber = "0.3.7"
quick-xml = { version = "0.31.0", features = ["serialize"] }
rand = "0.8.5"
regex = "1.11.1"
-reqwest = { version = "0.11.27", features = ["json", "native-tls", "gzip", "multipart"] }
+reqwest = { version = "0.13.5", features = ["json", "native-tls-no-alpn", "gzip", "multipart"] }
ring = { version = "0.17.14", features = ["std", "wasm32_unknown_unknown_js"] }
rsa = {version = "0.9.8", features = ["sha2"]}
rust_decimal = "1.37"
diff --git a/crates/common_utils/src/keymanager.rs b/crates/common_utils/src/keymanager.rs
index ca0df6db13..4528879533 100644
--- a/crates/common_utils/src/keymanager.rs
+++ b/crates/common_utils/src/keymanager.rs
@@ -5,9 +5,13 @@ use std::str::FromStr;
use base64::Engine;
use error_stack::ResultExt;
-use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode};
+use http::Method;
use hyperswitch_masking::{PeekInterface, StrongSecret};
use once_cell::sync::OnceCell;
+use reqwest::{
+ header::{HeaderMap, HeaderName, HeaderValue},
+ StatusCode,
+};
use router_env::{
global_meter, histogram_metric_f64, instrument, logger, metric_attributes, tracing,
};
@@ -106,6 +110,8 @@ where
.change_context(errors::KeyManagerClientError::UrlEncodingFailed)?;
let method_str = method.to_string();
+ let method = reqwest::Method::from_bytes(method_str.as_bytes())
+ .change_context(errors::KeyManagerClientError::ClientConstructionFailed)?;
let start_time = std::time::Instant::now();
let response_result = client
diff --git a/crates/common_utils/src/transformers.rs b/crates/common_utils/src/transformers.rs
index 3799522e16..a6602c7e5f 100644
--- a/crates/common_utils/src/transformers.rs
+++ b/crates/common_utils/src/transformers.rs
@@ -1,5 +1,8 @@
//! Utilities for converting between foreign types
+use common_enums::ApiClientError;
+use error_stack::ResultExt;
+
/// Trait for converting from one foreign type to another
pub trait ForeignFrom<F> {
/// Convert from a foreign type to the current type
@@ -13,3 +16,23 @@ pub trait ForeignTryFrom<F>: Sized {
/// Convert from a foreign type to the current type and return an error if the conversion fails
fn foreign_try_from(from: F) -> Result<Self, Self::Error>;
}
+
+// Reqwest uses http crate 1.x, while the server and connector response models use http 0.2.
+// TODO: Remove this once actix supports http crte 1.x
+impl ForeignTryFrom<&reqwest::header::HeaderMap> for http::HeaderMap {
+ type Error = error_stack::Report<ApiClientError>;
+
+ fn foreign_try_from(headers: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
+ headers
+ .iter()
+ .map(|(name, value)| {
+ let name = http::header::HeaderName::try_from(name.as_str())
+ .change_context(ApiClientError::HeaderMapConstructionFailed)?;
+ let mut header_value = http::HeaderValue::try_from(value.as_bytes())
+ .change_context(ApiClientError::HeaderMapConstructionFailed)?;
+ header_value.set_sensitive(value.is_sensitive());
+ Ok((name, header_value))
+ })
+ .collect()
+ }
+}
diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.toml
index 69319fe686..bb081027b5 100644
--- a/crates/external_services/Cargo.toml
+++ b/crates/external_services/Cargo.toml
@@ -62,7 +62,7 @@ dyn-clone = "1.0.19"
deja = { git = "https://github.com/juspay/deja", rev = "6ace82f8d37c7c5703f9636a608dd8d85a8f6953", optional = true, default-features = false }
error-stack = "0.4.1"
hex = "0.4.3"
-hyper = "0.14.32"
+hyper = "1.6.0"
once_cell = "1.21.3"
serde = { version = "1.0.219", features = ["derive"] }
thiserror = "1.0.69"
@@ -82,8 +82,8 @@ typed-builder = "0.21.2"
hyper-util = { version = "0.1.12", optional = true }
http-body-util = { version = "0.1.3", optional = true }
http-body = { version = "1.0.1", optional = true }
-reqwest = { version = "0.11.27", features = ["rustls-tls"] }
-http = "0.2.12"
+reqwest = { version = "0.13.5", features = ["rustls", "native-tls-no-alpn", "form", "query"] }
+http = "1.3.1"
url = { version = "2.5.4", features = ["serde"] }
quick-xml = { version = "0.31.0", features = ["serialize"] }
diff --git a/crates/external_services/src/grpc_client/unified_connector_service.rs b/crates/external_services/src/grpc_client/unified_connector_service.rs
index 3e23f7e513..88c22c5ed6 100644
--- a/crates/external_services/src/grpc_client/unified_connector_service.rs
+++ b/crates/external_services/src/grpc_client/unified_connector_service.rs
@@ -337,7 +337,7 @@ impl UnifiedConnectorServiceClient {
};
let uri: Uri = ucs_config.base_url.get_string_repr().parse().map_err(
- |err: tonic::codegen::http::uri::InvalidUri| {
+ |err: http::uri::InvalidUri| {
logger::error!(error = ?err, "Failed to parse URI for Unified Connector Service");
UcsClientBuildError::InvalidUri(err.to_string())
},
diff --git a/crates/hyperswitch_connectors/Cargo.toml b/crates/hyperswitch_connectors/Cargo.toml
index 927f31d798..0995430137 100644
--- a/crates/hyperswitch_connectors/Cargo.toml
+++ b/crates/hyperswitch_connectors/Cargo.toml
@@ -44,7 +44,7 @@ qrcode = "0.14.1"
quick-xml = { version = "0.31.0", features = ["serialize"] }
rand = "0.8.5"
regex = "1.11.1"
-reqwest = { version = "0.11.27" }
+reqwest = { version = "0.13.5" }
ring = "0.17.14"
roxmltree = "0.19.0"
serde = { version = "1.0.219", features = ["derive"] }
diff --git a/crates/hyperswitch_interfaces/Cargo.toml b/crates/hyperswitch_interfaces/Cargo.toml
index 2e4d4cae72..d67ad9c100 100644
--- a/crates/hyperswitch_interfaces/Cargo.toml
+++ b/crates/hyperswitch_interfaces/Cargo.toml
@@ -26,7 +26,7 @@ futures = "0.3.31"
http = "0.2.12"
mime = "0.3.17"
prost = "0.14"
-reqwest = "0.11.27"
+reqwest = "0.13.5"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
strum = { version = "0.26", features = ["derive"] }
diff --git a/crates/hyperswitch_interfaces/src/api_client.rs b/crates/hyperswitch_interfaces/src/api_client.rs
index 6f64916bf5..8ec272777d 100644
--- a/crates/hyperswitch_interfaces/src/api_client.rs
+++ b/crates/hyperswitch_interfaces/src/api_client.rs
@@ -12,6 +12,7 @@ use common_utils::{
},
errors::CustomResult,
request::{Headers, Request, RequestContent},
+ transformers::ForeignTryFrom,
};
use error_stack::{report, ResultExt};
use futures::FutureExt;
@@ -571,7 +572,7 @@ pub async fn handle_response(
.map(|response| async {
logger::info!(?response);
let status_code = response.status().as_u16();
- let headers = Some(response.headers().to_owned());
+ let headers = Some(http::HeaderMap::foreign_try_from(response.headers())?);
match status_code {
200..=202 | 302 | 204 => {
// If needed add log line
diff --git a/crates/injector/Cargo.toml b/crates/injector/Cargo.toml
index 8b6b15850f..e5ca71d4a2 100644
--- a/crates/injector/Cargo.toml
+++ b/crates/injector/Cargo.toml
@@ -21,7 +21,7 @@ async-trait = { version = "0.1.92" }
base64 = { version = "0.22.1" }
error-stack = { version = "0.4.1" }
nom = { version = "7.1.3" }
-reqwest = { version = "0.12.0", features = ["json", "stream", "rustls-tls"] }
+reqwest = { version = "0.13.5", features = ["json", "stream", "rustls", "form", "native-tls-no-alpn"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = { version = "1.0.140" }
thiserror = { version = "1.0.69" }
diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml
index f0ad967097..2acbafb77d 100644
--- a/crates/router/Cargo.toml
+++ b/crates/router/Cargo.toml
@@ -37,7 +37,7 @@ tls = ["actix-web/rustls-0_23"]
email = ["external_services/email", "scheduler/email", "olap"]
# keymanager_create, keymanager_mtls, encryption_service should not be removed or added to default feature. Once this features were enabled it can't be disabled as these are breaking changes.
keymanager_create = []
-keymanager_mtls = ["reqwest/rustls-tls", "common_utils/keymanager_mtls"]
+keymanager_mtls = ["reqwest/rustls", "common_utils/keymanager_mtls"]
encryption_service = [
"keymanager_create",
"hyperswitch_domain_models/encryption_service",
@@ -235,15 +235,17 @@ nanoid = "0.4.0"
num_cpus = "1.16.0"
num-traits = "0.2.19"
once_cell = "1.21.3"
-openidconnect = "3.5.0" # TODO: remove reqwest
+# HTTP requests use the shared outbound client, not OpenID Connect's bundled client.
+openidconnect = { version = "3.5.0", default-features = false }
openssl = "0.10.72"
rand = "0.8.5"
rand_chacha = "0.3.1"
rdkafka = "0.36.2"
regex = "1.11.1"
-reqwest = { version = "0.11.27", features = [
+reqwest = { version = "0.13.5", features = [
"json",
- "rustls-tls",
+ "form",
+ "rustls",
"gzip",
"multipart",
] }
@@ -349,7 +351,7 @@ router_env = { version = "0.1.0", path = "../router_env", default-features = fal
[dev-dependencies]
actix-http = "3.11.0"
-awc = { version = "3.7.0", features = ["rustls"] }
+awc = { version = "3.8.1", features = ["rustls-0_23-webpki-roots"] }
derive_deref = "1.1.1"
rand = "0.8.5"
serial_test = "3.2.0"
diff --git a/crates/router/src/compatibility/stripe/errors.rs b/crates/router/src/compatibility/stripe/errors.rs
index 63ebda9d5c..31ed278c00 100644
--- a/crates/router/src/compatibility/stripe/errors.rs
+++ b/crates/router/src/compatibility/stripe/errors.rs
@@ -1,3 +1,4 @@
+use actix_web::http;
use common_utils::{errors::ErrorSwitch, id_type};
use hyperswitch_domain_models::errors::api_error_response as errors;
@@ -735,8 +736,8 @@ impl From<errors::ApiErrorResponse> for StripeErrorCode {
}
impl actix_web::ResponseError for StripeErrorCode {
- fn status_code(&self) -> reqwest::StatusCode {
- use reqwest::StatusCode;
+ fn status_code(&self) -> http::StatusCode {
+ use http::StatusCode;
match self {
Self::Unauthorized
diff --git a/crates/router/src/core/hierarchical_resources.rs b/crates/router/src/core/hierarchical_resources.rs
index 17060d90e5..e9dbe764ed 100644
--- a/crates/router/src/core/hierarchical_resources.rs
+++ b/crates/router/src/core/hierarchical_resources.rs
@@ -716,8 +716,7 @@ fn parse_apple_merchant_identifier(
.next()
.ok_or_else(openssl::error::ErrorStack::get)?
.data()
- .as_utf8()?
- .to_string();
+ .to_string()?;
Ok(common_name
.rsplit(':')
diff --git a/crates/router/src/services/api/client.rs b/crates/router/src/services/api/client.rs
index 872c488a30..704b4c256e 100644
--- a/crates/router/src/services/api/client.rs
+++ b/crates/router/src/services/api/client.rs
@@ -3,13 +3,13 @@ use std::time::Duration;
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
pub use external_services::http_client::{self, client};
-use http::{HeaderValue, Method};
+use http::Method;
pub use hyperswitch_interfaces::{
api_client::{ApiClient, ApiClientWrapper, RequestBuilder},
types::Proxy,
};
use hyperswitch_masking::PeekInterface;
-use reqwest::multipart::Form;
+use reqwest::{header::HeaderValue, multipart::Form};
use router_env::RequestId;
use super::{request::Maskable, Request};
@@ -130,6 +130,8 @@ impl ApiClient for ProxyClient {
let client_builder = self
.get_reqwest_client(certificate, certificate_key)
.change_context(ApiClientError::ClientConstructionFailed)?;
+ let method = reqwest::Method::from_bytes(method.as_str().as_bytes())
+ .change_context(ApiClientError::ClientConstructionFailed)?;
Ok(Box::new(RouterRequestBuilder {
inner: Some(client_builder.request(method, url)),
}))
diff --git a/crates/router/src/services/openidconnect.rs b/crates/router/src/services/openidconnect.rs
index de8ebabbad..fbf6ea839a 100644
--- a/crates/router/src/services/openidconnect.rs
+++ b/crates/router/src/services/openidconnect.rs
@@ -1,10 +1,15 @@
-use common_utils::errors::ErrorSwitch;
+use common_utils::{
+ errors::{CustomResult, ReportSwitchExt},
+ transformers::ForeignTryFrom,
+};
use error_stack::ResultExt;
use external_services::http_client::client;
+use futures::TryFutureExt;
use hyperswitch_masking::{ExposeInterface, Secret};
use oidc::TokenResponse;
use openidconnect::{self as oidc, core as oidc_core};
use redis_interface::RedisConnectionWithContext;
+use router_env::logger;
use storage_impl::errors::ApiClientError;
use crate::{
@@ -74,15 +79,23 @@ pub async fn get_user_email_from_oidc_provider(
// Send request to OpenId provider with authorization code
let token_response = client
.exchange_code(oidc::AuthorizationCode::new(authorization_code.expose()))
- .request_async(|req| get_oidc_reqwest_client(state, req))
+ .request_async(|req| {
+ get_oidc_reqwest_client(state, req)
+ .inspect_err(|error| logger::error!(?error, "OpenID Connect HTTP request failed"))
+ // Wrap the report to satisfy OIDC's std::error::Error bound.
+ .map_err(error_stack::Report::into_error)
+ })
.await
- .map_err(|e| match e {
- oidc::RequestTokenError::ServerResponse(resp)
- if resp.error() == &oidc_core::CoreErrorResponseType::InvalidGrant =>
- {
- UserErrors::SSOFailed
- }
- _ => UserErrors::InternalServerError,
+ .map_err(|error| {
+ let context = match &error {
+ oidc::RequestTokenError::ServerResponse(resp)
+ if resp.error() == &oidc_core::CoreErrorResponseType::InvalidGrant =>
+ {
+ UserErrors::SSOFailed
+ }
+ _ => UserErrors::InternalServerError,
+ };
+ error_stack::Report::new(error).change_context(context)
})
.attach_printable("Failed to exchange code and fetch oidc token")?;
@@ -119,6 +132,9 @@ async fn get_discovery_document(
oidc::IssuerUrl::new(base_url.expose()).change_context(UserErrors::InternalServerError)?;
oidc_core::CoreProviderMetadata::discover_async(issuer_url, |req| {
get_oidc_reqwest_client(state, req)
+ .inspect_err(|error| logger::error!(?error, "OpenID Connect HTTP request failed"))
+ // Wrap the report to satisfy OIDC's std::error::Error bound.
+ .map_err(error_stack::Report::into_error)
})
.await
.change_context(UserErrors::InternalServerError)
@@ -162,32 +178,32 @@ async fn get_nonce_from_redis(
async fn get_oidc_reqwest_client(
state: &SessionState,
request: oidc::HttpRequest,
-) -> Result<oidc::HttpResponse, ApiClientError> {
- let client = client::create_client(&state.conf.proxy, None, None, None)
- .map_err(|e| e.current_context().switch())?;
+) -> CustomResult<oidc::HttpResponse, ApiClientError> {
+ let client = client::create_client(&state.conf.proxy, None, None, None).switch()?;
- let mut request_builder = client
- .request(request.method, request.url)
- .body(request.body);
+ let method = reqwest::Method::try_from(request.method.as_str())
+ .change_context(ApiClientError::ClientConstructionFailed)?;
+ let mut request_builder = client.request(method, request.url).body(request.body);
for (name, value) in &request.headers {
request_builder = request_builder.header(name.as_str(), value.as_bytes());
}
let request = request_builder
.build()
- .map_err(|_| ApiClientError::ClientConstructionFailed)?;
+ .change_context(ApiClientError::ClientConstructionFailed)?;
let response = client
.execute(request)
.await
- .map_err(|_| ApiClientError::RequestNotSent("OpenIDConnect".to_string()))?;
+ .change_context(ApiClientError::RequestNotSent("OpenIDConnect".to_string()))?;
Ok(oidc::HttpResponse {
- status_code: response.status(),
- headers: response.headers().to_owned(),
+ status_code: http::StatusCode::from_u16(response.status().as_u16())
+ .change_context(ApiClientError::ResponseDecodingFailed)?,
+ headers: http::HeaderMap::foreign_try_from(response.headers())?,
body: response
.bytes()
.await
- .map_err(|_| ApiClientError::ResponseDecodingFailed)?
+ .change_context(ApiClientError::ResponseDecodingFailed)?
.to_vec(),
})
}
diff --git a/crates/router/tests/utils.rs b/crates/router/tests/utils.rs
index 01f4f55e08..c91cdee5fc 100644
--- a/crates/router/tests/utils.rs
+++ b/crates/router/tests/utils.rs
@@ -20,6 +20,11 @@ use tokio::sync::{oneshot, OnceCell};
static SERVER: OnceCell<bool> = OnceCell::const_new();
async fn spawn_server() -> bool {
+ // Tests call start_server directly, bypassing the router binary's crypto-provider setup.
+ // Both Ring and AWS-LC are enabled, so Rustls cannot choose a provider automatically when
+ // awc builds its default TLS client. Register AWS-LC as main does to prevent a panic;
+ // an error here means another caller has already installed a default provider.
+ let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
let conf = Settings::new().expect("invalid settings");
let server = Box::pin(router::start_server(conf, env!("CARGO_PKG_NAME")))
.await