Table: oci_identity_group - Query OCI Identity Service Groups using SQL
Oracle Cloud Infrastructure (OCI) Identity and Access Management (IAM) service lets you control who has access to your cloud resources. You can control what type of access a group of users have and to which specific resources. This is fundamental to the security and compliance of your resources in OCI.
Table Usage Guide
The oci_identity_group
table provides insights into the groups within OCI Identity and Access Management (IAM). As a security analyst, you can explore group-specific details through this table, including the users that belong to a group, the policies attached to a group, and other associated metadata. Use it to discover information about groups, such as those with broad permissions, the relationships between users and groups, and to verify policy attachments.
Examples
Basic info
Explore which identity groups have been created in your OCI environment, along with their lifecycle states, to understand their current status and when they were established. This could be useful for auditing purposes or for maintaining an overview of your security settings.
select name, id, description, lifecycle_state, time_createdfrom oci_identity_group;
select name, id, description, lifecycle_state, time_createdfrom oci_identity_group;
List of Identity Groups which are not in Active state
Discover the segments that consist of identity groups not currently in an active state. This is beneficial in identifying and managing inactive groups within your Oracle Cloud Infrastructure.
select name, id, lifecycle_statefrom oci_identity_groupwhere lifecycle_state <> 'ACTIVE';
select name, id, lifecycle_statefrom oci_identity_groupwhere lifecycle_state <> 'ACTIVE';
List of Identity Groups without application tag key
Determine the areas in which identity groups lack an application tag key. This is useful for identifying potential gaps in your tagging strategy, helping to ensure all groups are properly categorized and managed.
select name, idfrom oci_identity_groupwhere not tags :: JSONB ? 'application';
select name, idfrom oci_identity_groupwhere json_extract(tags, '$.application') is null;
Query examples
- identity_group_count
- identity_group_input
- identity_group_lifecycle_state
- identity_group_user
- identity_groups_by_creation_month
- identity_groups_by_tenancy
- identity_groups_with_policy
- identity_groups_without_policies_count
- identity_groups_without_users
- identity_groups_without_users_count
- identity_policies_for_group
- identity_policies_for_identity_group
- identity_user_by_groups
- identity_user_group
- identity_user_not_attached_to_group
Control examples
- CIS v1.1.0 > 1 Identity and Access Management > 1.11 Ensure API keys are not created for tenancy administrator users
- CIS v1.2.0 > 1 Identity and Access Management > 1.11 Ensure API keys are not created for tenancy administrator users
- CIS v2.0.0 > 1 Identity and Access Management > 1.12 Ensure API keys are not created for tenancy administrator users
Schema for oci_identity_group
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
defined_tags | jsonb | Defined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources. | |
description | text | The OCID of the group. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the group. |
inactive_status | boolean | The detailed status of INACTIVE lifecycleState. | |
lifecycle_state | text | = | The group's current state. |
name | text | = | The name assign to the group during creation. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | Date and time the group was created. | |
title | text | Title of the resource. |
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)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_identity_group