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

CloudAsset.V1.AnalyzeIamPolicy doesn't return analysisResult object with permissions query selector #19056

Open
Shaman9 opened this issue Dec 8, 2023 · 3 comments
Labels
api: cloudasset Issues related to the Cloud Asset Inventory API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@Shaman9
Copy link

Shaman9 commented Dec 8, 2023

public AnalyzeIamPolicy setAnalysisQueryAccessSelectorPermissions(java.util.List<java.lang.String> analysisQueryAccessSelectorPermissions) {

Hi, I'm using CloudAsset.V1.AnalyzeIamPolicy for finding list of permissions for a specific service account on a specific project.

When I'm using setAnalysisQueryAccessSelectorPermissions(List.of("bigquery.datasets.get")) for CloudAsset.V1.AnalyzeIamPolicy request I'm receiving response without analysisResult object. Without setAnalysisQueryAccessSelectorPermissions(List.of("bigquery.datasets.get")) it works fine, but I need to set permissions as a filter before I execute request. See attached screenshots

Meanwhile https://cloud.google.com/asset-inventory/docs/reference/rest/v1/TopLevel/analyzeIamPolicy has webform to test the method. And it's working in both cases (with and without permissions selector) with the same parameters.
See attached json

I'm using Java 17
Library and its version:

com.google.apis
google-api-services-cloudasset
v1-rev20231103-2.0.0

all required permissions are granted:
cloudasset.assets.analyzeIamPolicy,
cloudasset.assets.searchAllResources
cloudasset.assets.searchAllIamPolicies

and a target resource totally has the searched permission

WithoutPermissionSelector WithPermissionSelector
@product-auto-label product-auto-label bot added the api: cloudasset Issues related to the Cloud Asset Inventory API. label Dec 8, 2023
@mpeddada1
Copy link
Contributor

mpeddada1 commented Dec 18, 2023

Hi @Shaman9, is this something that you experienced in version 1.31.0 as well? Additionally, could you also please share a reproducer that we can try out?

@mpeddada1 mpeddada1 added type: question Request for information or clarification. Not an issue. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 18, 2023
@Shaman9
Copy link
Author

Shaman9 commented Dec 20, 2023

Hi @mpeddada1, yes I've tried but was the same issue.
GetPermissions.txt

@meltsufin
Copy link
Member

Would you be able to capture the HTTP request that is being sent through the client?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudasset Issues related to the Cloud Asset Inventory API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants