Table: prismacloud_iam_user - Query Prisma Cloud users using SQL
The Prisma Cloud user table in Steampipe provides you with information about users within Prisma Cloud. This table allows you, as a security engineer or cloud administrator, to query user-specific details, including username, roles, access keys, and more. You can utilize this table to gather insights on users, such as their access key status, roles, and more. The schema outlines the various attributes of the Prisma Cloud user for you, including the user's ID, name, and email address.
Table Usage Guide
The prismacloud_iam_user
table in Steampipe provides information about users within Prisma Cloud. This table allows you to query details such as the user's username, roles, access keys, and more, enabling you to manage and monitor your users effectively.
Examples
Basic Info
Retrieve basic information about Prisma Cloud users, such as username, email, and roles. This query helps you to understand the overall configuration and details of your users.
select username, email, rolesfrom prismacloud_iam_user;
select username, email, rolesfrom prismacloud_iam_user;
List of enabled users
Get a list of all enabled Prisma Cloud users. This is useful for identifying which user accounts are currently active.
select username, email, enabledfrom prismacloud_iam_userwhere enabled = true;
select username, email, enabledfrom prismacloud_iam_userwhere enabled = 1;
Users with access keys allowed
Identify users that are allowed to have access keys. This helps in tracking access key usage and permissions.
select username, email, access_keys_allowedfrom prismacloud_iam_userwhere access_keys_allowed = true;
select username, email, access_keys_allowedfrom prismacloud_iam_userwhere access_keys_allowed = 1;
Users with expiring access keys
Retrieve users whose access keys are expiring soon. This helps in managing and rotating access keys proactively.
select username, email, access_key_name, access_key_expirationfrom prismacloud_iam_userwhere access_key_expiration < extract( epoch from now() ) + 2592000;
select username, email, access_key_name, access_key_expirationfrom prismacloud_iam_userwhere access_key_expiration < strftime('%s', 'now') + 2592000;
Users and their roles
Get a list of users along with their assigned roles. This can help in understanding the role assignments within your cloud environment.
select username, email, role_idsfrom prismacloud_iam_user;
select username, email, role_idsfrom prismacloud_iam_user;
Schema for prismacloud_iam_user
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
access_key_expiration | timestamp with time zone | Expiration time of the access key. | |
access_key_name | text | Name of the access key. | |
access_keys_allowed | boolean | Whether access keys are allowed for the user. | |
access_keys_count | bigint | Count of access keys associated with the user. | |
account_type | text | Type of the account. | |
default_role_id | text | Default role ID assigned to the user. | |
display_name | text | Display name of the user. | |
text | =, !=, ~~, ~~*, !~~, !~~* | Email address of the user. | |
enable_key_expiration | boolean | Whether key expiration is enabled. | |
enabled | boolean | Whether the profile is enabled. | |
first_name | text | First name of the user. | |
last_login_ts | timestamp with time zone | Timestamp of the last login. | |
last_modified_by | text | Identifier of the user who last modified the profile. | |
last_modified_ts | timestamp with time zone | Timestamp of the last modification. | |
last_name | text | Last name of the user. | |
role_ids | jsonb | List of role IDs assigned to the user. | |
roles | jsonb | Roles assigned to the user. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
time_zone | text | Time zone of the user. | |
title | text | Title of the profile. | |
username | text | Username associated with the profile. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- prismacloud
You can pass the configuration to the command with the --config
argument:
steampipe_export_prismacloud --config '<your_config>' prismacloud_iam_user