turbot/ibm_compliance

Query: iam_account_owner_no_api_key

Usage

powerpipe query ibm_compliance.query.iam_account_owner_no_api_key

SQL

select
acc.guid as resource,
case
when count(key.iam_id) > 0 then 'alarm'
else 'ok'
end as status,
case
when count(key.iam_id) > 0 then 'Account owner API keys exist.'
else 'No account owner API keys exist.'
end as reason,
acc.guid
from
ibm_account as acc,
ibm_iam_api_key as key
where
acc.owner_unique_id = split_part(key.iam_id, '-', 2)
group by
acc.guid;

Controls

The query is being used by the following controls: