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

[access-graph] extract S3 bucket tags #45364

Merged
merged 3 commits into from
Aug 16, 2024
Merged

[access-graph] extract S3 bucket tags #45364

merged 3 commits into from
Aug 16, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Aug 12, 2024

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.

This PR extracts the AWS bucket tags by calling `GetBucketTagging`.

Part of gravitational/access-graph#898

Signed-off-by: Tiago Silva <[email protected]>
Copy link

🤖 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",
Copy link
Collaborator

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.

Copy link
Contributor Author

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{
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we test this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in f0dcf3c

@tigrato tigrato removed the no-changelog Indicates that a PR does not require a changelog entry label Aug 13, 2024
Copy link

🤖 Vercel preview here: https://docs-lgomb5eb4-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-9sk0xmmp5-goteleport.vercel.app/docs/ver/preview

@tigrato tigrato enabled auto-merge August 16, 2024 07:51
@tigrato tigrato added this pull request to the merge queue Aug 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 16, 2024
@tigrato tigrato added this pull request to the merge queue Aug 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 16, 2024
@tigrato tigrato added this pull request to the merge queue Aug 16, 2024
Merged via the queue into master with commit 045880f Aug 16, 2024
38 checks passed
@tigrato tigrato deleted the tigrato/add-s3-tags branch August 16, 2024 08:41
@public-teleport-github-review-bot

@tigrato See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR
branch/v16 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants