turbot/gcp_compliance

Query: iam_api_key_age_90

Usage

powerpipe query gcp_compliance.query.iam_api_key_age_90

Steampipe Tables

SQL

select
'https://iam.googleapis.com/v1/projects/' || project || '/apikeys/' || name as resource,
case
when create_time <= (current_date - interval '90' day) then 'alarm'
else 'ok'
end as status,
display_name || ' ' || uid || ' created ' || to_char(create_time , 'DD-Mon-YYYY') ||
' (' || extract(day from current_timestamp - create_time) || ' days).'
as reason
, project as project
from
gcp_apikeys_key;

Controls

The query is being used by the following controls: