Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

BYO Service Accounts #17

Merged
merged 28 commits into from
Apr 5, 2019
Merged

BYO Service Accounts #17

merged 28 commits into from
Apr 5, 2019

Conversation

robmorgan
Copy link
Contributor

@robmorgan robmorgan commented Mar 21, 2019

This PR implements custom service accounts in our examples. This is a best practice that follows the principle of least privilege. By default, each node in a GKE cluster is a Compute Engine instance. Therefore, applications running on a GKE cluster inherit the scopes of the Compute Engine instances to which they are deployed. Using the new module gke-service-account, users have the option to limit the permission scope thereby improving the security of the GKE cluster.

Copy link
Contributor

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

I think we should make the custom service account a Required field, and explain how to use the default one in the description. That'll require users to opt-out. Both our existing examples can use the existing account.

If we keep these docs distinct, we should make the benefits of BYO service account more clear in the intro, calling out the wide access granted to the default account (your entire project's compute instances, effectively!) and how that's not a sensible least-privilege security model. We could also merge the docs with the gke-cluster docs, and throw in a few paragraphs there.

Our goal here is to (strongly) encourage users to use custom accounts, so it should be opt-out and the benefits of performing the extra work to use one clear.

examples/gke-custom-service-account/README.md Outdated Show resolved Hide resolved
examples/gke-custom-service-account/README.md Outdated Show resolved Hide resolved
examples/gke-custom-service-account/README.md Outdated Show resolved Hide resolved
examples/gke-custom-service-account/README.md Outdated Show resolved Hide resolved
examples/gke-custom-service-account/README.md Outdated Show resolved Hide resolved
@robmorgan robmorgan changed the title [WIP] BYO Service Accounts BYO Service Accounts Apr 4, 2019
Copy link
Contributor

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a handful of nitpicks on text body mostly.

examples/gke-regional-public-cluster/README.md Outdated Show resolved Hide resolved
examples/gke-regional-public-cluster/README.md Outdated Show resolved Hide resolved
examples/gke-regional-public-cluster/README.md Outdated Show resolved Hide resolved
examples/gke-regional-public-cluster/README.md Outdated Show resolved Hide resolved
modules/gke-service-account/README.md Outdated Show resolved Hide resolved
@robmorgan
Copy link
Contributor Author

Currently wrestling with the IAM permissions to make the tests pass on CircleCI

@robmorgan robmorgan merged commit f5566e3 into master Apr 5, 2019
@robmorgan robmorgan deleted the byo-service-account branch April 5, 2019 11:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants