Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table okta_mfa_policy closes #12 #26

Merged
merged 9 commits into from
Aug 31, 2021
Merged

Add table okta_mfa_policy closes #12 #26

merged 9 commits into from
Aug 31, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 25, 2021

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results

Basic info

select
  name,
  id,
  created,
  status,
  priority,
  system
from
  okta_mfa_policy
order by
  priority;
+----------------+----------------------+---------------------+--------+----------+--------+
| name           | id                   | created             | status | priority | system |
+----------------+----------------------+---------------------+--------+----------+--------+
| Default Policy | 00p1e5eixp8EMqoom5d7 | 2021-08-02 10:57:01 | ACTIVE | 1        | true   |
+----------------+----------------------+---------------------+--------+----------+--------+

List system mfa policies

select
  name,
  id,
  created,
  status,
  priority,
  system
from
  okta_mfa_policy
where
  system;
+----------------+----------------------+---------------------+--------+----------+--------+
| name           | id                   | created             | status | priority | system |
+----------------+----------------------+---------------------+--------+----------+--------+
| Default Policy | 00p1e5eixp8EMqoom5d7 | 2021-08-02 10:57:01 | ACTIVE | 1        | true   |
+----------------+----------------------+---------------------+--------+----------+--------+

Get rules details for each mfa policy

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_mfa_policy,
  jsonb_array_elements(rules) as r;
+----------------+----------------------+----------------+-------------+-------------+---------------+-----------------------------+----------------------------------+
| name           | id                   | rule_name      | rule_system | rule_status | rule_priority | rule_actions                | rule_conditions                  |
+----------------+----------------------+----------------+-------------+-------------+---------------+-----------------------------+----------------------------------+
| Default Policy | 00p1e5eixp8EMqoom5d7 | "Enforce MFA"  | false       | "ACTIVE"    | 1             | {                           | {                                |
|                |                      |                |             |             |               |     "enroll": {             |     "people": {                  |
|                |                      |                |             |             |               |         "self": "CHALLENGE" |         "users": {               |
|                |                      |                |             |             |               |     }                       |             "exclude": [         |
|                |                      |                |             |             |               | }                           |             ]                    |
|                |                      |                |             |             |               |                             |         }                        |
|                |                      |                |             |             |               |                             |     },                           |
|                |                      |                |             |             |               |                             |     "network": {                 |
|                |                      |                |             |             |               |                             |         "connection": "ANYWHERE" |
|                |                      |                |             |             |               |                             |     }                            |
|                |                      |                |             |             |               |                             | }                                |
| Default Policy | 00p1e5eixp8EMqoom5d7 | "Default Rule" | true        | "ACTIVE"    | 2             | {                           | {                                |
|                |                      |                |             |             |               |     "enroll": {             |     "people": {                  |
|                |                      |                |             |             |               |         "self": "CHALLENGE" |         "users": {               |
|                |                      |                |             |             |               |     }                       |             "exclude": [         |
|                |                      |                |             |             |               | }                           |             ]                    |
|                |                      |                |             |             |               |                             |         }                        |
|                |                      |                |             |             |               |                             |     },                           |
|                |                      |                |             |             |               |                             |     "network": {                 |
|                |                      |                |             |             |               |                             |         "connection": "ANYWHERE" |
|                |                      |                |             |             |               |                             |     }                            |
|                |                      |                |             |             |               |                             | }                                |
+----------------+----------------------+----------------+-------------+-------------+---------------+-----------------------------+----------------------------------+

@ParthaI ParthaI requested a review from LalitLab August 25, 2021 10:42
@ParthaI ParthaI self-assigned this Aug 25, 2021
@ParthaI ParthaI linked an issue Aug 25, 2021 that may be closed by this pull request
Copy link
Contributor

@LalitLab LalitLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LalitLab LalitLab merged commit e6008ec into main Aug 31, 2021
@LalitLab LalitLab deleted the issue-12 branch August 31, 2021 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table okta_mfa_policy
2 participants