mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 03:46:37 +00:00
fix(security): document unsafe and TLS overrides (#2835)
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user