Skip to content

resolve IAM groups, membership in iam.py-issue34 - #114

Open
kaushik853 wants to merge 5 commits into
GoogleCloudPlatform:mainfrom
kaushik853:main
Open

resolve IAM groups, membership in iam.py-issue34#114
kaushik853 wants to merge 5 commits into
GoogleCloudPlatform:mainfrom
kaushik853:main

Conversation

@kaushik853

Copy link
Copy Markdown
Contributor

added new function _get_group_members and modified the _expand_policy.
_get_group_members function resolves group using the Google Cloud IAM API to list members of groups.
Modify the _expand_policy method to also handle groups by resolving group memberships recursively and include them in the expanded policy.

added new function _get_group_members and modified the _expand_policy
@kaushik853 kaushik853 changed the title resolve IAM groups, membership in iam.py resolve IAM groups, membership in iam.py-issue34 Mar 16, 2025
Comment thread gcpdiag/queries/iam.py Outdated

processed_groups.add(group_email)

service = googleapiclient.discovery.build('cloudidentity', 'v1', cache_discovery=False)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use apis.get_api() to build the client.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Use apis.get_api() to build the client.

modified it

Comment thread gcpdiag/queries/iam.py Outdated
Comment thread gcpdiag/queries/iam.py Outdated
@Y0Q

Y0Q commented May 27, 2025

Copy link
Copy Markdown
Collaborator

Thanks for the merge request @kaushik853 We will be pushing a new release shortly that should integrate your changes.

@kaushik853

Copy link
Copy Markdown
Contributor Author

Thanks for the merge request @kaushik853 We will be pushing a new release shortly that should integrate your changes.
Thanks Joel, let me know if any action needed from my end

@Y0Q

Y0Q commented May 27, 2025

Copy link
Copy Markdown
Collaborator

We just released a new version which should include your merged changes.

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.

3 participants