-
Notifications
You must be signed in to change notification settings - Fork 516
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
tuf repo canary: Adds canary client, dockerfile, cloudformation template #490
Conversation
d5cff5d
to
48b0fa6
Compare
extras/repo-canary/src/main.rs
Outdated
} | ||
|
||
/// Retrieves all targets listed in the TUF repo and monitor for any errors | ||
fn retrieve_all_targets(repo: &Repository<'_>) -> Result<()> { |
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.
As a side note, this could become a relatively expensive operation in the future. Our TUF repo is already about 1GB. Not a problem at the moment but depending on where or how often this canary is running maybe we should look at doing incremental checks as well.
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.
Tried addressing this with a new --percentage-of-targets-to-retrieve
option.
48b0fa6
to
366f587
Compare
Addresses subset of @sam-aws 's comments: Adds new option to |
befa1a3
to
4d99742
Compare
Addresses @zmrow 's comment. Updated so there's only one explicit call to |
4d99742
to
ae05cfa
Compare
Addresses @iliana 's comments. Representing custom exit codes via constants. |
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.
Just a few comments!
I like the cleanup of the exit codes!
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.
🦃
ae05cfa
to
c3a4326
Compare
Adds a new cloudwatch alarm for actually monitoring for task start failures (e.g. no memory, failed to pull container from ECR) and not just invocation failures (IAM role permission issues). |
Just merged #496 with the error variant rename I mentioned in IRC, so you'll want to rebase. |
c3a4326
to
71f5a3b
Compare
Rebase develop to bring in new Also adds separate log groups for different event rules. |
577bd8b
to
2c5dca0
Compare
Fixed some cloudformation event rules that weren't logging anything :/ Gah! Had a typo. Fixed typo in the push below |
2c5dca0
to
cb3e884
Compare
e0e1127
to
4a997ff
Compare
Referencing |
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.
🔍
4a997ff
to
6fd08d1
Compare
Updated the period of the event rules to every 10 minutes |
6fd08d1
to
6844fb6
Compare
Adds repo-canary client for validating TUF repo metadata files and downloads all listed targets. Adds Dockerfile for building the repo-canary container image Adds cloudformation template for setting up the TUF repo canary task, rules, alarms
6844fb6
to
aee03c0
Compare
Relocated the |
Issue #, if available: Fixes #456
Description of changes:
Adds repo-canary client for retrieving & validating TUF repo metadata files and listed target files
Adds Dockerfile for building the repo-canary container image. Currently just directly mapping in the repo-canary client binary and the trusted
root.json
.Adds Cloudformation template for setting up the TUF repo canary task, rules, alarms
Testing:
To build the tuf-repo-canary image, the repo-canary binary needs to first be built:
cargo install --path . --force
And the metadata url and targets url need to be specified through
build-args
:Tested
repo-canary
locally and the sampled targets are reasonably random:Tested the Cloudformation stack and verified alarms by triggering alarms manually.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.