Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Add table turbot_active_grant closes #23 #24

Merged
merged 4 commits into from
Jan 24, 2022
Merged

Add table turbot_active_grant closes #23 #24

merged 4 commits into from
Jan 24, 2022

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Dec 15, 2021

Example query results

Results
> select
  grant_id,
  identity_status,
  identity_trunk_title,
  level_title,
  resource_trunk_title
from
  turbot_active_grant;
+-----------------+-----------------+------------------------------------------------------+-------------+--------------------------------------+
| grant_id        | identity_status | identity_trunk_title                                 | level_title | resource_trunk_title                 |
+-----------------+-----------------+------------------------------------------------------+-------------+--------------------------------------+
| 165127150928460 | Active          | Turbot > Google @ turbot.com > Puskar Basu           | Owner       | Turbot                               |
| 232513631394343 | Active          | Turbot > Google @ turbot.com > Partha Sarathi Behera | Operator    | Turbot > AWS Accounts > 828685001623 |
| 240323894253012 | Active          | Turbot > Google @ turbot.com > Ved Misra             | SuperUser   | Turbot > AWS Accounts                |
| 162654220386929 | Active          | Turbot > Google @ turbot.com > Cody Bruno            | Owner       | Turbot                               |
| 162687942600473 | Active          | Turbot > Google @ turbot.com > Victor Hadianto       | Owner       | Turbot                               |
| 161241086036962 | Active          | Turbot > Turbot Local > Turbot Admin                 | Owner       | Turbot                               |
| 228825782907553 | Active          | Turbot > Google @ turbot.com > Sourav Chakraborty    | ReadOnly    | Turbot                               |
| 241556185269454 | Inactive        | Turbot > Google @ turbot.com > Debabrat Nayak        | Metadata    | Turbot                               |
| 162199372503739 | Active          | Turbot > Turbot Local > Mike Burgess                 | Owner       | Turbot                               |
| 187951536899783 | Active          | Turbot > Google @ turbot.com > Rajesh Mohanty        | Owner       | Turbot                               |
| 162654220385904 | Active          | Turbot > Google @ turbot.com > Cody Bruno            | Admin       | Turbot                               |
| 165127150940754 | Active          | Turbot > Google @ turbot.com > Venugopal Rao Kumbha  | Owner       | Turbot                               |
| 188609043625517 | Active          | Turbot > Google @ turbot.com > Nathan Wallace        | Owner       | Turbot                               |
| 187955963611958 | Active          | Turbot > Google @ turbot.com > Rajesh Mohanty        | SuperUser   | Turbot                               |
| 232514598645748 | Active          | Turbot > Google @ turbot.com > Lalit Bhardwaj        | Role        | Turbot > AWS Accounts > 828685001623 |
| 232513631215140 | Active          | Turbot > Google @ turbot.com > Partha Sarathi Behera | Operator    | Turbot > AWS Accounts > 828685001623 |
| 212996033743000 | Active          | Turbot > Google @ turbot.com > Abhinash Khuntia      | Admin       | Turbot                               |
| 189875991944587 | Active          | Turbot > Google @ turbot.com > Lalit Bhardwaj        | SuperUser   | Turbot > AWS Accounts > 828685001623 |
| 161525342357056 | Active          | Turbot > Turbot Local > John Smyth                   | Owner       | Turbot                               |
| 189793356024239 | Active          | Turbot > Google @ turbot.com > Lalit Bhardwaj        | Owner       | Turbot                               |
| 216704470305117 | Active          | Turbot > Google @ turbot.com > Siddhartha Das        | Admin       | Turbot                               |
| 240323569425816 | Active          | Turbot > Google @ turbot.com > Partha Sarathi Behera | Owner       | Turbot                               |
| 240323832580553 | Active          | Turbot > Google @ turbot.com > Ved Misra             | Owner       | Turbot > AWS Accounts                |
| 228825782849182 | Active          | Turbot > Google @ turbot.com > Sourav Chakraborty    | SuperUser   | Turbot                               |
| 229155810239578 | Active          | Turbot > Google @ turbot.com > Partha Sarathi Behera | SuperUser   | Turbot                               |
+-----------------+-----------------+------------------------------------------------------+-------------+--------------------------------------+

@ParthaI ParthaI requested a review from cbruno10 December 15, 2021 10:52
@ParthaI ParthaI self-assigned this Dec 15, 2021
@ParthaI ParthaI linked an issue Dec 15, 2021 that may be closed by this pull request
Copy link
Contributor

@cbruno10 cbruno10 left a comment

Choose a reason for hiding this comment

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

@ParthaI Please see comments, thanks!

A lot of comments are around field naming, we had established some guidelines in #15 (review), was there a reason you deviated from these here?


## Examples

### List all turbot active grants
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### List all turbot active grants
### Basic info

docs/tables/turbot_active_grant.md Show resolved Hide resolved
{Name: "level_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Grant.Level.Title"), Description: "The title of the level."},
{Name: "level_trunk_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Grant.Level.Trunk.Title"), Description: "Full title (including ancestor trunk) of the level."},
{Name: "level_uri", Type: proto.ColumnType_STRING, Transform: transform.FromField("Grant.Level.URI"), Description: "The URI of the level."},
{Name: "type_trunk_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("Resource.Type.Trunk.Title"), Description: "Full title (including ancestor trunk) of the grant type."},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this column and the one below not include the word resource, but the others below it do with similar property paths?

// Other columns
{Name: "create_timestamp", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("Resource.Turbot.CreateTimestamp").NullIfEqual(""), Description: "The create time of the grant."},
{Name: "filter", Type: proto.ColumnType_STRING, Transform: transform.FromQual("filter"), Description: "Filter used for this grant list."},
{Name: "timestamp", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("Resource.Turbot.Timestamp").NullIfEqual(""), Description: "Timestamp when the grant was last modified (created, updated or deleted)."},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a Turbot.Timestamp field we can get from GraphQL for this resource type? If so, how is it different than the Resource.Turbot.Timestamp?

What does the Resource.Turbot.Timestamp data represent?

Copy link
Contributor

Choose a reason for hiding this comment

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

In general, a lot of these other columns are for Resource, so I'm not sure if/how they're related to the grant info?

@cbruno10 cbruno10 merged commit 94838cb into main Jan 24, 2022
@cbruno10 cbruno10 deleted the issue-23 branch January 24, 2022 20:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table turbot_active_grant
2 participants