Add Google Chat webhook support for exposed API key alerts. While we're in the area also do some refactoring and general improvements for the Google Chat webhook.
Types of changes
What types of changes does your code introduce to this repository?
[x] New feature (non-breaking change which adds functionality)
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
[x] Lint and unit tests pass locally with my changes (if applicable)
[x] I have run pre-commit (pre-commit in the repo)
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)
[ ] Linked to the relevant github issue or github discussion
Further comments
I tested the changes to the Google Chat webhook by creating a new AWS API key token, triggering it normally and manually creating an exposed key alert with CURL (with 25 Dec as the exposed time) and checked that all three Google chat messages displayed correctly.
An example of the current (before this change) Google Chat message format is shown below.
Proposed changes
Add Google Chat webhook support for exposed API key alerts. While we're in the area also do some refactoring and general improvements for the Google Chat webhook.
Types of changes
What types of changes does your code introduce to this repository?
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.pre-commit
in the repo)Further comments
I tested the changes to the Google Chat webhook by creating a new AWS API key token, triggering it normally and manually creating an exposed key alert with CURL (with 25 Dec as the exposed time) and checked that all three Google chat messages displayed correctly.
An example of the current (before this change) Google Chat message format is shown below.