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

Allow brokered ElasticSearch clusters to write to CloudWatch #1633

Merged
merged 1 commit into from Apr 16, 2024

Conversation

jameshochadel
Copy link
Contributor

Without one policy that applies to all log groups, we must create one-off policies for each cluster + log group, and we quickly hit the quota of ten policies per account. See the "Important" callout here: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createdomain-configure-slow-logs.html#createdomain-configure-slow-logs-console

Related ticket: https://cloud-gov-new.zendesk.com/agent/tickets/8298

Example code from https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_resource_policy#example-usage

security considerations

Allows the ElasticSearch service to write to all log groups in CloudWatch. Because ElasticSearch logging can only be configured by cloud.gov staff, and there was no way to limit the principal so that clusters could only write to their own log groups in the first place, this is a lateral security move.

@jameshochadel jameshochadel requested a review from a team April 16, 2024 15:05
Copy link
Contributor

@hursey013 hursey013 left a comment

Choose a reason for hiding this comment

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

👍

@jameshochadel jameshochadel merged commit 5c1364a into main Apr 16, 2024
3 checks passed
@jameshochadel jameshochadel deleted the es-to-cloudwatch-logs branch April 16, 2024 15:37
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.

None yet

2 participants