diff --git a/.gitignore b/.gitignore
index 83b9ef43c..e9172ab10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,7 @@
.devcontainer
rustfs/static/*
vendor
-cli/rustfs-gui/embedded-rustfs/rustfs
\ No newline at end of file
+cli/rustfs-gui/embedded-rustfs/rustfs
+.log
+config/obs.toml
+config/certs/*
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index 8dbf614de..1db4030ef 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -679,6 +679,29 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+[[package]]
+name = "aws-lc-rs"
+version = "1.12.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01"
+dependencies = [
+ "aws-lc-sys",
+ "zeroize",
+]
+
+[[package]]
+name = "aws-lc-sys"
+version = "0.27.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77926887776171ced7d662120a75998e444d3750c951abfe07f90da130514b1f"
+dependencies = [
+ "bindgen",
+ "cc",
+ "cmake",
+ "dunce",
+ "fs_extra",
+]
+
[[package]]
name = "axum"
version = "0.7.9"
@@ -734,6 +757,29 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "axum-server"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1ad46c3ec4e12f4a4b6835e173ba21c25e484c9d02b49770bf006ce5367c036"
+dependencies = [
+ "arc-swap",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "pin-project-lite",
+ "rustls 0.21.12",
+ "rustls-pemfile",
+ "tokio",
+ "tokio-rustls 0.24.1",
+ "tower 0.4.13",
+ "tower-service",
+]
+
[[package]]
name = "backon"
version = "1.4.0"
@@ -795,6 +841,29 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "bindgen"
+version = "0.69.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
+dependencies = [
+ "bitflags 2.9.0",
+ "cexpr",
+ "clang-sys",
+ "itertools 0.12.1",
+ "lazy_static",
+ "lazycell",
+ "log",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustc-hash 1.1.0",
+ "shlex",
+ "syn 2.0.98",
+ "which",
+]
+
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -1002,6 +1071,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+[[package]]
+name = "cexpr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
+dependencies = [
+ "nom",
+]
+
[[package]]
name = "cfb"
version = "0.7.3"
@@ -1133,6 +1211,17 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "clang-sys"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
+dependencies = [
+ "glob",
+ "libc",
+ "libloading 0.8.6",
+]
+
[[package]]
name = "clap"
version = "4.5.31"
@@ -1173,6 +1262,15 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
+[[package]]
+name = "cmake"
+version = "0.1.54"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "cocoa"
version = "0.25.0"
@@ -3116,6 +3214,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "fs_extra"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
+
[[package]]
name = "futf"
version = "0.1.5"
@@ -3853,10 +3957,10 @@ dependencies = [
"http",
"hyper",
"hyper-util",
- "rustls",
+ "rustls 0.23.23",
"rustls-pki-types",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.26.2",
"tower-service",
"webpki-roots",
]
@@ -3908,7 +4012,6 @@ dependencies = [
"itertools 0.14.0",
"jsonwebtoken",
"lazy_static",
- "log",
"madmin",
"policy",
"rand 0.8.5",
@@ -4172,6 +4275,15 @@ version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itertools"
version = "0.13.0"
@@ -4331,6 +4443,12 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+[[package]]
+name = "lazycell"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+
[[package]]
name = "lexical-core"
version = "1.0.5"
@@ -5726,7 +5844,6 @@ dependencies = [
"itertools 0.14.0",
"jsonwebtoken",
"lazy_static",
- "log",
"madmin",
"rand 0.8.5",
"regex",
@@ -6034,7 +6151,7 @@ dependencies = [
"quinn-proto",
"quinn-udp",
"rustc-hash 2.1.1",
- "rustls",
+ "rustls 0.23.23",
"socket2",
"thiserror 2.0.11",
"tokio",
@@ -6052,7 +6169,7 @@ dependencies = [
"rand 0.8.5",
"ring",
"rustc-hash 2.1.1",
- "rustls",
+ "rustls 0.23.23",
"rustls-pki-types",
"slab",
"thiserror 2.0.11",
@@ -6354,7 +6471,7 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"quinn",
- "rustls",
+ "rustls 0.23.23",
"rustls-pemfile",
"rustls-pki-types",
"serde",
@@ -6363,7 +6480,7 @@ dependencies = [
"sync_wrapper",
"system-configuration",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.26.2",
"tokio-util",
"tower 0.5.2",
"tower-service",
@@ -6529,6 +6646,7 @@ dependencies = [
"async-trait",
"atoi",
"axum",
+ "axum-server",
"bytes",
"chrono",
"clap",
@@ -6551,7 +6669,6 @@ dependencies = [
"lazy_static",
"local-ip-address",
"lock",
- "log",
"madmin",
"matchit 0.8.6",
"mime",
@@ -6567,6 +6684,9 @@ dependencies = [
"query",
"rmp-serde",
"rust-embed",
+ "rustls 0.23.23",
+ "rustls-pemfile",
+ "rustls-pki-types",
"s3s",
"serde",
"serde_json",
@@ -6574,6 +6694,7 @@ dependencies = [
"shadow-rs",
"time",
"tokio",
+ "tokio-rustls 0.26.2",
"tokio-stream",
"tokio-util",
"tonic",
@@ -6596,7 +6717,6 @@ dependencies = [
"chrono",
"dioxus",
"dirs 6.0.0",
- "futures-util",
"hex",
"keyring",
"lazy_static",
@@ -6623,17 +6743,30 @@ dependencies = [
"windows-sys 0.59.0",
]
+[[package]]
+name = "rustls"
+version = "0.21.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
+dependencies = [
+ "log",
+ "ring",
+ "rustls-webpki 0.101.7",
+ "sct",
+]
+
[[package]]
name = "rustls"
version = "0.23.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
dependencies = [
+ "aws-lc-rs",
"log",
"once_cell",
"ring",
"rustls-pki-types",
- "rustls-webpki",
+ "rustls-webpki 0.102.8",
"subtle",
"zeroize",
]
@@ -6656,12 +6789,23 @@ dependencies = [
"web-time",
]
+[[package]]
+name = "rustls-webpki"
+version = "0.101.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
[[package]]
name = "rustls-webpki"
version = "0.102.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
dependencies = [
+ "aws-lc-rs",
"ring",
"rustls-pki-types",
"untrusted",
@@ -6758,6 +6902,16 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+[[package]]
+name = "sct"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
[[package]]
name = "security-framework"
version = "2.11.1"
@@ -7722,13 +7876,23 @@ dependencies = [
"syn 2.0.98",
]
+[[package]]
+name = "tokio-rustls"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
+dependencies = [
+ "rustls 0.21.12",
+ "tokio",
+]
+
[[package]]
name = "tokio-rustls"
version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
dependencies = [
- "rustls",
+ "rustls 0.23.23",
"tokio",
]
@@ -7838,7 +8002,7 @@ dependencies = [
"rustls-pemfile",
"socket2",
"tokio",
- "tokio-rustls",
+ "tokio-rustls 0.26.2",
"tokio-stream",
"tower 0.4.13",
"tower-layer",
@@ -8594,6 +8758,18 @@ dependencies = [
"windows-core 0.58.0",
]
+[[package]]
+name = "which"
+version = "4.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
+dependencies = [
+ "either",
+ "home",
+ "once_cell",
+ "rustix",
+]
+
[[package]]
name = "winapi"
version = "0.3.9"
diff --git a/Cargo.toml b/Cargo.toml
index adae86503..20f6a009a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,9 +47,10 @@ flatbuffers = "24.12.23"
futures = "0.3.31"
futures-util = "0.3.31"
common = { path = "./common/common" }
-policy = {path = "./policy"}
+policy = { path = "./policy" }
hex = "0.4.3"
hyper = "1.6.0"
+#hyper-rustls = { version = "0.27.5", features = ["http2"] }
hyper-util = { version = "0.1.10", features = [
"tokio",
"server-auto",
@@ -72,11 +73,14 @@ prost-types = "0.13.4"
protobuf = "3.7"
protos = { path = "./common/protos" }
rand = "0.8.5"
-reqwest = { version = "0.12.12", default-features = false, features = ["rustls-tls", "charset", "http2", "macos-system-configuration", "stream","blocking"] }
+reqwest = { version = "0.12.12", default-features = false, features = ["rustls-tls", "charset", "http2", "macos-system-configuration", "stream", "blocking"] }
rfd = { version = "0.15.2", default-features = false, features = ["xdg-portal", "tokio"] }
rmp = "0.8.14"
rmp-serde = "1.3.0"
rust-embed = "8.6.0"
+rustls = { version = "0.23" }
+rustls-pki-types = "1.11.0"
+rustls-pemfile = "2.2.0"
s3s = { git = "https://github.com/Nugine/s3s.git", rev = "ab139f72fe768fb9d8cecfe36269451da1ca9779", default-features = true, features = [
"tower",
] }
@@ -98,9 +102,11 @@ tokio = { version = "1.43.0", features = ["fs", "rt-multi-thread"] }
tonic = { version = "0.12.3", features = ["gzip"] }
tonic-build = "0.12.3"
tonic-reflection = "0.12"
+tokio-rustls = { version = "0.26", default-features = false }
tokio-stream = "0.1.17"
tokio-util = { version = "0.7.13", features = ["io", "compat"] }
tower = { version = "0.5.2", features = ["timeout"] }
+tower-http = { version = "0.6.2", features = ["cors"] }
tracing = "0.1.41"
tracing-error = "0.2.1"
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "time"] }
@@ -112,12 +118,11 @@ uuid = { version = "1.15.1", features = [
"fast-rng",
"macro-diagnostics",
] }
-log = "0.4.25"
axum = "0.7.9"
+axum-server = { version = "0.6", features = ["tls-rustls"] }
md-5 = "0.10.6"
workers = { path = "./common/workers" }
test-case = "3.3.1"
-zip = "2.2.3"
snafu = "0.8.5"
diff --git a/cli/rustfs-gui/Cargo.toml b/cli/rustfs-gui/Cargo.toml
index c9af2fc37..faca71ee5 100644
--- a/cli/rustfs-gui/Cargo.toml
+++ b/cli/rustfs-gui/Cargo.toml
@@ -10,7 +10,6 @@ version.workspace = true
chrono = { workspace = true }
dioxus = { workspace = true, features = ["router"] }
dirs = { workspace = true }
-futures-util = { workspace = true }
hex = { workspace = true }
keyring = { workspace = true }
lazy_static = { workspace = true }
diff --git a/iam/Cargo.toml b/iam/Cargo.toml
index 5afc93c54..fce678b66 100644
--- a/iam/Cargo.toml
+++ b/iam/Cargo.toml
@@ -11,7 +11,6 @@ workspace = true
[dependencies]
tokio.workspace = true
-log.workspace = true
time = { workspace = true, features = ["serde-human-readable"] }
serde = { workspace = true, features = ["derive", "rc"] }
ecstore = { path = "../ecstore" }
diff --git a/iam/src/cache.rs b/iam/src/cache.rs
index f16921162..b5dd20c3b 100644
--- a/iam/src/cache.rs
+++ b/iam/src/cache.rs
@@ -6,12 +6,12 @@ use std::{
};
use arc_swap::{ArcSwap, AsRaw, Guard};
-use log::warn;
use policy::{
auth::UserIdentity,
policy::{Args, PolicyDoc},
};
use time::OffsetDateTime;
+use tracing::warn;
use crate::store::{GroupInfo, MappedPolicy};
@@ -63,7 +63,7 @@ impl Cache {
let mut new = CacheEntity::clone(&cur);
op(&mut new);
- // 使用cas原子替换内容
+ // 使用 cas 原子替换内容
let prev = target.compare_and_swap(&*cur, Arc::new(new));
let swapped = Self::ptr_eq(&*cur, &*prev);
if swapped {
@@ -112,8 +112,8 @@ impl CacheInner {
// todo!()
// }
- // /// 如果是临时用户,返回Ok(Some(partent_name)))
- // /// 如果不是临时用户,返回Ok(None)
+ // /// 如果是临时用户,返回 Ok(Some(partent_name)))
+ // /// 如果不是临时用户,返回 Ok(None)
// fn is_temp_user(&self, user_name: &str) -> crate::Result