issues
search
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 `Profile` column to okta_app_assigned_group. Closes #57
#58
Closed
c0d3r-arnab
closed
2 years ago
c0d3r-arnab
commented
2 years ago
Example query results
Results
``` > select grp.name as name, grp.description as description, jsonb_pretty(grp.group_members) as group_members from okta_group grp full outer join okta_app_assigned_group ag on grp.id = ag.id where grp.id is null or ag.id is null; +-----------+--------------------------------+----------------------------------------+ | name | description | group_members | +-----------+--------------------------------+----------------------------------------+ | Everyone | All users in your organization | [ | | | | { | | | | "id": "00u1kcigdvWtR96HY5d7", | | | | "email": "arnab@turbot.com", | | | | "login": "arnab@turbot.com" | | | | }, | | | | { | | | | "id": "00u33m8oarePFyaTm5d7", | | | | "email": "arnabg57@gmail.com", | | | | "login": "arnabg57@gmail.com" | | | | }, | | | | { | | | | "id": "00u3e9oo5e7hR6X815d7", | | | | "email": "testUser@gmail.com", | | | | "login": "testUser@gmail.com" | | | | } | | | | ] | | TestGroup | This is a test group | [ | | | | { | | | | "id": "00u33m8oarePFyaTm5d7", | | | | "email": "arnabg57@gmail.com", | | | | "login": "arnabg57@gmail.com" | | | | } | | | | ] | +-----------+--------------------------------+----------------------------------------+ > select app.name as app_name, app.id as app_id, app.created as app_created, app.status as app_status, ag.id as group_id, grp.name as group_name, grp.description as group_description, jsonb_pretty(grp.group_members) as group_members from okta_application app left join okta_app_assigned_group ag on app.id = ag.app_id left join okta_group grp on ag.id = grp.id; +---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+ | app_name | app_id | app_created | app_status | group_id | group_name | group_description | group_members | +---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+ | okta_enduser | 0oa1kchdrfcXTbEzV5d7 | 2021-08-26T09:56:36+05:30 | ACTIVE |
|
|
|
| | oidc_client | 0oa1mf49z9iZurdzA5d7 | 2021-08-31T18:01:44+05:30 | ACTIVE |
|
|
|
| | okta_browser_plugin | 0oa1kcigd9Kob07k05d7 | 2021-08-26T09:56:36+05:30 | ACTIVE |
|
|
|
| | saasure | 0oa1kchdmerpZir9y5d7 | 2021-08-26T09:56:28+05:30 | ACTIVE |
|
|
|
| | oidc_client | 0oa1mf9l3dw26foa25d7 | 2021-08-31T18:16:30+05:30 | ACTIVE | 00g3e9b6esCUiHSkK5d7 | Another Group | This is another group | [ | | | | | | | | | { | | | | | | | | | "id": "00u33m8oarePFyaTm5d7", | | | | | | | | | "email": "arnabg57@gmail.com", | | | | | | | | | "login": "arnabg57@gmail.com" | | | | | | | | | } | | | | | | | | | ] | +---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+ > select id as group_id, app_id, last_updated, priority from okta_app_assigned_group; +----------------------+----------------------+---------------------------+----------+ | group_id | app_id | last_updated | priority | +----------------------+----------------------+---------------------------+----------+ | 00g3e9b6esCUiHSkK5d7 | 0oa1mf9l3dw26foa25d7 | 2022-01-17T13:21:17+05:30 | 1 | +----------------------+----------------------+---------------------------+----------+ ```
Example query results
Results
``` > select grp.name as name, grp.description as description, jsonb_pretty(grp.group_members) as group_members from okta_group grp full outer join okta_app_assigned_group ag on grp.id = ag.id where grp.id is null or ag.id is null; +-----------+--------------------------------+----------------------------------------+ | name | description | group_members | +-----------+--------------------------------+----------------------------------------+ | Everyone | All users in your organization | [ | | | | { | | | | "id": "00u1kcigdvWtR96HY5d7", | | | | "email": "arnab@turbot.com", | | | | "login": "arnab@turbot.com" | | | | }, | | | | { | | | | "id": "00u33m8oarePFyaTm5d7", | | | | "email": "arnabg57@gmail.com", | | | | "login": "arnabg57@gmail.com" | | | | }, | | | | { | | | | "id": "00u3e9oo5e7hR6X815d7", | | | | "email": "testUser@gmail.com", | | | | "login": "testUser@gmail.com" | | | | } | | | | ] | | TestGroup | This is a test group | [ | | | | { | | | | "id": "00u33m8oarePFyaTm5d7", | | | | "email": "arnabg57@gmail.com", | | | | "login": "arnabg57@gmail.com" | | | | } | | | | ] | +-----------+--------------------------------+----------------------------------------+ > select app.name as app_name, app.id as app_id, app.created as app_created, app.status as app_status, ag.id as group_id, grp.name as group_name, grp.description as group_description, jsonb_pretty(grp.group_members) as group_members from okta_application app left join okta_app_assigned_group ag on app.id = ag.app_id left join okta_group grp on ag.id = grp.id; +---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+ | app_name | app_id | app_created | app_status | group_id | group_name | group_description | group_members | +---------------------+----------------------+---------------------------+------------+----------------------+---------------+-----------------------+----------------------------------------+ | okta_enduser | 0oa1kchdrfcXTbEzV5d7 | 2021-08-26T09:56:36+05:30 | ACTIVE |