Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Client-Side Monitoring on AWS storage #21406

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Jun 15, 2020

The S3 client enables this by default and then tries to read
.aws/config. This causes open_basedir restriction related error for
some setups. So this patch disables the CSM because it's most likely
unused anyway.

⚠️ Due to the lack of a local s3 system I did not test this patch ⚠️

Ref aws/aws-sdk-php#1659 (comment)
Ref aws/aws-sdk-php#1931

The S3 client enables this by default and then tries to read
`.aws/config`. This causes `open_basedir` restriction related error for
some setups. So this patch disables the CSM because it's most likely
unused anyway.

Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst
Copy link
Member Author

/backport to stable19

@ChristophWurst
Copy link
Member Author

/backport to stable18

Copy link
Member

@georgehrke georgehrke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, didn't test due to lack of S3 either.

@juliushaertl
Copy link
Member

Did some quick smoke test with minio and still seems to work without issues.

Copy link
Contributor

@FlorentCoppint FlorentCoppint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is good, but I'm using S3 as primary storage and I don't have open_basedir errors.

It seems that "false" is the default option value : https://github.com/aws/aws-sdk-php/blob/master/src/AwsClient.php#L74

@ChristophWurst ChristophWurst merged commit 6328053 into master Jun 17, 2020
@ChristophWurst ChristophWurst deleted the fix/aws-disable-csm branch June 17, 2020 08:58
MorrisJobke pushed a commit that referenced this pull request May 20, 2021
When using S3 storage, we sometimes have open_basedir errors due to aws-sdk-php trying to read ~/.aws/config which is out of open_basedir restrictions.
Christoph Wurst already added csm=false config in #21406 but it wasn't enough, we also need to set use_arn_region=false, added in this commit.

Signed-off-by: Florent <[email protected]>
backportbot-nextcloud bot pushed a commit that referenced this pull request May 25, 2021
When using S3 storage, we sometimes have open_basedir errors due to aws-sdk-php trying to read ~/.aws/config which is out of open_basedir restrictions.
Christoph Wurst already added csm=false config in #21406 but it wasn't enough, we also need to set use_arn_region=false, added in this commit.

Signed-off-by: Florent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants