Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3702933
D7307.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D7307.diff
View Options
diff --git a/services/identity/Cargo.lock b/services/identity/Cargo.lock
--- a/services/identity/Cargo.lock
+++ b/services/identity/Cargo.lock
@@ -56,18 +56,18 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
name = "async-trait"
-version = "0.1.64"
+version = "0.1.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2"
+checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.13",
]
[[package]]
@@ -403,9 +403,9 @@
[[package]]
name = "axum"
-version = "0.6.7"
+version = "0.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fb79c228270dcf2426e74864cabc94babb5dbab01a4314e702d2f16540e1591"
+checksum = "349f8ccfd9221ee7d1f3d4b33e1f8319b3a81ed8f61f2ea40b37b859794b4491"
dependencies = [
"async-trait",
"axum-core",
@@ -425,16 +425,15 @@
"serde",
"sync_wrapper",
"tower",
- "tower-http",
"tower-layer",
"tower-service",
]
[[package]]
name = "axum-core"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34"
+checksum = "b2f958c80c248b34b9a877a643811be8dbca03ca5ba827f2b63baf3a81e5fc4e"
dependencies = [
"async-trait",
"bytes",
@@ -603,7 +602,7 @@
"proc-macro-error",
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -644,7 +643,7 @@
"log",
"opaque-ke 2.0.0",
"rand",
- "tonic",
+ "tonic 0.8.3",
"wasm-bindgen",
]
@@ -791,7 +790,7 @@
"proc-macro2",
"quote",
"scratch",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -808,7 +807,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -834,7 +833,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -847,7 +846,7 @@
"proc-macro2",
"quote",
"rustc_version",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -878,7 +877,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -1006,7 +1005,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -1323,7 +1322,7 @@
"siwe",
"tokio",
"tokio-stream",
- "tonic",
+ "tonic 0.9.1",
"tonic-build",
"tonic-web",
"tracing",
@@ -1645,7 +1644,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -1673,7 +1672,7 @@
checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78"
dependencies = [
"proc-macro2",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -1685,7 +1684,7 @@
"proc-macro-error-attr",
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
"version_check",
]
@@ -1702,9 +1701,9 @@
[[package]]
name = "proc-macro2"
-version = "1.0.51"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
+checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
dependencies = [
"unicode-ident",
]
@@ -1736,7 +1735,7 @@
"prost",
"prost-types",
"regex",
- "syn",
+ "syn 1.0.107",
"tempfile",
"which",
]
@@ -1751,7 +1750,7 @@
"itertools",
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -1766,9 +1765,9 @@
[[package]]
name = "quote"
-version = "1.0.23"
+version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
+checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
dependencies = [
"proc-macro2",
]
@@ -2000,7 +1999,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -2128,6 +2127,17 @@
"unicode-ident",
]
+[[package]]
+name = "syn"
+version = "2.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
[[package]]
name = "sync_wrapper"
version = "0.1.2"
@@ -2142,7 +2152,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
"unicode-xid",
]
@@ -2192,7 +2202,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -2278,7 +2288,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -2324,9 +2334,30 @@
checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb"
dependencies = [
"async-stream",
+ "base64 0.13.1",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "http",
+ "http-body",
+ "percent-encoding",
+ "pin-project",
+ "tokio-stream",
+ "tokio-util",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tonic"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38bd8e87955eb13c1986671838177d6792cdc52af9bffced0d2c8a9a7f741ab3"
+dependencies = [
"async-trait",
"axum",
- "base64 0.13.1",
+ "base64 0.21.0",
"bytes",
"futures-core",
"futures-util",
@@ -2338,44 +2369,41 @@
"percent-encoding",
"pin-project",
"prost",
- "prost-derive",
"tokio",
"tokio-stream",
- "tokio-util",
"tower",
"tower-layer",
"tower-service",
"tracing",
- "tracing-futures",
]
[[package]]
name = "tonic-build"
-version = "0.8.4"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4"
+checksum = "0f60a933bbea70c95d633c04c951197ddf084958abaa2ed502a3743bdd8d8dd7"
dependencies = [
"prettyplease",
"proc-macro2",
"prost-build",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
name = "tonic-web"
-version = "0.5.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9213351ad53b0dcf1c9cf7c372a47533446b1114928a9177bedc6c551e14b7cf"
+checksum = "1ea5a992300fc324dd8c529868ec7b07ac85510431f982e6f716c2cac56701d9"
dependencies = [
- "base64 0.13.1",
+ "base64 0.21.0",
"bytes",
"futures-core",
"http",
"http-body",
"hyper",
"pin-project",
- "tonic",
+ "tonic 0.9.1",
"tower-http",
"tower-layer",
"tower-service",
@@ -2404,9 +2432,9 @@
[[package]]
name = "tower-http"
-version = "0.3.5"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858"
+checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658"
dependencies = [
"bitflags",
"bytes",
@@ -2416,7 +2444,6 @@
"http-body",
"http-range-header",
"pin-project-lite",
- "tower",
"tower-layer",
"tower-service",
]
@@ -2454,7 +2481,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
]
[[package]]
@@ -2467,16 +2494,6 @@
"valuable",
]
-[[package]]
-name = "tracing-futures"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
-dependencies = [
- "pin-project",
- "tracing",
-]
-
[[package]]
name = "tracing-log"
version = "0.1.3"
@@ -2630,7 +2647,7 @@
"once_cell",
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
"wasm-bindgen-shared",
]
@@ -2652,7 +2669,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -2829,6 +2846,6 @@
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.107",
"synstructure",
]
diff --git a/services/identity/Cargo.toml b/services/identity/Cargo.toml
--- a/services/identity/Cargo.toml
+++ b/services/identity/Cargo.toml
@@ -5,7 +5,7 @@
license = "BSD-3-Clause"
[dependencies]
-tonic = "0.8"
+tonic = "0.9.1"
prost = "0.11"
futures-core = "0.3"
tokio = { version = "1.24", features = ["macros", "rt-multi-thread"] }
@@ -27,7 +27,7 @@
comm-opaque2 = { path = "../../shared/comm-opaque2" }
once_cell = "1.17"
hex = "0.4"
-tonic-web = "0.5"
+tonic-web = "0.9.1"
[build-dependencies]
-tonic-build = "0.8"
+tonic-build = "0.9.1"
diff --git a/services/identity/src/main.rs b/services/identity/src/main.rs
--- a/services/identity/src/main.rs
+++ b/services/identity/src/main.rs
@@ -2,7 +2,6 @@
use database::DatabaseClient;
use interceptor::check_auth;
use tonic::transport::Server;
-use tonic_web::GrpcWebLayer;
use tracing_subscriber::FmtSubscriber;
mod client_service;
@@ -68,9 +67,8 @@
info!("Listening to gRPC traffic on {}", addr);
Server::builder()
.accept_http1(true)
- .layer(GrpcWebLayer::new())
.add_service(keyserver_service)
- .add_service(client_service)
+ .add_service(tonic_web::enable(client_service))
.serve(addr)
.await?;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 7:31 PM (6 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2822319
Default Alt Text
D7307.diff (8 KB)
Attached To
Mode
D7307: [identity] fix CORS
Attached
Detach File
Event Timeline
Log In to Comment