Dependency upgrades: http, hyper, aws-sdk, smaller deps #703
11 changed files with 1077 additions and 533 deletions
484
Cargo.lock
generated
484
Cargo.lock
generated
|
@ -191,99 +191,108 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
|||
|
||||
[[package]]
|
||||
name = "aws-config"
|
||||
version = "0.55.3"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bcdcf0d683fe9c23d32cf5b53c9918ea0a500375a9fb20109802552658e576c9"
|
||||
checksum = "8b30c39ebe61f75d1b3785362b1586b41991873c9ab3e317a9181c246fb71d82"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-http",
|
||||
"aws-runtime",
|
||||
"aws-sdk-sso",
|
||||
"aws-sdk-ssooidc",
|
||||
"aws-sdk-sts",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-client",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-http-tower",
|
||||
"aws-smithy-json",
|
||||
"aws-smithy-runtime",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-types",
|
||||
"bytes",
|
||||
"fastrand 1.9.0",
|
||||
"fastrand",
|
||||
"hex",
|
||||
"http 0.2.11",
|
||||
"hyper",
|
||||
"ring 0.16.20",
|
||||
"ring 0.17.7",
|
||||
"time",
|
||||
"tokio",
|
||||
"tower",
|
||||
"tracing",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-credential-types"
|
||||
version = "0.55.3"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fcdb2f7acbc076ff5ad05e7864bdb191ca70a6fd07668dc3a1a8bcd051de5ae"
|
||||
checksum = "33cc49dcdd31c8b6e79850a179af4c367669150c7ac0135f176c61bec81a70f7"
|
||||
dependencies = [
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"fastrand 1.9.0",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-endpoint"
|
||||
version = "0.55.3"
|
||||
name = "aws-runtime"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8cce1c41a6cfaa726adee9ebb9a56fcd2bbfd8be49fd8a04c5e20fd968330b04"
|
||||
checksum = "eb031bff99877c26c28895766f7bb8484a05e24547e370768d6cc9db514662aa"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-sigv4",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-eventstream",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-types",
|
||||
"bytes",
|
||||
"fastrand",
|
||||
"http 0.2.11",
|
||||
"regex",
|
||||
"http-body",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"tracing",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-http"
|
||||
version = "0.55.3"
|
||||
name = "aws-sdk-config"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aadbc44e7a8f3e71c8b374e03ecd972869eb91dd2bc89ed018954a52ba84bc44"
|
||||
checksum = "4af4f5b0f64563ada272e009cc95027effb546110ed85d014611420ac0d97858"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-runtime",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-json",
|
||||
"aws-smithy-runtime",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-types",
|
||||
"bytes",
|
||||
"http 0.2.11",
|
||||
"http-body",
|
||||
"lazy_static",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"once_cell",
|
||||
"regex-lite",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-sdk-s3"
|
||||
version = "0.28.0"
|
||||
version = "1.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fba197193cbb4bcb6aad8d99796b2291f36fa89562ded5d4501363055b0de89f"
|
||||
checksum = "951f7730f51a2155c711c85c79f337fbc02a577fa99d2a0a8059acfce5392113"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-endpoint",
|
||||
"aws-http",
|
||||
"aws-sig-auth",
|
||||
"aws-runtime",
|
||||
"aws-sigv4",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-checksums",
|
||||
"aws-smithy-client",
|
||||
"aws-smithy-eventstream",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-http-tower",
|
||||
"aws-smithy-json",
|
||||
"aws-smithy-runtime",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-smithy-xml",
|
||||
"aws-types",
|
||||
|
@ -292,117 +301,123 @@ dependencies = [
|
|||
"http-body",
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"regex",
|
||||
"tokio-stream",
|
||||
"tower",
|
||||
"regex-lite",
|
||||
"tracing",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-sdk-sso"
|
||||
version = "0.28.0"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8b812340d86d4a766b2ca73f740dfd47a97c2dff0c06c8517a16d88241957e4"
|
||||
checksum = "f486420a66caad72635bc2ce0ff6581646e0d32df02aa39dc983bfe794955a5b"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-endpoint",
|
||||
"aws-http",
|
||||
"aws-sig-auth",
|
||||
"aws-runtime",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-client",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-http-tower",
|
||||
"aws-smithy-json",
|
||||
"aws-smithy-runtime",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-types",
|
||||
"bytes",
|
||||
"http 0.2.11",
|
||||
"regex",
|
||||
"tokio-stream",
|
||||
"tower",
|
||||
"once_cell",
|
||||
"regex-lite",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-sdk-ssooidc"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39ddccf01d82fce9b4a15c8ae8608211ee7db8ed13a70b514bbfe41df3d24841"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-runtime",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-json",
|
||||
"aws-smithy-runtime",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-types",
|
||||
"bytes",
|
||||
"http 0.2.11",
|
||||
"once_cell",
|
||||
"regex-lite",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-sdk-sts"
|
||||
version = "0.28.0"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "265fac131fbfc188e5c3d96652ea90ecc676a934e3174eaaee523c6cec040b3b"
|
||||
checksum = "1a591f8c7e6a621a501b2b5d2e88e1697fcb6274264523a6ad4d5959889a41ce"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-endpoint",
|
||||
"aws-http",
|
||||
"aws-sig-auth",
|
||||
"aws-runtime",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-client",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-http-tower",
|
||||
"aws-smithy-json",
|
||||
"aws-smithy-query",
|
||||
"aws-smithy-runtime",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"aws-smithy-xml",
|
||||
"aws-types",
|
||||
"bytes",
|
||||
"http 0.2.11",
|
||||
"regex",
|
||||
"tower",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-sig-auth"
|
||||
version = "0.55.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b94acb10af0c879ecd5c7bdf51cda6679a0a4f4643ce630905a77673bfa3c61"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-sigv4",
|
||||
"aws-smithy-eventstream",
|
||||
"aws-smithy-http",
|
||||
"aws-types",
|
||||
"http 0.2.11",
|
||||
"once_cell",
|
||||
"regex-lite",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-sigv4"
|
||||
version = "0.55.3"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d2ce6f507be68e968a33485ced670111d1cbad161ddbbab1e313c03d37d8f4c"
|
||||
checksum = "c371c6b0ac54d4605eb6f016624fb5c7c2925d315fdf600ac1bf21b19d5f1742"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-smithy-eventstream",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
"crypto-bigint 0.5.5",
|
||||
"form_urlencoded",
|
||||
"hex",
|
||||
"hmac",
|
||||
"http 0.2.11",
|
||||
"http 1.0.0",
|
||||
"once_cell",
|
||||
"p256",
|
||||
"percent-encoding",
|
||||
"regex",
|
||||
"ring 0.17.7",
|
||||
"sha2",
|
||||
"subtle",
|
||||
"time",
|
||||
"tracing",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-async"
|
||||
version = "0.55.3"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13bda3996044c202d75b91afeb11a9afae9db9a721c6a7a427410018e286b880"
|
||||
checksum = "72ee2d09cce0ef3ae526679b522835d63e75fb427aca5413cd371e490d52dcc6"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-checksums"
|
||||
version = "0.55.3"
|
||||
version = "0.60.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07ed8b96d95402f3f6b8b57eb4e0e45ee365f78b1a924faf20ff6e97abf1eae6"
|
||||
checksum = "be2acd1b9c6ae5859999250ed5a62423aedc5cf69045b844432de15fa2f31f2b"
|
||||
dependencies = [
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-types",
|
||||
|
@ -419,35 +434,11 @@ dependencies = [
|
|||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-client"
|
||||
version = "0.55.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a86aa6e21e86c4252ad6a0e3e74da9617295d8d6e374d552be7d3059c41cedd"
|
||||
dependencies = [
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-http-tower",
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
"fastrand 1.9.0",
|
||||
"http 0.2.11",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"hyper-rustls 0.23.2",
|
||||
"lazy_static",
|
||||
"pin-project-lite",
|
||||
"rustls 0.20.9",
|
||||
"tokio",
|
||||
"tower",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-eventstream"
|
||||
version = "0.55.3"
|
||||
version = "0.60.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "460c8da5110835e3d9a717c61f5556b20d03c32a1dec57f8fc559b360f733bb8"
|
||||
checksum = "e6363078f927f612b970edf9d1903ef5cef9a64d1e8423525ebb1f0a1633c858"
|
||||
dependencies = [
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
|
@ -456,94 +447,126 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "aws-smithy-http"
|
||||
version = "0.55.3"
|
||||
version = "0.60.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b3b693869133551f135e1f2c77cb0b8277d9e3e17feaf2213f735857c4f0d28"
|
||||
checksum = "dab56aea3cd9e1101a0a999447fb346afb680ab1406cebc44b32346e25b4117d"
|
||||
dependencies = [
|
||||
"aws-smithy-eventstream",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
"bytes-utils",
|
||||
"futures-core",
|
||||
"http 0.2.11",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"tokio",
|
||||
"tokio-util 0.7.10",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-http-tower"
|
||||
version = "0.55.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ae4f6c5798a247fac98a867698197d9ac22643596dc3777f0c76b91917616b9"
|
||||
dependencies = [
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
"http 0.2.11",
|
||||
"http-body",
|
||||
"pin-project-lite",
|
||||
"tower",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-json"
|
||||
version = "0.55.3"
|
||||
version = "0.60.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23f9f42fbfa96d095194a632fbac19f60077748eba536eb0b9fecc28659807f8"
|
||||
checksum = "fd3898ca6518f9215f62678870064398f00031912390efd03f1f6ef56d83aa8e"
|
||||
dependencies = [
|
||||
"aws-smithy-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-query"
|
||||
version = "0.55.3"
|
||||
version = "0.60.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98819eb0b04020a1c791903533b638534ae6c12e2aceda3e6e6fba015608d51d"
|
||||
checksum = "bda4b1dfc9810e35fba8a620e900522cd1bd4f9578c446e82f49d1ce41d2e9f9"
|
||||
dependencies = [
|
||||
"aws-smithy-types",
|
||||
"urlencoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-types"
|
||||
version = "0.55.3"
|
||||
name = "aws-smithy-runtime"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16a3d0bf4f324f4ef9793b86a1701d9700fbcdbd12a846da45eed104c634c6e8"
|
||||
checksum = "fafdab38f40ad7816e7da5dec279400dd505160780083759f01441af1bbb10ea"
|
||||
dependencies = [
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
"fastrand",
|
||||
"h2",
|
||||
"http 0.2.11",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"hyper-rustls 0.24.2",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"rustls 0.21.10",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-runtime-api"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c18276dd28852f34b3bf501f4f3719781f4999a51c7bff1a5c6dc8c4529adc29"
|
||||
dependencies = [
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-types",
|
||||
"bytes",
|
||||
"http 0.2.11",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-types"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb3e134004170d3303718baa2a4eb4ca64ee0a1c0a7041dca31b38be0fb414f3"
|
||||
dependencies = [
|
||||
"base64-simd",
|
||||
"bytes",
|
||||
"bytes-utils",
|
||||
"futures-core",
|
||||
"http 0.2.11",
|
||||
"http-body",
|
||||
"itoa",
|
||||
"num-integer",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"ryu",
|
||||
"serde",
|
||||
"time",
|
||||
"tokio",
|
||||
"tokio-util 0.7.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-smithy-xml"
|
||||
version = "0.55.3"
|
||||
version = "0.60.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1b9d12875731bd07e767be7baad95700c3137b56730ec9ddeedb52a5e5ca63b"
|
||||
checksum = "8604a11b25e9ecaf32f9aa56b9fe253c5e2f606a3477f0071e96d3155a5ed218"
|
||||
dependencies = [
|
||||
"xmlparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aws-types"
|
||||
version = "0.55.3"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6dd209616cc8d7bfb82f87811a5c655dc97537f592689b18743bddf5dc5c4829"
|
||||
checksum = "789bbe008e65636fe1b6dbbb374c40c8960d1232b96af5ff4aec349f9c4accf4"
|
||||
dependencies = [
|
||||
"aws-credential-types",
|
||||
"aws-smithy-async",
|
||||
"aws-smithy-client",
|
||||
"aws-smithy-http",
|
||||
"aws-smithy-runtime-api",
|
||||
"aws-smithy-types",
|
||||
"http 0.2.11",
|
||||
"rustc_version",
|
||||
|
@ -576,6 +599,12 @@ dependencies = [
|
|||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base16ct"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.13.1"
|
||||
|
@ -598,6 +627,12 @@ dependencies = [
|
|||
"vsimd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64ct"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
||||
|
||||
[[package]]
|
||||
name = "bincode"
|
||||
version = "1.3.3"
|
||||
|
@ -771,6 +806,12 @@ version = "1.0.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
|
||||
|
||||
[[package]]
|
||||
name = "const-oid"
|
||||
version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.4"
|
||||
|
@ -847,6 +888,28 @@ version = "0.8.19"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
|
||||
|
||||
[[package]]
|
||||
name = "crypto-bigint"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"rand_core",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-bigint"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.6"
|
||||
|
@ -902,6 +965,16 @@ dependencies = [
|
|||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "der"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de"
|
||||
dependencies = [
|
||||
"const-oid",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.3.11"
|
||||
|
@ -960,12 +1033,44 @@ version = "1.0.16"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"
|
||||
|
||||
[[package]]
|
||||
name = "ecdsa"
|
||||
version = "0.14.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
|
||||
dependencies = [
|
||||
"der",
|
||||
"elliptic-curve",
|
||||
"rfc6979",
|
||||
"signature",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
|
||||
|
||||
[[package]]
|
||||
name = "elliptic-curve"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
|
||||
dependencies = [
|
||||
"base16ct",
|
||||
"crypto-bigint 0.4.9",
|
||||
"der",
|
||||
"digest",
|
||||
"ff",
|
||||
"generic-array",
|
||||
"group",
|
||||
"pkcs8",
|
||||
"rand_core",
|
||||
"sec1",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encoding_rs"
|
||||
version = "0.8.33"
|
||||
|
@ -1017,21 +1122,22 @@ version = "0.1.9"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
|
||||
dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
|
||||
|
||||
[[package]]
|
||||
name = "ff"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
version = "0.4.2"
|
||||
|
@ -1497,6 +1603,17 @@ dependencies = [
|
|||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "group"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
|
||||
dependencies = [
|
||||
"ff",
|
||||
"rand_core",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.3.24"
|
||||
|
@ -1928,6 +2045,7 @@ dependencies = [
|
|||
name = "k2v-client"
|
||||
version = "0.0.4"
|
||||
dependencies = [
|
||||
"aws-sdk-config",
|
||||
"aws-sigv4",
|
||||
"base64 0.21.7",
|
||||
"clap 4.4.18",
|
||||
|
@ -2537,6 +2655,17 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "p256"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
|
||||
dependencies = [
|
||||
"ecdsa",
|
||||
"elliptic-curve",
|
||||
"sha2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "page_size"
|
||||
version = "0.4.2"
|
||||
|
@ -2669,6 +2798,16 @@ version = "0.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||
|
||||
[[package]]
|
||||
name = "pkcs8"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
|
||||
dependencies = [
|
||||
"der",
|
||||
"spki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.29"
|
||||
|
@ -2936,6 +3075,12 @@ dependencies = [
|
|||
"regex-syntax 0.8.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-lite"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.29"
|
||||
|
@ -2988,6 +3133,17 @@ dependencies = [
|
|||
"winreg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rfc6979"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
|
||||
dependencies = [
|
||||
"crypto-bigint 0.4.9",
|
||||
"hmac",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ring"
|
||||
version = "0.16.20"
|
||||
|
@ -3212,6 +3368,20 @@ dependencies = [
|
|||
"untrusted 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sec1"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
|
||||
dependencies = [
|
||||
"base16ct",
|
||||
"der",
|
||||
"generic-array",
|
||||
"pkcs8",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "secrecy"
|
||||
version = "0.8.0"
|
||||
|
@ -3386,6 +3556,16 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signature"
|
||||
version = "1.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
|
||||
dependencies = [
|
||||
"digest",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.9"
|
||||
|
@ -3439,6 +3619,16 @@ version = "0.9.8"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
||||
|
||||
[[package]]
|
||||
name = "spki"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"der",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_init"
|
||||
version = "1.0.3"
|
||||
|
@ -3580,7 +3770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"fastrand 2.0.1",
|
||||
"fastrand",
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix",
|
||||
"windows-sys 0.52.0",
|
||||
|
|
|
@ -115,7 +115,7 @@ opentelemetry-otlp = "0.10"
|
|||
prometheus = "0.13"
|
||||
|
||||
# used by the k2v-client crate only
|
||||
aws-sigv4 = "0.55"
|
||||
aws-sigv4 = {version = "1.1", features = ["http0-compat"] }
|
||||
hyper-rustls = { version = "0.24", features = ["http2"] }
|
||||
log = "0.4"
|
||||
thiserror = "1.0"
|
||||
|
@ -125,8 +125,9 @@ assert-json-diff = "2.0"
|
|||
rustc_version = "0.4.0"
|
||||
static_init = "1.0"
|
||||
|
||||
aws-config = "0.55.2"
|
||||
aws-sdk-s3 = "0.28"
|
||||
aws-config = "1.1.4"
|
||||
aws-sdk-config = "1.13"
|
||||
aws-sdk-s3 = "1.14"
|
||||
|
||||
[profile.dev]
|
||||
lto = "off"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use aws_sdk_s3::config::BehaviorVersion;
|
||||
use aws_sdk_s3::config::Credentials;
|
||||
use aws_sdk_s3::{Client, Config};
|
||||
|
||||
|
@ -11,6 +12,7 @@ pub fn build_client(key: &Key) -> Client {
|
|||
.endpoint_url(format!("http://127.0.0.1:{}", DEFAULT_PORT))
|
||||
.region(super::REGION)
|
||||
.credentials_provider(credentials)
|
||||
.behavior_version(BehaviorVersion::v2023_11_09())
|
||||
.build();
|
||||
|
||||
Client::from_conf(config)
|
||||
|
|
|
@ -154,7 +154,7 @@ async fn test_multipart_upload() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(r.content_length, (SZ_5MB * 3) as i64);
|
||||
assert_eq!(r.content_length.unwrap(), (SZ_5MB * 3) as i64);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ async fn test_multipart_upload() {
|
|||
.unwrap();
|
||||
|
||||
eprintln!("get_object with part_number = {}", part_number);
|
||||
assert_eq!(o.content_length, SZ_5MB as i64);
|
||||
assert_eq!(o.content_length.unwrap(), SZ_5MB as i64);
|
||||
assert_bytes_eq!(o.body, data);
|
||||
}
|
||||
}
|
||||
|
@ -249,14 +249,14 @@ async fn test_uploadlistpart() {
|
|||
|
||||
let ps = r.parts.unwrap();
|
||||
assert_eq!(ps.len(), 1);
|
||||
assert_eq!(ps[0].part_number, 2);
|
||||
assert_eq!(ps[0].part_number.unwrap(), 2);
|
||||
let fp = &ps[0];
|
||||
assert!(fp.last_modified.is_some());
|
||||
assert_eq!(
|
||||
fp.e_tag.as_ref().unwrap(),
|
||||
"\"3366bb9dcf710d6801b5926467d02e19\""
|
||||
);
|
||||
assert_eq!(fp.size, SZ_5MB as i64);
|
||||
assert_eq!(fp.size.unwrap(), SZ_5MB as i64);
|
||||
}
|
||||
|
||||
let p2 = ctx
|
||||
|
@ -286,23 +286,23 @@ async fn test_uploadlistpart() {
|
|||
let ps = r.parts.unwrap();
|
||||
assert_eq!(ps.len(), 2);
|
||||
|
||||
assert_eq!(ps[0].part_number, 1);
|
||||
assert_eq!(ps[0].part_number.unwrap(), 1);
|
||||
let fp = &ps[0];
|
||||
assert!(fp.last_modified.is_some());
|
||||
assert_eq!(
|
||||
fp.e_tag.as_ref().unwrap(),
|
||||
"\"3c484266f9315485694556e6c693bfa2\""
|
||||
);
|
||||
assert_eq!(fp.size, SZ_5MB as i64);
|
||||
assert_eq!(fp.size.unwrap(), SZ_5MB as i64);
|
||||
|
||||
assert_eq!(ps[1].part_number, 2);
|
||||
assert_eq!(ps[1].part_number.unwrap(), 2);
|
||||
let sp = &ps[1];
|
||||
assert!(sp.last_modified.is_some());
|
||||
assert_eq!(
|
||||
sp.e_tag.as_ref().unwrap(),
|
||||
"\"3366bb9dcf710d6801b5926467d02e19\""
|
||||
);
|
||||
assert_eq!(sp.size, SZ_5MB as i64);
|
||||
assert_eq!(sp.size.unwrap(), SZ_5MB as i64);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -320,14 +320,14 @@ async fn test_uploadlistpart() {
|
|||
|
||||
assert!(r.part_number_marker.is_none());
|
||||
assert_eq!(r.next_part_number_marker.as_deref(), Some("1"));
|
||||
assert_eq!(r.max_parts, 1_i32);
|
||||
assert!(r.is_truncated);
|
||||
assert_eq!(r.max_parts.unwrap(), 1_i32);
|
||||
assert!(r.is_truncated.unwrap());
|
||||
assert_eq!(r.key.unwrap(), "a");
|
||||
assert_eq!(r.upload_id.unwrap().as_str(), uid.as_str());
|
||||
let parts = r.parts.unwrap();
|
||||
assert_eq!(parts.len(), 1);
|
||||
let fp = &parts[0];
|
||||
assert_eq!(fp.part_number, 1);
|
||||
assert_eq!(fp.part_number.unwrap(), 1);
|
||||
assert_eq!(
|
||||
fp.e_tag.as_ref().unwrap(),
|
||||
"\"3c484266f9315485694556e6c693bfa2\""
|
||||
|
@ -349,19 +349,19 @@ async fn test_uploadlistpart() {
|
|||
r2.part_number_marker.as_ref().unwrap(),
|
||||
r.next_part_number_marker.as_ref().unwrap()
|
||||
);
|
||||
assert_eq!(r2.max_parts, 1_i32);
|
||||
assert_eq!(r2.max_parts.unwrap(), 1_i32);
|
||||
assert_eq!(r2.key.unwrap(), "a");
|
||||
assert_eq!(r2.upload_id.unwrap().as_str(), uid.as_str());
|
||||
let parts = r2.parts.unwrap();
|
||||
assert_eq!(parts.len(), 1);
|
||||
let fp = &parts[0];
|
||||
assert_eq!(fp.part_number, 2);
|
||||
assert_eq!(fp.part_number.unwrap(), 2);
|
||||
assert_eq!(
|
||||
fp.e_tag.as_ref().unwrap(),
|
||||
"\"3366bb9dcf710d6801b5926467d02e19\""
|
||||
);
|
||||
//assert!(r2.is_truncated); // WHY? (this was the test before)
|
||||
assert!(!r2.is_truncated);
|
||||
assert!(!r2.is_truncated.unwrap());
|
||||
}
|
||||
|
||||
let cmp = CompletedMultipartUpload::builder()
|
||||
|
@ -411,7 +411,7 @@ async fn test_uploadlistpart() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(r.content_length, (SZ_5MB * 2) as i64);
|
||||
assert_eq!(r.content_length.unwrap(), (SZ_5MB * 2) as i64);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ async fn test_putobject() {
|
|||
// assert_eq!(o.version_id.unwrap(), _version);
|
||||
assert_eq!(o.content_type.unwrap(), content_type);
|
||||
assert!(o.last_modified.is_some());
|
||||
assert_eq!(o.content_length, 0);
|
||||
assert_eq!(o.parts_count, 0);
|
||||
assert_eq!(o.tag_count, 0);
|
||||
assert_eq!(o.content_length.unwrap(), 0);
|
||||
assert_eq!(o.parts_count, None);
|
||||
assert_eq!(o.tag_count, None);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -86,9 +86,9 @@ async fn test_putobject() {
|
|||
assert_bytes_eq!(o.body, b"hi");
|
||||
assert_eq!(o.e_tag.unwrap(), etag);
|
||||
assert!(o.last_modified.is_some());
|
||||
assert_eq!(o.content_length, 2);
|
||||
assert_eq!(o.parts_count, 0);
|
||||
assert_eq!(o.tag_count, 0);
|
||||
assert_eq!(o.content_length.unwrap(), 2);
|
||||
assert_eq!(o.parts_count, None);
|
||||
assert_eq!(o.tag_count, None);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -119,9 +119,9 @@ async fn test_putobject() {
|
|||
assert_bytes_eq!(o.body, b"");
|
||||
assert_eq!(o.e_tag.unwrap(), etag);
|
||||
assert!(o.last_modified.is_some());
|
||||
assert_eq!(o.content_length, 0);
|
||||
assert_eq!(o.parts_count, 0);
|
||||
assert_eq!(o.tag_count, 0);
|
||||
assert_eq!(o.content_length.unwrap(), 0);
|
||||
assert_eq!(o.parts_count, None);
|
||||
assert_eq!(o.tag_count, None);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ async fn test_deleteobject() {
|
|||
.await
|
||||
.unwrap();
|
||||
if i > 0 {
|
||||
to_del = to_del.objects(ObjectIdentifier::builder().key(k).build());
|
||||
to_del = to_del.objects(ObjectIdentifier::builder().key(k).build().unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ async fn test_deleteobject() {
|
|||
.unwrap();
|
||||
|
||||
if i > 0 {
|
||||
to_del = to_del.objects(ObjectIdentifier::builder().key(k).build());
|
||||
to_del = to_del.objects(ObjectIdentifier::builder().key(k).build().unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ async fn test_deleteobject() {
|
|||
.client
|
||||
.delete_objects()
|
||||
.bucket(&bucket)
|
||||
.delete(to_del.build())
|
||||
.delete(to_del.build().unwrap())
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
|
|
|
@ -57,9 +57,9 @@ async fn test_putobject_streaming() {
|
|||
// assert_eq!(o.version_id.unwrap(), _version);
|
||||
assert_eq!(o.content_type.unwrap(), content_type);
|
||||
assert!(o.last_modified.is_some());
|
||||
assert_eq!(o.content_length, 0);
|
||||
assert_eq!(o.parts_count, 0);
|
||||
assert_eq!(o.tag_count, 0);
|
||||
assert_eq!(o.content_length.unwrap(), 0);
|
||||
assert_eq!(o.parts_count, None);
|
||||
assert_eq!(o.tag_count, None);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -95,9 +95,9 @@ async fn test_putobject_streaming() {
|
|||
assert_bytes_eq!(o.body, BODY);
|
||||
assert_eq!(o.e_tag.unwrap(), etag);
|
||||
assert!(o.last_modified.is_some());
|
||||
assert_eq!(o.content_length, 62);
|
||||
assert_eq!(o.parts_count, 0);
|
||||
assert_eq!(o.tag_count, 0);
|
||||
assert_eq!(o.content_length.unwrap(), 62);
|
||||
assert_eq!(o.parts_count, None);
|
||||
assert_eq!(o.tag_count, None);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ async fn test_put_website_streaming() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(o.index_document.unwrap().suffix.unwrap(), "home.html");
|
||||
assert_eq!(o.error_document.unwrap().key.unwrap(), "err/error.html");
|
||||
assert_eq!(o.index_document.unwrap().suffix, "home.html");
|
||||
assert_eq!(o.error_document.unwrap().key, "err/error.html");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,8 +181,18 @@ async fn test_website_s3_api() {
|
|||
.unwrap();
|
||||
|
||||
let conf = WebsiteConfiguration::builder()
|
||||
.index_document(IndexDocument::builder().suffix("home.html").build())
|
||||
.error_document(ErrorDocument::builder().key("err/error.html").build())
|
||||
.index_document(
|
||||
IndexDocument::builder()
|
||||
.suffix("home.html")
|
||||
.build()
|
||||
.unwrap(),
|
||||
)
|
||||
.error_document(
|
||||
ErrorDocument::builder()
|
||||
.key("err/error.html")
|
||||
.build()
|
||||
.unwrap(),
|
||||
)
|
||||
.build();
|
||||
|
||||
ctx.client
|
||||
|
@ -201,9 +211,11 @@ async fn test_website_s3_api() {
|
|||
.allowed_methods("GET")
|
||||
.allowed_methods("PUT")
|
||||
.allowed_origins("*")
|
||||
.build(),
|
||||
.build()
|
||||
.unwrap(),
|
||||
)
|
||||
.build();
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
ctx.client
|
||||
.put_bucket_cors()
|
||||
|
@ -222,19 +234,16 @@ async fn test_website_s3_api() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
let main_rule = cors_res.cors_rules().unwrap().iter().next().unwrap();
|
||||
let main_rule = cors_res.cors_rules().iter().next().unwrap();
|
||||
|
||||
assert_eq!(main_rule.id.as_ref().unwrap(), "main-rule");
|
||||
assert_eq!(
|
||||
main_rule.allowed_headers.as_ref().unwrap(),
|
||||
&vec!["*".to_string()]
|
||||
);
|
||||
assert_eq!(&main_rule.allowed_origins, &vec!["*".to_string()]);
|
||||
assert_eq!(
|
||||
main_rule.allowed_origins.as_ref().unwrap(),
|
||||
&vec!["*".to_string()]
|
||||
);
|
||||
assert_eq!(
|
||||
main_rule.allowed_methods.as_ref().unwrap(),
|
||||
&main_rule.allowed_methods,
|
||||
&vec!["GET".to_string(), "PUT".to_string()]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ hex.workspace = true
|
|||
http.workspace = true
|
||||
log.workspace = true
|
||||
aws-sigv4.workspace = true
|
||||
aws-sdk-config.workspace = true
|
||||
percent-encoding.workspace = true
|
||||
hyper = { workspace = true, default-features = false, features = ["client", "http1", "http2"] }
|
||||
hyper-rustls.workspace = true
|
||||
|
|
|
@ -27,7 +27,7 @@ pub enum Error {
|
|||
#[error("deserialization error: {0}")]
|
||||
Deserialization(#[from] serde_json::Error),
|
||||
#[error("invalid signature parameters: {0}")]
|
||||
SignParameters(#[from] aws_sigv4::signing_params::BuildError),
|
||||
SignParameters(#[from] aws_sigv4::sign::v4::signing_params::BuildError),
|
||||
#[error("could not sign request: {0}")]
|
||||
SignRequest(#[from] aws_sigv4::http_request::SigningError),
|
||||
#[error("request timed out")]
|
||||
|
|
|
@ -13,7 +13,9 @@ use hyper::{body::Bytes, Body};
|
|||
use hyper::{client::connect::HttpConnector, Client as HttpClient};
|
||||
use hyper_rustls::HttpsConnector;
|
||||
|
||||
use aws_sigv4::http_request::{sign, SignableRequest, SigningParams, SigningSettings};
|
||||
use aws_sdk_config::config::Credentials;
|
||||
use aws_sigv4::http_request::{sign, SignableBody, SignableRequest, SigningSettings};
|
||||
use aws_sigv4::sign::v4::SigningParams;
|
||||
|
||||
use serde::de::Error as DeError;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
@ -363,21 +365,37 @@ impl K2vClient {
|
|||
|
||||
// Sign request
|
||||
let signing_settings = SigningSettings::default();
|
||||
let identity = Credentials::new(
|
||||
&self.config.aws_access_key_id,
|
||||
&self.config.aws_secret_access_key,
|
||||
None,
|
||||
None,
|
||||
"k2v-client",
|
||||
)
|
||||
.into();
|
||||
let signing_params = SigningParams::builder()
|
||||
.access_key(&self.config.aws_access_key_id)
|
||||
.secret_key(&self.config.aws_secret_access_key)
|
||||
.identity(&identity)
|
||||
.region(&self.config.region)
|
||||
.service_name(SERVICE)
|
||||
.name(SERVICE)
|
||||
.time(SystemTime::now())
|
||||
.settings(signing_settings)
|
||||
.build()?;
|
||||
.build()?
|
||||
.into();
|
||||
// Convert the HTTP request into a signable request
|
||||
let signable_request = SignableRequest::from(&req);
|
||||
let signable_request = SignableRequest::new(
|
||||
req.method().as_str(),
|
||||
req.uri().to_string(),
|
||||
// TODO: get rid of Unwrap
|
||||
req.headers()
|
||||
.iter()
|
||||
.map(|(x, y)| (x.as_str(), y.to_str().unwrap())),
|
||||
SignableBody::Bytes(req.body().as_ref()),
|
||||
)?;
|
||||
|
||||
// Sign and then apply the signature to the request
|
||||
let (signing_instructions, _signature) =
|
||||
sign(signable_request, &signing_params)?.into_parts();
|
||||
signing_instructions.apply_to_request(&mut req);
|
||||
signing_instructions.apply_to_request_http0x(&mut req);
|
||||
|
||||
// Send and wait for timeout
|
||||
let res = tokio::select! {
|
||||
|
@ -451,7 +469,11 @@ impl K2vClient {
|
|||
}
|
||||
|
||||
fn build_url<V: AsRef<str>>(&self, partition_key: Option<&str>, query: &[(&str, V)]) -> String {
|
||||
let mut url = format!("{}/{}", self.config.endpoint, self.config.bucket);
|
||||
let mut url = format!(
|
||||
"{}/{}",
|
||||
self.config.endpoint.trim_end_matches('/'),
|
||||
self.config.bucket
|
||||
);
|
||||
if let Some(pk) = partition_key {
|
||||
url.push('/');
|
||||
url.extend(utf8_percent_encode(pk, &PATH_ENCODE_SET));
|
||||
|
|
Loading…
Reference in a new issue