Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore: remove br compression. gzip only (#1314)

Will Hutchinson24386f8da65a
diff --git a/rust/cloud-storage/Cargo.lock b/rust/cloud-storage/Cargo.lock
index 7f6b539ab5..70a4deabb4 100644
--- a/rust/cloud-storage/Cargo.lock
+++ b/rust/cloud-storage/Cargo.lock
@@ -1030,7 +1030,7 @@ dependencies = [
"hmac",
"http 0.2.12",
"http 1.3.1",
- "p256",
+ "p256 0.11.1",
"percent-encoding",
"ring",
"sha2",
@@ -1416,6 +1416,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
+[[package]]
+name = "base16ct"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
+
[[package]]
name = "base64"
version = "0.13.1"
@@ -1591,9 +1597,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
-version = "1.10.1"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
+checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
dependencies = [
"serde",
]
@@ -2319,8 +2325,10 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
dependencies = [
+ "generic-array",
"rand_core 0.6.4",
"subtle",
+ "zeroize",
]
[[package]]
@@ -2369,6 +2377,33 @@ dependencies = [
"syn 2.0.98",
]
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest",
+ "fiat-crypto",
+ "rustc_version",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.98",
+]
+
[[package]]
name = "darling"
version = "0.20.10"
@@ -3001,11 +3036,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
dependencies = [
"der 0.6.1",
- "elliptic-curve",
- "rfc6979",
+ "elliptic-curve 0.12.3",
+ "rfc6979 0.3.1",
"signature 1.6.4",
]
+[[package]]
+name = "ecdsa"
+version = "0.16.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
+dependencies = [
+ "der 0.7.9",
+ "digest",
+ "elliptic-curve 0.13.8",
+ "rfc6979 0.4.0",
+ "signature 2.2.0",
+ "spki 0.7.3",
+]
+
+[[package]]
+name = "ed25519"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
+dependencies = [
+ "pkcs8 0.10.2",
+ "signature 2.2.0",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "serde",
+ "sha2",
+ "subtle",
+ "zeroize",
+]
+
[[package]]
name = "ego-tree"
version = "0.6.3"
@@ -3027,16 +3100,37 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
dependencies = [
- "base16ct",
+ "base16ct 0.1.1",
"crypto-bigint 0.4.9",
"der 0.6.1",
"digest",
- "ff",
+ "ff 0.12.1",
"generic-array",
- "group",
+ "group 0.12.1",
"pkcs8 0.9.0",
"rand_core 0.6.4",
- "sec1",
+ "sec1 0.3.0",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "elliptic-curve"
+version = "0.13.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
+dependencies = [
+ "base16ct 0.2.0",
+ "crypto-bigint 0.5.5",
+ "digest",
+ "ff 0.13.1",
+ "generic-array",
+ "group 0.13.0",
+ "hkdf",
+ "pem-rfc7468",
+ "pkcs8 0.10.2",
+ "rand_core 0.6.4",
+ "sec1 0.7.3",
"subtle",
"zeroize",
]
@@ -3499,6 +3593,22 @@ dependencies = [
"subtle",
]
+[[package]]
+name = "ff"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
+dependencies = [
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "fiat-crypto"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
+
[[package]]
name = "filter_ast"
version = "0.1.0"
@@ -3764,6 +3874,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
+ "zeroize",
]
[[package]]
@@ -3864,7 +3975,18 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
dependencies = [
- "ff",
+ "ff 0.12.1",
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "group"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
+dependencies = [
+ "ff 0.13.1",
"rand_core 0.6.4",
"subtle",
]
@@ -4662,16 +4784,24 @@ dependencies = [
[[package]]
name = "jsonwebtoken"
-version = "9.3.1"
+version = "10.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde"
+checksum = "0529410abe238729a60b108898784df8984c87f6054c9c4fcacc47e4803c1ce1"
dependencies = [
"base64 0.22.1",
+ "ed25519-dalek",
+ "getrandom 0.2.15",
+ "hmac",
"js-sys",
+ "p256 0.13.2",
+ "p384",
"pem",
- "ring",
+ "rand 0.8.5",
+ "rsa",
"serde",
"serde_json",
+ "sha2",
+ "signature 2.2.0",
"simple_asn1",
]
@@ -6253,8 +6383,32 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
dependencies = [
- "ecdsa",
- "elliptic-curve",
+ "ecdsa 0.14.8",
+ "elliptic-curve 0.12.3",
+ "sha2",
+]
+
+[[package]]
+name = "p256"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b"
+dependencies = [
+ "ecdsa 0.16.9",
+ "elliptic-curve 0.13.8",
+ "primeorder",
+ "sha2",
+]
+
+[[package]]
+name = "p384"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6"
+dependencies = [
+ "ecdsa 0.16.9",
+ "elliptic-curve 0.13.8",
+ "primeorder",
"sha2",
]
@@ -6604,6 +6758,15 @@ dependencies = [
"syn 2.0.98",
]
+[[package]]
+name = "primeorder"
+version = "0.13.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6"
+dependencies = [
+ "elliptic-curve 0.13.8",
+]
+
[[package]]
name = "proc-macro2"
version = "1.0.103"
@@ -7192,6 +7355,16 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "rfc6979"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
+dependencies = [
+ "hmac",
+ "subtle",
+]
+
[[package]]
name = "rgb"
version = "0.8.50"
@@ -7703,7 +7876,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
dependencies = [
- "base16ct",
+ "base16ct 0.1.1",
"der 0.6.1",
"generic-array",
"pkcs8 0.9.0",
@@ -7711,6 +7884,20 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "sec1"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
+dependencies = [
+ "base16ct 0.2.0",
+ "der 0.7.9",
+ "generic-array",
+ "pkcs8 0.10.2",
+ "subtle",
+ "zeroize",
+]
+
[[package]]
name = "secrecy"
version = "0.10.3"
diff --git a/rust/cloud-storage/Cargo.toml b/rust/cloud-storage/Cargo.toml
index 5f419d6aa7..9b5b3b651f 100644
--- a/rust/cloud-storage/Cargo.toml
+++ b/rust/cloud-storage/Cargo.toml
@@ -153,7 +153,7 @@ hex = "0.4.3"
http = "1"
http-body-util = "0.1.2"
itertools = "0.14"
-jsonwebtoken = "9.3.1"
+jsonwebtoken = { version = "10.3.0", features = ["rust_crypto"] }
lambda_runtime = "0.13.0"
lazy_static = "1.5.0"
log = "0.4.26"
@@ -216,7 +216,7 @@ async-stripe = { version = "0.41", default-features = false, features = [
"runtime-tokio-hyper",
] }
axum-macros = "0.4.2"
-bytes = "1.10.1"
+bytes = "1.11.1"
bzip2 = { version = "0.5.1", default-features = false, features = [
"libbz2-rs-sys",
] }
diff --git a/rust/cloud-storage/comms_service/src/api/channels/mod.rs b/rust/cloud-storage/comms_service/src/api/channels/mod.rs
index 62df8975cf..781d69208c 100644
--- a/rust/cloud-storage/comms_service/src/api/channels/mod.rs
+++ b/rust/cloud-storage/comms_service/src/api/channels/mod.rs
@@ -2,7 +2,6 @@ use axum::{
Router,
routing::{delete, get, patch, post},
};
-use macro_axum_utils::compose_layers;
pub mod add_participants;
pub mod create_channel;
@@ -25,15 +24,10 @@ pub mod post_typing;
pub mod remove_participants;
use crate::api::context::AppState;
-use tower_http::compression::CompressionLayer;
-
pub fn router() -> Router<AppState> {
Router::new()
.route("/", post(create_channel::create_channel_handler))
- .route(
- "/:channel_id",
- get(get_channel::get_channel_handler).layer(compose_layers![CompressionLayer::new(),]),
- )
+ .route("/:channel_id", get(get_channel::get_channel_handler))
.route(
"/:channel_id",
delete(delete_channel::delete_channel_handler),
diff --git a/rust/cloud-storage/deny.toml b/rust/cloud-storage/deny.toml
index bb27584ba2..e7c7990fef 100644
--- a/rust/cloud-storage/deny.toml
+++ b/rust/cloud-storage/deny.toml
@@ -70,13 +70,11 @@ feature-depth = 1
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
- { id = "RUSTSEC-2021-0141", reason = "Consider implementing dotenv from scratch. Not done yet" },
{ id = "RUSTSEC-2023-0071", reason = "At the time of writing there is no patch for this" },
{ id = "RUSTSEC-2024-0384", reason = "Cannot yet switch to web-time, due to a 3rd party openai dependency" },
{ id = "RUSTSEC-2024-0436", reason = "Paste is a 'finished' crate which is heavily depended on" },
{ id = "RUSTSEC-2025-0012", reason = "Cannot remove dep due to 3rd party openai dependency" },
{ id = "RUSTSEC-2025-0057", reason = "We should switch to rustc-hash, but haven't got to that yet" },
- { id = "RUSTSEC-2026-0002", reason = "lru 0.12.x has soundness issue in IterMut; no patched 0.12.x exists. Waiting for AWS SDK to update to lru 0.16.x" },
#{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" },
#"[email protected]", # you can also ignore yanked crate versions if you wish
#{ crate = "[email protected]", reason = "you can specify why you are ignoring the yanked crate" },
@@ -183,9 +181,6 @@ allow = [
]
# List of crates to deny
deny = [
- { crate = "dotenv", wrappers = [
- "macro_entrypoint",
- ], reason = "Use macro_entrypoint for dotenv setup in workspace crates" },
{ crate = "tracing-subscriber", wrappers = [
"lambda_runtime_api_client", # External crate allowed to use tracing-subscriber
"macro_entrypoint",
@@ -249,7 +244,6 @@ skip = [
{ crate = "rand_core", reason = "Different dependencies require different versions" },
{ crate = "rustc-hash", reason = "Hash function dependencies" },
{ crate = "rustls", reason = "TLS dependencies version mismatch" },
- { crate = "rustls-native-certs", reason = "TLS certificate dependencies" },
{ crate = "rustls-webpki", reason = "TLS dependencies version mismatch" },
{ crate = "security-framework", reason = "macOS security framework dependencies" },
{ crate = "selectors", reason = "CSS selector dependencies" },
diff --git a/rust/cloud-storage/document_storage_service/Cargo.toml b/rust/cloud-storage/document_storage_service/Cargo.toml
index 85fe1dbb1c..1416bc459a 100644
--- a/rust/cloud-storage/document_storage_service/Cargo.toml
+++ b/rust/cloud-storage/document_storage_service/Cargo.toml
@@ -115,7 +115,6 @@ thiserror = { workspace = true }
tokio = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true, features = [
- "compression-br",
"compression-gzip",
] }
tracing = { workspace = true }
diff --git a/rust/cloud-storage/document_storage_service/src/api/mod.rs b/rust/cloud-storage/document_storage_service/src/api/mod.rs
index 30cde6ca2f..553f687a0b 100644
--- a/rust/cloud-storage/document_storage_service/src/api/mod.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/mod.rs
@@ -68,7 +68,7 @@ pub async fn setup_and_serve(state: ApiContext) -> anyhow::Result<()> {
validate_api_version,
))
.layer(macro_cors::cors_layer())
- .layer(CompressionLayer::new().gzip(true).br(true)),
+ .layer(CompressionLayer::new().gzip(true)),
)
// The health router is attached here so we don't attach the logging middleware to it
.merge(SwaggerUi::new("/docs").url("/api-doc/openapi.json", swagger::ApiDoc::openapi()));