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

Add bucket owner support to s3 sink #4504

Merged
merged 2 commits into from
May 8, 2024

Conversation

graytaylor0
Copy link
Member

@graytaylor0 graytaylor0 commented May 6, 2024

Description

Similar to the S3 source, the S3 sink now has default_bucket_owner and bucket_owners map to be passed to the expectedBucketOwner of the S3 sink requests. This is to prevent sending to this bucket if the owner of the bucket changes.

Issues Resolved

Resolves #4468

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

return roleArn.accountId().get();
}

return null;
Copy link
Member

Choose a reason for hiding this comment

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

when will this be null ? Looks like StaticBucketOwnerProvider will throw NPE when account is null. Is this user error in the role ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. I can just change it to throw exception

Signed-off-by: Taylor Gray <tylgry@amazon.com>
Signed-off-by: Taylor Gray <tylgry@amazon.com>
@graytaylor0 graytaylor0 merged commit f5b0fee into opensearch-project:main May 8, 2024
44 of 47 checks passed
@graytaylor0 graytaylor0 deleted the BucketOwnerS3Sink branch May 8, 2024 18:28
@kkondaka kkondaka added this to the v2.8 milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support S3 bucket ownership validation on the S3 sink
3 participants