-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[access-graph] extract S3 bucket tags #45364
Conversation
This PR extracts the AWS bucket tags by calling `GetBucketTagging`. Part of gravitational/access-graph#898 Signed-off-by: Tiago Silva <[email protected]>
🤖 Vercel preview here: https://docs-4xvesp8lp-goteleport.vercel.app/docs/ver/preview |
@@ -155,6 +155,7 @@ The IAM policy includes the following directives: | |||
"s3:GetBucketPolicy", | |||
"s3:ListBucket", | |||
"s3:GetBucketLocation", | |||
"s3:GetBucketTagging", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog should probably mention something about this new requirement, otherwise self-hosted users won't know they need to update their permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is yet being used but added a note to changelog.
@@ -107,8 +109,22 @@ func (a *awsFetcher) fetchS3Buckets(ctx context.Context) ([]*accessgraphv1alpha. | |||
if err != nil { | |||
collect(nil, trace.Wrap(err, "failed to fetch bucket %q acls policies", aws.ToString(bucket.Name))) | |||
} | |||
|
|||
tagsOutput, err := s3Client.GetBucketTaggingWithContext(ctx, &s3.GetBucketTaggingInput{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we test this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in f0dcf3c
🤖 Vercel preview here: https://docs-lgomb5eb4-goteleport.vercel.app/docs/ver/preview |
🤖 Vercel preview here: https://docs-9sk0xmmp5-goteleport.vercel.app/docs/ver/preview |
This PR extracts the AWS bucket tags by calling
GetBucketTagging
.Part of https://github.com/gravitational/access-graph/issues/898
Changelog: Added support for importing S3 Bucket Tags into Teleport Policy's Access Graph. For existing configurations, ensure that the
s3:GetBucketTagging
permission is manually included in the Teleport Access Graph integration role.