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_network_zone closes #13 #29

Merged
merged 3 commits into from
Sep 1, 2021
Merged

Add table okta_network_zone closes #13 #29

merged 3 commits into from
Sep 1, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 26, 2021

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results

Basic info

select
  name,
  id,
  created,
  status,
  system,
  locations,
  proxy_type,
  usage
from
  okta_network_zone;
+---------------+----------------------+---------------------+--------+--------+-----------------------------------------------------------------------------------------+---------------+-----------+
| name          | id                   | created             | status | system | locations                                                                               | proxy_type    | usage     |
+---------------+----------------------+---------------------+--------+--------+-----------------------------------------------------------------------------------------+---------------+-----------+
| BlockedIpZone | nzo1kcfw1rkgD4Ctm5d7 | 2021-08-26 04:22:51 | ACTIVE | true   | <null>                                                                                  |               | BLOCKLIST |
| ind-022       | nzo1kefi33MO8ZrK85d7 | 2021-08-26 06:34:25 | ACTIVE | false  | [{"country":"AF","region":"AF-BAL"},{"country":"AS"},{"country":"AU","region":"AU-NT"}] | TorAnonymizer | POLICY    |
| LegacyIpZone  | nzo1kcfw1qwLaONDt5d7 | 2021-08-26 04:22:51 | ACTIVE | true   | <null>                                                                                  |               | POLICY    |
+---------------+----------------------+---------------------+--------+--------+-----------------------------------------------------------------------------------------+---------------+-----------+

List TorAnonymizer proxy type network zone

select
  name,
  id,
  created,
  status,
  system,
  proxy_type
from
  okta_network_zone
where
  proxy_type = 'TorAnonymizer';
+---------+----------------------+---------------------+--------+--------+---------------+
| name    | id                   | created             | status | system | proxy_type    |
+---------+----------------------+---------------------+--------+--------+---------------+
| ind-022 | nzo1kefi33MO8ZrK85d7 | 2021-08-26 06:34:25 | ACTIVE | false  | TorAnonymizer |
+---------+----------------------+---------------------+--------+--------+---------------+

List network zones location and region details

select
  name,
  id,
  l -> 'country' as country,
  l -> 'region' as region
from
  okta_network_zone,
  jsonb_array_elements(locations) as l;
+---------+----------------------+---------+----------+
| name    | id                   | country | region   |
+---------+----------------------+---------+----------+
| ind-022 | nzo1kefi33MO8ZrK85d7 | "AF"    | "AF-BAL" |
| ind-022 | nzo1kefi33MO8ZrK85d7 | "AS"    | <null>   |
| ind-022 | nzo1kefi33MO8ZrK85d7 | "AU"    | "AU-NT"  |
+---------+----------------------+---------+----------+

@ParthaI ParthaI requested a review from LalitLab August 26, 2021 12:55
@ParthaI ParthaI self-assigned this Aug 26, 2021
@ParthaI ParthaI linked an issue Aug 26, 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.

@ParthaI
Have you tried this table with the Private Key method of authentication?
It will require a scope to access respective APIs -- Please add the required scope into table docs/index.md and plugin code
https://github.com/turbot/steampipe-plugin-okta/blame/main/docs/index.md#L84

Can refer https://developer.okta.com/docs/guides/implement-oauth-for-okta/scopes/ for further reading on Okta API scopes

@ParthaI
Copy link
Contributor Author

ParthaI commented Aug 31, 2021

@ParthaI
Have you tried this table with the Private Key method of authentication?
It will require a scope to access respective APIs -- Please add the required scope into table docs/index.md and plugin code
https://github.com/turbot/steampipe-plugin-okta/blame/main/docs/index.md#L84

Can refer https://developer.okta.com/docs/guides/implement-oauth-for-okta/scopes/ for further reading on Okta API scopes

@LalitTurbot I couldn't find any Okta API scope for the network zone
https://developer.okta.com/docs/guides/implement-oauth-for-okta/scopes/

@LalitLab LalitLab merged commit 7410a2c into main Sep 1, 2021
@LalitLab LalitLab deleted the issue-13 branch September 1, 2021 06:53
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_network_zone
2 participants