-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Errors in async init are not reported in interactive client if a quer…
…y is entered before init is complete. Closes #843
- Loading branch information
1 parent
58f4b07
commit 1f0ae2b
Showing
3 changed files
with
10 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,9 @@ | ||
query "expired_access_keys" { | ||
query "bad_query" { | ||
sql = <<-EOT | ||
select | ||
akas ->> 0 as resource, | ||
case | ||
when create_date > NOW() - ($1 || ' days')::interval then 'ok' | ||
else 'alarm' | ||
end as status, | ||
access_key_id || 'for user ' || user_name || ' is ' || age(create_date) || ' old.' as reason, | ||
region, | ||
account_id | ||
from | ||
aws_iam_access_key | ||
this is invalid | ||
EOT | ||
param "max_days" { | ||
description = "The maximum number of days a key is allowed to exist after it is created." | ||
default = 90 | ||
} | ||
} | ||
|
||
control "expired_access_keys" { | ||
title = "Expired IAM Access Keys" | ||
query = query.expired_access_keys | ||
args = { | ||
"max_days" = 365 | ||
param "tag_keys" { | ||
default = "true" | ||
} | ||
} |