turbot/oci_compliance

Query: identity_user_customer_secret_key_age_90

Usage

powerpipe query oci_compliance.query.identity_user_customer_secret_key_age_90

SQL

select
id as resource,
case
when lifecycle_state = 'ACTIVE'
and (date(current_timestamp) - date(time_created)) >= 90 then 'alarm'
else 'ok'
end as status,
user_name || ' ' || display_name || ' created ' || to_char(time_created, 'DD-Mon-YYYY') || ' (' || extract(
day
from
current_timestamp - time_created
) || ' days).' as reason,
tenant_name as tenant
from
oci_identity_customer_secret_key;

Controls

The query is being used by the following controls: