fix(security): document unsafe and TLS overrides (#2835)

This commit is contained in:
安正超
2026-05-06 23:09:02 +08:00
committed by GitHub
parent 70be0804ee
commit 4728abcff1
18 changed files with 89 additions and 17 deletions
+6 -2
View File
@@ -82,6 +82,10 @@ export RUSTFS_KEYSTONE_CACHE_SIZE=10000
export RUSTFS_KEYSTONE_CACHE_TTL=300
```
TLS certificate verification is enabled by default. Set
`RUSTFS_KEYSTONE_VERIFY_SSL=false` only for an explicitly trusted hop; it allows
MITM attacks against the Keystone connection and emits a startup warning.
## API Documentation
### KeystoneClient
@@ -628,8 +632,8 @@ time curl -X GET http://localhost:9000/ \
- Verify token format is correct (no newlines, extra spaces)
**Issue: "SSL verification failed"**
- If using self-signed certificates, set `RUSTFS_KEYSTONE_VERIFY_SSL=false`
- Or install Keystone's CA certificate in system trust store
- Prefer installing Keystone's CA certificate in the system trust store
- If using a trusted non-production hop, set `RUSTFS_KEYSTONE_VERIFY_SSL=false`; this allows MITM attacks and emits a startup warning
**Issue: Slow performance**
- Increase cache size: `RUSTFS_KEYSTONE_CACHE_SIZE=50000`
+7
View File
@@ -58,6 +58,13 @@ impl KeystoneClient {
admin_domain: String,
verify_ssl: bool,
) -> Self {
if !verify_ssl {
warn!(
"Keystone client for '{}' is configured to skip TLS certificate verification. This permits MITM attacks and should not be used in production.",
auth_url
);
}
let client = Client::builder()
.danger_accept_invalid_certs(!verify_ssl)
.timeout(std::time::Duration::from_secs(30))