turbot/steampipe-mod-alicloud-insights

Dashboard: AliCloud RAM User Detail

This dashboard answers the following questions for each user:

  • How is the user configured?
  • What relationships does the user have with other resources?
  • What tags are applied?
  • How many access keys does the user have?
  • How is the MFA configured?
  • What groups are associated with the user?
  • What are the policies associated with user?
This dashboard contains 2 cards, 1 flow, 1 graph, 1 input and 5 tables.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-alicloud-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select AliCloud RAM User Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run alicloud_insights.dashboard.ram_user_detail --share

Queries

This dashboard uses the the following queries:
-- Policies (attached to groups)
select
p.title as "Policy",
'Group: ' || g.title as "Via"
from
alicloud_ram_user as u,
alicloud_ram_policy as p,
jsonb_array_elements(u.groups) as user_groups
inner join alicloud_ram_group g on g.title = user_groups ->> 'GroupName',
jsonb_array_elements(g.attached_policy) as group_policy
where
group_policy ->> 'PolicyName' = p.title
and u.arn = $1
and u.account_id = split_part($1,':',4)
-- Policies (attached to user)
union select
p.title as "Policy",
'Attached to User' as "Via"
from
alicloud_ram_user as u,
jsonb_array_elements(u.attached_policy) as pol_arn,
alicloud_ram_policy as p
where
pol_arn ->> 'PolicyName' = p.title
and u.arn = $1
and u.account_id = split_part($1,':',4);

Tags