1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Bump AWS crates and remove direct dependency on aws-types

This commit is contained in:
Quentin Gliech
2022-11-02 14:25:45 +01:00
parent 01b036ca8e
commit 6a235d40d9
3 changed files with 66 additions and 147 deletions

200
Cargo.lock generated
View File

@ -208,9 +208,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]] [[package]]
name = "aws-config" name = "aws-config"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b309b2154d224728d845a958c580834f24213037ed61b195da80c0b0fc7469fa" checksum = "56a636c44c77fa18bdba56126a34d30cfe5538fe88f7d34988fa731fee143ddd"
dependencies = [ dependencies = [
"aws-http", "aws-http",
"aws-sdk-sso", "aws-sdk-sso",
@ -236,9 +236,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-endpoint" name = "aws-endpoint"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76f35c8f5877ad60db4f0d9dcdfbcb2233a8cc539f9e568df39ee0581ec62e89" checksum = "6ca8f374874f6459aaa88dc861d7f5d834ca1ff97668eae190e97266b5f6c3fb"
dependencies = [ dependencies = [
"aws-smithy-http", "aws-smithy-http",
"aws-smithy-types", "aws-smithy-types",
@ -250,9 +250,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-http" name = "aws-http"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f5422c9632d887968ccb66e2871a6d190d6104e276034912bee72ef58a5d890" checksum = "78d41e19e779b73463f5f0c21b3aacc995f4ba783ab13a7ae9f5dfb159a551b4"
dependencies = [ dependencies = [
"aws-smithy-http", "aws-smithy-http",
"aws-smithy-types", "aws-smithy-types",
@ -268,9 +268,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-sesv2" name = "aws-sdk-sesv2"
version = "0.19.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2a0cd8ec50541f853aa6f895f7320ae1ea7b833aaf1c42471f437e7b6c94bf" checksum = "1b2876df7dffcf330a5677b1105c7f9141aacd0db6280484fd8529af5b64125d"
dependencies = [ dependencies = [
"aws-endpoint", "aws-endpoint",
"aws-http", "aws-http",
@ -290,9 +290,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-sso" name = "aws-sdk-sso"
version = "0.19.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2cc8b50281e1350d0b5c7207c2ce53c6721186ad196472caff4f20fa4b42e96" checksum = "86dcb1cb71aa8763b327542ead410424515cff0cde5b753eedd2917e09c63734"
dependencies = [ dependencies = [
"aws-endpoint", "aws-endpoint",
"aws-http", "aws-http",
@ -312,9 +312,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-sts" name = "aws-sdk-sts"
version = "0.19.0" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6179f13c9fbab3226860f377354dece860e34ff129b69c7c1b0fa828d1e9c76" checksum = "fdfcf584297c666f6b472d5368a78de3bc714b6e0a53d7fbf76c3e347c292ab1"
dependencies = [ dependencies = [
"aws-endpoint", "aws-endpoint",
"aws-http", "aws-http",
@ -334,9 +334,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sig-auth" name = "aws-sig-auth"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b16f4d70c9c865af392eb40cacfe2bec3fa18f651fbdf49919cfc1dda13b189e" checksum = "12cbe7b2be9e185c1fbce27fc9c41c66b195b32d89aa099f98768d9544221308"
dependencies = [ dependencies = [
"aws-sigv4", "aws-sigv4",
"aws-smithy-http", "aws-smithy-http",
@ -347,9 +347,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sigv4" name = "aws-sigv4"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d33790cecae42b999d197074c8a19e9b96b9e346284a6f93989e7489c9fa0f5" checksum = "03ff4cff8c4a101962d593ba94e72cd83891aecd423f0c6e3146bff6fb92c9e3"
dependencies = [ dependencies = [
"aws-smithy-http", "aws-smithy-http",
"form_urlencoded", "form_urlencoded",
@ -365,9 +365,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-async" name = "aws-smithy-async"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc604f278bae64bbd15854baa9c46ed69a56dfb0669d04aab80974749f2d6599" checksum = "7b3442b4c5d3fc39891a2e5e625735fba6b24694887d49c6518460fde98247a9"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"pin-project-lite", "pin-project-lite",
@ -377,9 +377,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-client" name = "aws-smithy-client"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec39585f8274fa543ad5c63cc09cbd435666be16b2cf99e4e07be5cf798bc050" checksum = "ff28d553714f8f54cd921227934fc13a536a1c03f106e56b362fd57e16d450ad"
dependencies = [ dependencies = [
"aws-smithy-async", "aws-smithy-async",
"aws-smithy-http", "aws-smithy-http",
@ -390,7 +390,7 @@ dependencies = [
"http", "http",
"http-body", "http-body",
"hyper", "hyper",
"hyper-rustls 0.22.1", "hyper-rustls",
"lazy_static", "lazy_static",
"pin-project-lite", "pin-project-lite",
"tokio", "tokio",
@ -400,9 +400,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-http" name = "aws-smithy-http"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "014a0ef5c4508fc2f6a9d3925c214725af19f020ea388db48e20196cc4cc9d6d" checksum = "bf58ed4fefa61dbf038e5421a521cbc2c448ef69deff0ab1d915d8a10eda5664"
dependencies = [ dependencies = [
"aws-smithy-types", "aws-smithy-types",
"bytes 1.2.1", "bytes 1.2.1",
@ -414,6 +414,7 @@ dependencies = [
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"pin-utils",
"tokio", "tokio",
"tokio-util 0.7.4", "tokio-util 0.7.4",
"tracing", "tracing",
@ -421,9 +422,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-http-tower" name = "aws-smithy-http-tower"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deecb478dc3cc40203e0e97ac0fb92947e0719754bbafd0026bdc49318e2fd03" checksum = "20c96d7bd35e7cf96aca1134b2f81b1b59ffe493f7c6539c051791cbbf7a42d3"
dependencies = [ dependencies = [
"aws-smithy-http", "aws-smithy-http",
"bytes 1.2.1", "bytes 1.2.1",
@ -436,18 +437,18 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-json" name = "aws-smithy-json"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6593456af93c4a39724f7dc9d239833102ab96c1d1e94c35ea79f0e55f9fd54c" checksum = "d8324ba98c8a94187723cc16c37aefa09504646ee65c3d2c3af495bab5ea701b"
dependencies = [ dependencies = [
"aws-smithy-types", "aws-smithy-types",
] ]
[[package]] [[package]]
name = "aws-smithy-query" name = "aws-smithy-query"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b803460b71645dfa9f6be47c4f00f91632f01e5bb01f9dc43890cd6cba983f08" checksum = "83834ed2ff69ea6f6657baf205267dc2c0abe940703503a3e5d60ce23be3d306"
dependencies = [ dependencies = [
"aws-smithy-types", "aws-smithy-types",
"urlencoding", "urlencoding",
@ -455,9 +456,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-types" name = "aws-smithy-types"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e93b0c93a3b963da946a0b8ef3853a7252298eb75cdbfb21dad60f5ed0ded861" checksum = "8b02e06ea63498c43bc0217ea4d16605d4e58d85c12fc23f6572ff6d0a840c61"
dependencies = [ dependencies = [
"itoa 1.0.4", "itoa 1.0.4",
"num-integer", "num-integer",
@ -467,18 +468,18 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-xml" name = "aws-smithy-xml"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36b9efb4855b4acb29961a776d45680f3cbdd7c4783cbbae078da54c342575dd" checksum = "246e9f83dd1fdf5d347fa30ae4ad30a9d1d42ce4cd74a93d94afa874646f94cd"
dependencies = [ dependencies = [
"xmlparser", "xmlparser",
] ]
[[package]] [[package]]
name = "aws-types" name = "aws-types"
version = "0.49.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93f3f349b39781849261db1c727369923bb97007cf7bd0deb3a6e9e461c8d38f" checksum = "05701d32da168b44f7ee63147781aed8723e792cc131cb9b18363b5393f17f70"
dependencies = [ dependencies = [
"aws-smithy-async", "aws-smithy-async",
"aws-smithy-client", "aws-smithy-client",
@ -1201,15 +1202,6 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "ct-logs"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8"
dependencies = [
"sct 0.6.1",
]
[[package]] [[package]]
name = "ctr" name = "ctr"
version = "0.9.2" version = "0.9.2"
@ -2004,23 +1996,6 @@ dependencies = [
"want", "want",
] ]
[[package]]
name = "hyper-rustls"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64"
dependencies = [
"ct-logs",
"futures-util",
"hyper",
"log",
"rustls 0.19.1",
"rustls-native-certs 0.5.0",
"tokio",
"tokio-rustls 0.22.0",
"webpki 0.21.4",
]
[[package]] [[package]]
name = "hyper-rustls" name = "hyper-rustls"
version = "0.23.0" version = "0.23.0"
@ -2029,9 +2004,11 @@ checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac"
dependencies = [ dependencies = [
"http", "http",
"hyper", "hyper",
"rustls 0.20.7", "log",
"rustls",
"rustls-native-certs",
"tokio", "tokio",
"tokio-rustls 0.23.4", "tokio-rustls",
] ]
[[package]] [[package]]
@ -2333,12 +2310,12 @@ dependencies = [
"nom", "nom",
"once_cell", "once_cell",
"quoted_printable", "quoted_printable",
"rustls 0.20.7", "rustls",
"rustls-pemfile", "rustls-pemfile",
"serde", "serde",
"socket2", "socket2",
"tokio", "tokio",
"tokio-rustls 0.23.4", "tokio-rustls",
"tracing", "tracing",
"webpki-roots", "webpki-roots",
] ]
@ -2490,7 +2467,7 @@ dependencies = [
"opentelemetry-semantic-conventions", "opentelemetry-semantic-conventions",
"opentelemetry-zipkin", "opentelemetry-zipkin",
"prometheus", "prometheus",
"rustls 0.20.7", "rustls",
"serde_json", "serde_json",
"serde_yaml", "serde_yaml",
"tokio", "tokio",
@ -2554,7 +2531,6 @@ dependencies = [
"async-trait", "async-trait",
"aws-config", "aws-config",
"aws-sdk-sesv2", "aws-sdk-sesv2",
"aws-types",
"lettre", "lettre",
"mas-templates", "mas-templates",
"tokio", "tokio",
@ -2614,13 +2590,13 @@ dependencies = [
"http", "http",
"http-body", "http-body",
"hyper", "hyper",
"hyper-rustls 0.23.0", "hyper-rustls",
"once_cell", "once_cell",
"opentelemetry", "opentelemetry",
"opentelemetry-http", "opentelemetry-http",
"opentelemetry-semantic-conventions", "opentelemetry-semantic-conventions",
"rustls 0.20.7", "rustls",
"rustls-native-certs 0.6.2", "rustls-native-certs",
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
@ -2630,7 +2606,7 @@ dependencies = [
"tower-http", "tower-http",
"tracing", "tracing",
"tracing-opentelemetry", "tracing-opentelemetry",
"webpki 0.22.0", "webpki",
"webpki-roots", "webpki-roots",
] ]
@ -2736,7 +2712,7 @@ dependencies = [
"rustls-pemfile", "rustls-pemfile",
"thiserror", "thiserror",
"tokio", "tokio",
"tokio-rustls 0.23.4", "tokio-rustls",
"tokio-test", "tokio-test",
"tower-http", "tower-http",
"tower-service", "tower-service",
@ -3954,7 +3930,7 @@ dependencies = [
"http", "http",
"http-body", "http-body",
"hyper", "hyper",
"hyper-rustls 0.23.0", "hyper-rustls",
"ipnet", "ipnet",
"js-sys", "js-sys",
"log", "log",
@ -3962,13 +3938,13 @@ dependencies = [
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"rustls 0.20.7", "rustls",
"rustls-pemfile", "rustls-pemfile",
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"tokio", "tokio",
"tokio-rustls 0.23.4", "tokio-rustls",
"tower-service", "tower-service",
"url", "url",
"wasm-bindgen", "wasm-bindgen",
@ -4088,19 +4064,6 @@ dependencies = [
"windows-sys", "windows-sys",
] ]
[[package]]
name = "rustls"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
dependencies = [
"base64",
"log",
"ring",
"sct 0.6.1",
"webpki 0.21.4",
]
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.20.7" version = "0.20.7"
@ -4109,20 +4072,8 @@ checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c"
dependencies = [ dependencies = [
"log", "log",
"ring", "ring",
"sct 0.7.0", "sct",
"webpki 0.22.0", "webpki",
]
[[package]]
name = "rustls-native-certs"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092"
dependencies = [
"openssl-probe",
"rustls 0.19.1",
"schannel",
"security-framework",
] ]
[[package]] [[package]]
@ -4230,16 +4181,6 @@ dependencies = [
"sha2 0.10.6", "sha2 0.10.6",
] ]
[[package]]
name = "sct"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce"
dependencies = [
"ring",
"untrusted",
]
[[package]] [[package]]
name = "sct" name = "sct"
version = "0.7.0" version = "0.7.0"
@ -4596,7 +4537,7 @@ dependencies = [
"paste", "paste",
"percent-encoding", "percent-encoding",
"rand", "rand",
"rustls 0.20.7", "rustls",
"rustls-pemfile", "rustls-pemfile",
"serde", "serde",
"serde_json", "serde_json",
@ -4643,7 +4584,7 @@ checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"tokio", "tokio",
"tokio-rustls 0.23.4", "tokio-rustls",
] ]
[[package]] [[package]]
@ -4912,26 +4853,15 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "tokio-rustls"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls 0.19.1",
"tokio",
"webpki 0.21.4",
]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.23.4" version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [ dependencies = [
"rustls 0.20.7", "rustls",
"tokio", "tokio",
"webpki 0.22.0", "webpki",
] ]
[[package]] [[package]]
@ -5757,16 +5687,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "webpki"
version = "0.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
dependencies = [
"ring",
"untrusted",
]
[[package]] [[package]]
name = "webpki" name = "webpki"
version = "0.22.0" version = "0.22.0"
@ -5783,7 +5703,7 @@ version = "0.22.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be"
dependencies = [ dependencies = [
"webpki 0.22.0", "webpki",
] ]
[[package]] [[package]]
@ -5893,9 +5813,9 @@ dependencies = [
[[package]] [[package]]
name = "xmlparser" name = "xmlparser"
version = "0.13.3" version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "114ba2b24d2167ef6d67d7d04c8cc86522b87f490025f39f0303b7db5bf5e3d8" checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
[[package]] [[package]]
name = "yaml-rust" name = "yaml-rust"

View File

@ -10,9 +10,8 @@ anyhow = "1.0.66"
async-trait = "0.1.58" async-trait = "0.1.58"
tokio = { version = "1.21.2", features = ["macros"] } tokio = { version = "1.21.2", features = ["macros"] }
tracing = "0.1.37" tracing = "0.1.37"
aws-sdk-sesv2 = "0.19.0" aws-sdk-sesv2 = "0.21.0"
aws-config = "0.49.0" aws-config = "0.51.0"
aws-types = "0.49.0"
mas-templates = { path = "../templates" } mas-templates = { path = "../templates" }

View File

@ -30,13 +30,13 @@ impl Transport {
/// Construct a [`Transport`] from the environment /// Construct a [`Transport`] from the environment
pub async fn from_env() -> Self { pub async fn from_env() -> Self {
let config = aws_config::from_env().load().await; let config = aws_config::from_env().load().await;
Self::new(&config) let config = aws_sdk_sesv2::Config::from(&config);
Self::new(config)
} }
/// Constructs a [`Transport`] from a given AWS shared config /// Constructs a [`Transport`] from a given AWS SES SDK config
#[must_use] #[must_use]
pub fn new(config: &aws_types::SdkConfig) -> Self { pub fn new(config: aws_sdk_sesv2::Config) -> Self {
let config = aws_sdk_sesv2::Config::from(config);
let client = Client::from_conf(config); let client = Client::from_conf(config);
Self { client } Self { client }
} }