-
Notifications
You must be signed in to change notification settings - Fork 430
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
fix: remove instanceUser iam binding from the postgresql module #382
fix: remove instanceUser iam binding from the postgresql module #382
Conversation
Not sure why tests failed |
Thanks for PR @ykyr . Although I understand your requirement, I have a concern with having the same service account accessing multiple databases. The way the module is written is that it assumes there will be a unique SA or a local user for each database to harden security. Consider a situation where a bad actor gets access to the SA, this will allow them to have access to multiple databases. On the flip side, if you want to shutdown a compromised SA, doing so will interrupt access to all databases potentially bringing down multiple applications. Can you explain why you're not creating unique SAs per DB especially within one project? |
Hi @g-awmalik,
Then SA follows a bad practice, doesn't it? Sharing a single service account across multiple applications can complicate the management of the service account In our organization, the setup is very simple. Every application service has an identity that is represented by For example, an application named
I provided the example with the application GSA, but let's take a look on user
Few more thoughts:
|
@ykyr - I agree with your sentiment around IAM users; it is in fact unreasonable to think that only one user can access one instance at time, that won't work. However, I still think you should consider have a unique SA per application. Now if your application stack consists of multiple GCP resources, its fine to have that same SA access those resources because they are all part of the stack. Things get complicated, as suggested by the best practice link you quoted, when you start sharing that SA across applications which is not recommended. To summarize, I'll accept this change since your concern is valid for IAM users. Do you mind creating a upgrade doc similar to this that upgrade process you have in your comments? Thanks, |
@g-awmalik I added the upgrade doc as you suggested, and named it as a 14.x release. Please let me know if that's sufficient. |
3a21d5d
to
0faaac6
Compare
0faaac6
to
22f12bc
Compare
Something else to consider, if you're using Google Groups to handle RBAC, to extend @ykyr's example:
|
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.
LGTM
@ykyr |
It's a breaking change. This PR fixes #381
The recommended way for graceful migration: