-
Notifications
You must be signed in to change notification settings - Fork 406
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
Detect project ID mismatch in GCP service connector SA credentials #2708
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this but but two points:
- Are we sure there is not occasions where a service account for one project is given access to other projects (I am not aware of any but just want to make sure)
- If the project is always in cfg.service_account_json and it always has to be the same as what the user says, then why do we ask the user to input it in the first place? Why cant we just take it from there?
- As mentioned internally, please do add more logs around establishing a connection to debug what happens
Yes, 100% sure. This is a misconfiguration and should be avoided.
This is a fair question. I'll look into it.
Unfortunately, the connection establishment is located deep inside the GCP Cloud Python library where I have no granular control, but I'll try to enable more verbose logs for those libraries overall. |
@stefannica feel free to merge this and make a follow up ticket for the rest of the work here ahead of the release tomorrow |
Describe changes
GCP service accounts are scoped to a GCP project and cannot be used to gain access to resources from another project. When GCP SA credentials from a project are used with a ZenML GCP service connector configured to use another GCP project, unexpected and difficult to debug errors can occur.
This PR adds some logic to validate and report this configuration mismatch.
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes