turbot / steampipe-plugin-okta

Use SQL to instantly query users, groups, applications and more from Okta. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/okta
Apache License 2.0
8 stars 4 forks source link

Add table okta_idp_discovery_policy closes #21 #25

Closed ParthaI closed 3 years ago

ParthaI commented 3 years ago

Integration test logs

Logs ``` Add passing integration test logs here ```

Example query results

Results ### Basic info ```sql select name, id, created, status, priority, system from okta_idp_discovery_policy order by priority; ``` ``` +----------------------+----------------------+---------------------+--------+----------+--------+ | name | id | created | status | priority | system | +----------------------+----------------------+---------------------+--------+----------+--------+ | Idp Discovery Policy | 00p1e5eiytPPOPCft5d7 | 2021-08-02 10:57:03 | ACTIVE | 1 | true | +----------------------+----------------------+---------------------+--------+----------+--------+ ``` ### List system idp discovery policies ```sql select name, id, created, status, priority, system from okta_idp_discovery_policy where system; ``` ``` +----------------------+----------------------+---------------------+--------+----------+--------+ | name | id | created | status | priority | system | +----------------------+----------------------+---------------------+--------+----------+--------+ | Idp Discovery Policy | 00p1e5eiytPPOPCft5d7 | 2021-08-02 10:57:03 | ACTIVE | 1 | true | +----------------------+----------------------+---------------------+--------+----------+--------+ ``` ### Get rules details for each idp discovery policy ```sql 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_conditions from okta_idp_discovery_policy, jsonb_array_elements(rules) as r; ``` ``` +----------------------+----------------------+----------------+-------------+-------------+---------------+--------------------------------+----------------------------------+ | name | id | rule_name | rule_system | rule_status | rule_priority | rule_actions | rule_conditions | +----------------------+----------------------+----------------+-------------+-------------+---------------+--------------------------------+----------------------------------+ | Idp Discovery Policy | 00p1e5eiytPPOPCft5d7 | "Default Rule" | true | "ACTIVE" | 1 | { | { | | | | | | | | "idp": { | "app": { | | | | | | | | "providers": [ | "exclude": [ | | | | | | | | { | ], | | | | | | | | "type": "OKTA" | "include": [ | | | | | | | | } | ] | | | | | | | | ] | }, | | | | | | | | } | "network": { | | | | | | | | } | "connection": "ANYWHERE" | | | | | | | | | }, | | | | | | | | | "platform": { | | | | | | | | | "exclude": [ | | | | | | | | | ], | | | | | | | | | "include": [ | | | | | | | | | ] | | | | | | | | | }, | | | | | | | | | "userIdentifier": { | | | | | | | | | "patterns": [ | | | | | | | | | ] | | | | | | | | | } | | | | | | | | | } | +----------------------+----------------------+----------------+-------------+-------------+---------------+--------------------------------+----------------------------------+ ```