-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The createS3Client() configuration requires that we have both accessKeyId and secretAccessKey keys to be valid. The issue is that this configuration requirement disables the ability to read from public s3-compatible s3-stores. This is because when we include these values the SDK does not omit signing information from the requests.
There isn't any docs discussing a specific way in the config to disable signing but I believe setting credentials: false or not providing credentials at all should fix this issue. This validation for checking for the access keys lives here:
file-assets/packages/file-asset-apis/src/s3/createS3Client.ts
Lines 135 to 149 in f6f215c
| export function createCredentialsObject( | |
| config: S3ClientConfig | |
| ): S3ClientCredentials { | |
| if (!config.accessKeyId) { | |
| throw new Error('S3 accessKeyId must be defined in S3ClientConfig'); | |
| } | |
| if (!config.secretAccessKey) { | |
| throw new Error('S3 secretAccessKey must be defined in S3ClientConfig'); | |
| } | |
| const { accessKeyId, secretAccessKey } = config; | |
| return { | |
| accessKeyId, | |
| secretAccessKey | |
| }; | |
| } |
I did not find any logic of validation of the keys anywhere in the teraslice repo or spaces.