Skip to content

S3 connector can't read from public s3-compatible object stores #1158

@sotojn

Description

@sotojn

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions