diff --git a/.env.example b/.env.example index 9f03b93e..a7772658 100644 --- a/.env.example +++ b/.env.example @@ -200,11 +200,16 @@ LOCAL_STORAGE_BASE_DIR=/data/files # TOS_PATH_PREFIX=your_tos_path_prefix # TOS_TEMP_BUCKET_NAME=your_tos_temp_bucket_name # TOS_TEMP_REGION=your_tos_temp_region +# 如果使用AWS S3作为文件存储,需要配置以下参数 +# AWS S3的访问端点(可选;留空使用 Region 对应的 AWS 标准端点,例如 https://s3.amazonaws.com) # ----- AWS S3(STORAGE_TYPE=s3)----- # S3_ENDPOINT=https://s3.amazonaws.com # S3_REGION=us-east-1 -# S3_ACCESS_KEY=your_s3_access_key +# AWS S3访问密钥 Access Key(可选;AK/SK 同时留空时使用 AWS SDK 默认凭证链, +# 支持 EC2/ECS/EKS IAM Role、IRSA/Web Identity、环境变量和共享配置文件) +# AWS S3访问密钥 Secret Key(必须与 Access Key 同时填写或同时留空) # S3_SECRET_KEY=your_s3_secret_key +# S3_ACCESS_KEY=your_s3_access_key # S3_BUCKET_NAME=your_s3_bucket_name # S3_PATH_PREFIX=weknora/ # S3_USE_SSL=true diff --git a/frontend/src/api/system/index.ts b/frontend/src/api/system/index.ts index 771114f1..ac09014b 100644 --- a/frontend/src/api/system/index.ts +++ b/frontend/src/api/system/index.ts @@ -180,9 +180,9 @@ export interface StorageEngineConfig { path_prefix: string } s3: { - endpoint: string + endpoint: string // optional for standard AWS S3 region: string - access_key: string + access_key: string // both keys empty => AWS default credential chain secret_key: string bucket_name: string path_prefix: string diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index 3d18308a..933312e8 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -1244,6 +1244,8 @@ export default { s3Desc: 'AWS S3 and S3-compatible object storage services, suitable for public cloud deployment.', s3AccessKeyPlaceholder: 'AWS Access Key', s3SecretKeyPlaceholder: 'AWS Secret Key', + s3DefaultCredentialsHint: 'Leave both keys empty to use the AWS default credential chain (IAM role, IRSA / web identity, environment, or shared config).', + s3EndpointPlaceholder: 'Optional; leave empty to use the AWS regional endpoint', ks3Title: 'Kingsoft Cloud KS3', ks3Desc: 'Kingsoft Cloud Object Storage Service (KS3), suitable for public cloud deployment.', ks3AccessKeyPlaceholder: 'Kingsoft Cloud Access Key', diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index 4e160236..fa2167d4 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -4613,6 +4613,8 @@ export default { s3Desc: 'AWS S3 및 호환 오브젝트 스토리지 서비스, 퍼블릭 클라우드 배포에 적합합니다.', s3AccessKeyPlaceholder: 'AWS Access Key', s3SecretKeyPlaceholder: 'AWS Secret Key', + s3DefaultCredentialsHint: '두 키를 모두 비워 두면 AWS 기본 자격 증명 체인(IAM 역할, IRSA / 웹 자격 증명, 환경 변수 또는 공유 구성)을 사용합니다.', + s3EndpointPlaceholder: '선택 사항; 비워 두면 AWS 리전 기본 엔드포인트 사용', ks3Title: 'Kingsoft Cloud KS3', ks3Desc: 'Kingsoft Cloud 오브젝트 스토리지 서비스(KS3), 퍼블릭 클라우드 배포에 적합합니다.', ks3AccessKeyPlaceholder: 'Kingsoft Cloud Access Key', diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index ebf8ce5c..85a7a43c 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -4613,6 +4613,8 @@ export default { s3Desc: 'AWS S3 и совместимые сервисы объектного хранилища для публичного облака.', s3AccessKeyPlaceholder: 'AWS Access Key', s3SecretKeyPlaceholder: 'AWS Secret Key', + s3DefaultCredentialsHint: 'Оставьте оба ключа пустыми, чтобы использовать стандартную цепочку учётных данных AWS (IAM role, IRSA / web identity, переменные среды или общий профиль).', + s3EndpointPlaceholder: 'Необязательно; оставьте пустым для регионального endpoint AWS', ks3Title: 'Kingsoft Cloud KS3', ks3Desc: 'Объектное хранилище Kingsoft Cloud (KS3), подходит для публичного облака.', ks3AccessKeyPlaceholder: 'Kingsoft Cloud Access Key', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index 61e2d3ca..883e2588 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -4613,6 +4613,8 @@ export default { s3Desc: 'AWS S3 及兼容的对象存储服务,适合公有云部署。', s3AccessKeyPlaceholder: 'AWS Access Key', s3SecretKeyPlaceholder: 'AWS Secret Key', + s3DefaultCredentialsHint: 'Access Key 与 Secret Key 同时留空时,将使用 AWS 默认凭证链(IAM Role、IRSA / Web Identity、环境变量或共享配置)。', + s3EndpointPlaceholder: '可选,留空使用 AWS 区域默认端点', ks3Title: '金山云 KS3', ks3Desc: '金山云对象存储服务(KS3),适合公有云部署。', ks3AccessKeyPlaceholder: '金山云 Access Key', diff --git a/frontend/src/views/settings/StorageEngineSettings.vue b/frontend/src/views/settings/StorageEngineSettings.vue index 1bae7732..26161621 100644 --- a/frontend/src/views/settings/StorageEngineSettings.vue +++ b/frontend/src/views/settings/StorageEngineSettings.vue @@ -369,14 +369,15 @@