This repository was archived by the owner on Aug 20, 2025. It is now read-only.
[BLOCKED] CIS 7: Enable workload identity#231
Open
charliewolf wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Open
[BLOCKED] CIS 7: Enable workload identity#231charliewolf wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
charliewolf wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
fbbe7d3 to
5b83058
Compare
Contributor
|
CAI added the field, and we can unblock this. @charliewolf Are you still working on this PR, or can I take it over? Thanks! |
mmontan
suggested changes
Mar 5, 2020
| asset.asset_type == "container.googleapis.com/Cluster" | ||
|
|
||
| cluster := asset.resource.data | ||
| identity_namespace := lib.get_default(lib.get_default(cluster, "workloadIdentityConfig", {}), "identityNamespace", null) |
Contributor
There was a problem hiding this comment.
CAI added the field, but called it "workloadPool" rather than identityNamespace.
"workloadIdentityConfig": {
"workloadPool": "mmontan-cloud.svc.id.goog"
},
On the other side, Terraform Validator is going to output the field as "identityNamespace"
It would be better to support both, so we can use the constraint across environments.
| "workloadIdentityConfig": { | ||
| "identityNamespace": "test-project-123-namespace" | ||
| }, | ||
| "zone": "us-west1-b" |
Contributor
There was a problem hiding this comment.
We should also have a cluster to test with the following:
"workloadIdentityConfig": {
"workloadPool": "test-project-123.svc.id.goog"
},
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CAI does not currently export this field, but I am using the field name listed in the API docs (
workloadIdentityConfig.identityNamespace) and this should work as soon as CAI adds that field.