Table: okta_idp_discovery_policy - Query Okta Identity Provider Discovery Policies using SQL
Okta Identity Provider Discovery is a feature that allows organizations to route users to different identity providers based on certain conditions. These conditions are defined in the Identity Provider Discovery Policy. This feature helps organizations manage multiple identity providers and control user access based on their attributes or group membership.
Table Usage Guide
The okta_idp_discovery_policy
table provides insights into the Identity Provider Discovery Policies within Okta. As a Security or IT administrator, explore policy-specific details through this table, including conditions, actions, and associated rules. Utilize it to uncover information about policies, such as those with specific conditions, the actions associated with each policy, and the verification of rules.
Examples
Basic info
Explore the priority-based arrangement of identity provider discovery policies in your system, which can help you understand their creation timelines, statuses, and associated identities for better management and security.
select name, id, created, status, priority, systemfrom okta_idp_discovery_policyorder by priority;
select name, id, created, status, priority, systemfrom okta_idp_discovery_policyorder by priority;
List system idp discovery policies
Explore the discovery policies in your system with this query. It helps you understand the priority and status of each policy, and when it was created, providing a comprehensive view of your system's identity provider (IdP) discovery policies.
select name, id, created, status, priority, systemfrom okta_idp_discovery_policywhere system;
select name, id, created, status, priority, systemfrom okta_idp_discovery_policywhere system;
List inactive idp discovery policies
Explore which IDP discovery policies are inactive. This can be useful for identifying policies that are no longer in use and may need to be updated or removed.
select name, id, created, status, priority, systemfrom okta_idp_discovery_policywhere status = 'INACTIVE';
select name, id, created, status, priority, systemfrom okta_idp_discovery_policywhere status = 'INACTIVE';
Get rules details for each idp discovery policy
Analyze the specifics of each identity provider discovery policy to gain insights into the rules applied, including their name, system, status, and priority. This can be useful in reviewing and managing your security configurations and policies.
select name, id, r -> 'name' as rule_name, r -> 'system' as rule_system, r -> 'status' as rule_status, r -> 'priority' as rule_priority, jsonb_pretty(r -> 'actions') as rule_actions, jsonb_pretty(r -> 'conditions') as rule_conditionsfrom okta_idp_discovery_policy, jsonb_array_elements(rules) as r;
select name, id, json_extract(r.value, '$.name') as rule_name, json_extract(r.value, '$.system') as rule_system, json_extract(r.value, '$.status') as rule_status, json_extract(r.value, '$.priority') as rule_priority, r.value as rule_actions, r.value as rule_conditionsfrom okta_idp_discovery_policy, json_each(rules) as r;
Schema for okta_idp_discovery_policy
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
conditions | jsonb | Conditions for Policy. | |
created | timestamp with time zone | Timestamp when the Policy was created. | |
description | text | Description of the Policy. | |
domain | text | =, !=, ~~, ~~*, !~~, !~~* | The okta domain name. |
id | text | Identifier of the Policy. | |
last_updated | timestamp with time zone | Timestamp when the Policy was last modified. | |
name | text | Name of the Policy. | |
priority | bigint | Priority of the Policy. | |
resource_mapping | jsonb | The resources that are mapped to the Policy. | |
rules | jsonb | Each Policy may contain one or more Rules. Rules, like Policies, contain conditions that must be satisfied for the Rule to be applied. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Status of the Policy: ACTIVE or INACTIVE. | |
system | boolean | This is set to true on system policies, which cannot be deleted. | |
title | text | The 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)" -- okta
You can pass the configuration to the command with the --config
argument:
steampipe_export_okta --config '<your_config>' okta_idp_discovery_policy