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

Route SNS notifications through a Lambda function #5246

Open
hannes-ucsc opened this issue May 26, 2023 · 1 comment
Open

Route SNS notifications through a Lambda function #5246

hannes-ucsc opened this issue May 26, 2023 · 1 comment
Labels
- [priority] Medium compliance [subject] Information and software security enh [type] New feature or request iceboxed [process] not planned in the near future infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team

Comments

@hannes-ucsc
Copy link
Member

hannes-ucsc commented May 26, 2023

In the past few months, the need to filter and route notifications published to the shared monitoring SNS topic has become evident. To solve #5236, for example, we want to suppress certain events originating from personal deployments. For #5043 we will need to filter/suppress AccessDenied events caused by malicious parties scanning the DB CloudFront distributions.

To satisfy these needs, we need to route all notifications through a Lambda function that we can then implement custom filtering logic in. For every event that is not filtered out, the Lambda function will then send an email to the the group. This will remove the need for confirming the subscription of the group email to the topic, which required manual intervention. However, it is not trivial to programmatically and reliably send email due to the various ant-spam protections in place these days.

We should use Amazon SES for sending email. SES requires that the email address in the from field of sent emails is verified or that the domain part of that email address is verified. We should use the Azul domain name of the main deployment as the domain of the sender. Terraform has a resource type for SES-verifying a domain and can provision the required TXT record in the domain's hosted zone.

This ticket is simply about replacing the built-in SNS email subscription with a Lambda function in the indexer app that 1) is called for every notification to the SNS topic and that 2) forwards that notification as an email to the group via SES.

@github-actions github-actions bot added the orange [process] Done by the Azul team label May 26, 2023
@hannes-ucsc hannes-ucsc changed the title Route SNS notifications through Lambda functions Route SNS notifications through a Lambda function Jun 1, 2023
@hannes-ucsc hannes-ucsc added enh [type] New feature or request debt [type] A defect incurring continued engineering cost infra [subject] Project infrastructure like CI/CD, build and deployment scripts compliance [subject] Information and software security and removed debt [type] A defect incurring continued engineering cost labels Jun 1, 2023
@hannes-ucsc hannes-ucsc removed their assignment Jun 1, 2023
@achave11-ucsc achave11-ucsc self-assigned this Jun 1, 2023
@achave11-ucsc achave11-ucsc added the - [priority] Medium label Jun 1, 2023
@bvizzier-ucsc
Copy link

@hannes-ucsc: "We have managed to whittle down the number of false alarms where things like permissions denied errors to a level where we can remove the threshold (from 12 to 0). The only type of alarm that we are still ignoring is vulnerabilities detected by AWS Inspector (it just sends out too many redundant notifications). We may be missing important critical vulnerabilities until we deal with them every two weeks. To mitigate that we watch out for wide spread critical vulnerabilities through other channels. Because of that we can icebox this feature."

@hannes-ucsc hannes-ucsc added the iceboxed [process] not planned in the near future label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- [priority] Medium compliance [subject] Information and software security enh [type] New feature or request iceboxed [process] not planned in the near future infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team
Projects
None yet
Development

No branches or pull requests

3 participants