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

additional bucket name validation for S3 bucket regex #20887

Merged

Conversation

ravinaik1312
Copy link
Contributor

@ravinaik1312 ravinaik1312 commented Sep 1, 2020

What does this PR do?

This is a bug fix when functionbeat errors out with a blanket error message. According to me, this error can be mitigated pretty early by validating the S3 bucket name by creating the regex patterns from the rules for bucket naming.
https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules

Why is it important?

This will restrict users from shooting themselves in their foot when they pass an incorrect bucket name in the functionbeat configuration.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files - no change to configuration file needed
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.~~ - haven't added to the changelog as this is just a bugfix, can do so if required

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 1, 2020
@ravinaik1312 ravinaik1312 force-pushed the bugfix/beats-17572-bucket-name-regex branch from cdaa69e to 34c4650 Compare September 1, 2020 07:34
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 1, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20887 updated]

  • Start Time: 2020-09-21T11:25:02.693+0000

  • Duration: 38 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 465
Skipped 6
Total 471

@ravinaik1312 ravinaik1312 force-pushed the bugfix/beats-17572-bucket-name-regex branch from 34c4650 to cb291e3 Compare September 1, 2020 07:38
@andresrc andresrc added the Team:Services (Deprecated) Label for the former Integrations-Services team label Sep 1, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 1, 2020
Copy link
Contributor

@kvch kvch left a comment

Choose a reason for hiding this comment

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

Thank you!

@kvch kvch merged commit 43354ff into elastic:master Sep 21, 2020
@kvch kvch added the needs_backport PR is waiting to be backported to other branches. label Sep 21, 2020
kvch pushed a commit to kvch/beats that referenced this pull request Sep 21, 2020
## What does this PR do?

This is a bug fix when functionbeat errors out with a blanket error message. According to me, this error can be mitigated pretty early by validating the S3 bucket name by creating the regex patterns from the rules for bucket naming.
https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules

## Why is it important?

This will restrict users from shooting themselves in their foot when they pass an incorrect bucket name in the functionbeat configuration.

## Related issues

Closes elastic#17572

(cherry picked from commit 43354ff)
@kvch kvch added v7.10.0 and removed needs_backport PR is waiting to be backported to other branches. labels Sep 21, 2020
kvch added a commit that referenced this pull request Sep 21, 2020
## What does this PR do?

This is a bug fix when functionbeat errors out with a blanket error message. According to me, this error can be mitigated pretty early by validating the S3 bucket name by creating the regex patterns from the rules for bucket naming.
https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules

## Why is it important?

This will restrict users from shooting themselves in their foot when they pass an incorrect bucket name in the functionbeat configuration.

## Related issues

Closes #17572

(cherry picked from commit 43354ff)

Co-authored-by: Ravi Naik <ravinaik1312@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Services (Deprecated) Label for the former Integrations-Services team v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Functionbeat] Wrong error message when using a bucket which doesn't exists in AWS
4 participants