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

Update gcp.spc #398

Merged
merged 2 commits into from
Oct 13, 2022
Merged

Update gcp.spc #398

merged 2 commits into from
Oct 13, 2022

Conversation

ashishsecdev
Copy link
Contributor

"Project Name" doesn't work in GCP we have to provide "Project ID", so changing the instruction accordingly as query fails with "Project Name" in the credential config file.

Failure logs

Logs
Warning: executeQueries: query 1 of 1 failed: ERROR: rpc error: code = Unknown desc = googleapi: Error 403: You don't have permission to list roles in projects/k8s-cluster., forbidden (SQLSTATE HV000) </summary>

Integration test logs

Logs
~$ steampipe query "select
  name,
  role_id,
  deleted,
  description,
  title
from
  gcp_iam_role;"
+-------------------------------------------------------------------+-------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------+
| name                                                              | role_id                                                     | deleted | description                                                                                                                                                                                                                                                                                                                                                | title                                                  |
+-------------------------------------------------------------------+-------------------------------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------+
| roles/anthossupport.serviceAgent                                  | anthossupport.serviceAgent                                  | false   |  Gives the Anthos Support Service Agent access to Cloud Platform resource.                                                                                                                                                                                                                                                                                 | Anthos Support Service Agent                           |
| roles/accessapproval.approver                                     | accessapproval.approver                                     | false   | Ability to view or act on access approval requests and view configuration                                                                                                                                                                                                                                                                                  

Example query results

Results
test_user~$ steampipe query "select
  name,
  role_id,
  deleted,
  description,
  title
from
  gcp_iam_role;"
Warning: executeQueries: query 1 of 1 failed: ERROR: rpc error: code = Unknown desc = googleapi: Error 403: You don't have permission to list roles in projects/k8s-cluster., forbidden (SQLSTATE HV000)

"Project Name" doesn't work in GCP we have to provide "Project ID", so changing the instruction accordingly as query fails with "Project Name"
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.

@ashishsecdev Changes look good, there's 1 other place I believe we should update as well. Please let me know if you have any questions!

"Project Name" doesn't work in GCP we have to provide "Project ID", so changing the instruction accordingly as query fails with "Project Name"
@cbruno10 cbruno10 merged commit 6b0d8c2 into turbot:main Oct 13, 2022
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.

2 participants