Skip to content

Commit aa784f0

Browse files
committed
docs: add secure-credential hint at every command that uses keys
Every credential-bearing command/code block now carries an inline reminder to use a unique access key and a strong, random secret (openssl rand -base64 24): shell/mc blocks get the comment before the command, YAML/compose and SDK snippets get it beside the credential lines. Linux env-file guides already carried the hint.
1 parent bd56ed6 commit aa784f0

6 files changed

Lines changed: 15 additions & 0 deletions

File tree

docs/developer/sdk/java.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public class RustfsS3Example {
6767
.region(Region.US_EAST_1) // 可写死,RustFS 不校验 region
6868
.credentialsProvider(
6969
StaticCredentialsProvider.create(
70+
// 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
7071
AwsBasicCredentials.create("<your-access-key>", "<your-secret-key>")
7172
)
7273
)
@@ -171,6 +172,7 @@ S3Presigner presigner = S3Presigner.builder()
171172
.region(Region.US_EAST_1)
172173
.credentialsProvider(
173174
StaticCredentialsProvider.create(
175+
// 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
174176
AwsBasicCredentials.create("<your-access-key>", "<your-secret-key>")
175177
)
176178
)

docs/developer/sdk/javascript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const s3 = new S3Client({
4343
endpoint: "http://192.168.1.100:9000", // RustFS endpoint
4444
region: "us-east-1", // 可随意填写
4545
credentials: {
46+
// 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
4647
accessKeyId: "<your-access-key>",
4748
secretAccessKey: "<your-secret-key>",
4849
},

docs/developer/sdk/python.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ from botocore.client import Config
5858
s3 = boto3.client(
5959
's3',
6060
endpoint_url='http://192.168.1.100:9000',
61+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
6162
aws_access_key_id='<your-access-key>',
6263
aws_secret_access_key='<your-secret-key>',
6364
config=Config(signature_version='s3v4'),

docs/installation/docker/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ RustFS SNSD Docker 运行方式,结合上述镜像与配置,执行:
6565
### 完整参数配置示例
6666

6767
```bash
68+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
6869
docker run -d \
6970
--name rustfs_container \
7071
-p 9000:9000 \
@@ -87,6 +88,7 @@ docker run -d \
8788

8889
1. **环境变量方式** (推荐):
8990
```bash
91+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
9092
-e RUSTFS_ADDRESS=:9000 \
9193
-e RUSTFS_SERVER_DOMAINS=example.com \
9294
-e RUSTFS_ACCESS_KEY="<your-access-key>" \
@@ -96,6 +98,7 @@ docker run -d \
9698

9799
2. **命令行参数方式**:
98100
```
101+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
99102
--address :9000 \
100103
--server-domains example.com \
101104
--access-key "<your-access-key>" \
@@ -132,6 +135,7 @@ docker run -d \
132135

133136
3. **自定义认证密钥**:
134137
```bash
138+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
135139
docker run -d \
136140
-p 9000:9000 \
137141
-p 9001:9001 \
@@ -249,6 +253,7 @@ services:
249253
- RUSTFS_CORS_ALLOWED_ORIGINS=*
250254
- RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=*
251255
# 访问密钥(生产环境请修改为强密码)
256+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
252257
- RUSTFS_ACCESS_KEY=<your-access-key>
253258
- RUSTFS_SECRET_KEY=<your-secret-key>
254259
# 日志级别
@@ -439,6 +444,7 @@ nginx -t && nginx -s reload
439444

440445
2. **测试 S3 API**
441446
```bash
447+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
442448
# 使用 mc 客户端
443449
mc alias set myrustfs https://s3.example.com "<your-access-key>" "<your-secret-key>"
444450
mc mb myrustfs/test-bucket
@@ -481,6 +487,7 @@ nginx -t && nginx -s reload
481487
使用 `mc` 或其他 S3 客户端:
482488

483489
```bash
490+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
484491
mc alias set rustfs http://localhost:9000 "<your-access-key>" "<your-secret-key>"
485492
mc mb rustfs/mybucket
486493
mc ls rustfs

docs/integration/milvus.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Milvus 官方提供 [`docker-compose.yml`](https://github.com/milvus-io/milvus/b
3838
- RUSTFS_EXTERNAL_ADDRESS=:9000
3939
- RUSTFS_CORS_ALLOWED_ORIGINS=*
4040
- RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=*
41+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
4142
- RUSTFS_ACCESS_KEY=<your-access-key>
4243
- RUSTFS_SECRET_KEY=<your-secret-key>
4344
ports:
@@ -95,6 +96,7 @@ minio 的信息(包括地址、access_key、access_secret 等)都写在 [`mi
9596
rustfs:
9697
address: localhost:9000
9798
port: 9000
99+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
98100
accessKeyID: <your-access-key>
99101
secretAccessKey: <your-secret-key>
100102
useSSL: false

docs/integration/traefik.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ services:
125125
- RUSTFS_ADDRESS=0.0.0.0:9000
126126
- RUSTFS_CONSOLE_ENABLE=true
127127
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
128+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
128129
- RUSTFS_ACCESS_KEY=<your-access-key>
129130
- RUSTFS_SECRET_KEY=<your-secret-key>
130131
- RUSTFS_CMD=rustfs
@@ -185,6 +186,7 @@ traefik traefik:v3.5.4 "/entrypoint.sh --lo…" traef
185186
当然,也可以通过[mc](../developer/mc.md)来进行验证:
186187

187188
```
189+
# 使用独立的 access key 和强随机 secret(可用如 openssl rand -base64 24 生成)
188190
mc alias set rustfs https://your.rustfs.com "<your-access-key>" "<your-secret-key>"
189191
mc ls rustfs
190192
```

0 commit comments

Comments
 (0)