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

[aws]Add support for access point in aws integration #41494

Open
narph opened this issue Oct 8, 2024 · 2 comments · May be fixed by #41495
Open

[aws]Add support for access point in aws integration #41494

narph opened this issue Oct 8, 2024 · 2 comments · May be fixed by #41495
Assignees
Labels
Team:Security-Service Integrations Security Service Integrations Team

Comments

@narph
Copy link
Contributor

narph commented Oct 8, 2024

Trying to use an access point as the bucket ARN in the S3 integration triggers the following permission issue:

expected: arn:aws:s3:::some-name-here
Access Point: arn:aws:s3:us-east-....[REDACTED]/[REDACTED]

Input 'aws-s3' failed with: failed to initialize s3 poller: failed to get AWS region for bucket: operation error S3: GetBucketLocation, https response error StatusCode: 403, RequestID: [REDACTED], HostID: [REDACTED], api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
The aws integration does not expect the Access Point (https://aws.amazon.com/s3/features/access-points/) format in the bucket ARN parameter atm.

@narph narph added the Team:Security-Service Integrations Security Service Integrations Team label Oct 8, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@narph narph changed the title Add support for access point in aws integration [aws]Add support for access point in aws integration Oct 8, 2024
@chemamartinez chemamartinez transferred this issue from elastic/integrations Oct 31, 2024
@chemamartinez chemamartinez linked a pull request Oct 31, 2024 that will close this issue
6 tasks
@chemamartinez
Copy link
Contributor

chemamartinez commented Oct 31, 2024

Transferred to Beats repo as the fix is entirely attempted to be in the input side.

Already opened a draft PR with the proposed fix: #41495. Although I am still working on an issue with the bucket region when reading from the bucket:

{"log.level":"warn","@timestamp":"2024-10-31T13:13:13.638+0100","log.logger":"input.aws-s3.s3","log.origin":{"function":"github.com/elastic/beats/v7/x-pack/filebeat/input/awss3.(*s3PollerInput).readerLoop","file.name":"awss3/s3_input.go","file.line":198},"message":"Error when paginating listing.","service.name":"filebeat","id":"[REDACTED]","error":{"message":"operation error S3: ListObjectsV2, https response error StatusCode: 400, RequestID: [REDACTED], HostID: [REDACTED], api error AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2'"},"ecs.version":"1.6.0"}

After fixing it and adding tests, it should be ready.

The current solution uses the current Bucket ARN config option to support Access Points. The advantage of this approach is that no changes are needed at integrations to get this working, apart from extending the documentation to let users know that Access Point ARN are also supported.

On the other hand, introducing Access Point ARN as a separate config option might be more self-explanatory for users.

Update

It has been finally decided to include it as a new setting so users are more aware of the possibility of using Access Points, and makes the options easier to understand. A new issue has been opened at the integrations repo to add this new options to the affected integrations once it gets merged: elastic/integrations#11737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants