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

Unit test for impersonation #4

Open
mshudrak opened this issue Jul 18, 2022 · 3 comments
Open

Unit test for impersonation #4

mshudrak opened this issue Jul 18, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@mshudrak
Copy link
Collaborator

We currently do not cover SA impersonation with unit tests.

@mshudrak mshudrak added good first issue Good for newcomers enhancement New feature or request and removed good first issue Good for newcomers labels Jan 18, 2023
@ggold7046
Copy link
Contributor

Hi @mshudrak , Could you guide me on this topic ? Could you explanation little bit more on this ?

@ghost
Copy link

ghost commented Feb 27, 2023

hi @mshudrak , Can you elloborate please?

@mshudrak
Copy link
Collaborator Author

Sorry for the long response. Well, this is not a simple issue. As you can see I removed "good first issue" tag on Jan 18 since it requires editor access on test-gcp-project. However, if you really want to play with it you can setup your own GCP project. What we basically need is to setup GCP service account that can impersonate other accounts and write unit test for that.

More info: https://cloud.google.com/iam/docs/impersonating-service-accounts, https://medium.com/@tanujbolisetty/gcp-impersonate-service-accounts-36eaa247f87c
Corresponding code: https://github.com/google/gcp_scanner/blob/main/src/gcp_scanner/credsdb.py#L294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants