-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support for disabling Legacy Metadata API endpoints on GKE Node Pools #2626
Comments
Hey there, Sorry, it doesn't look like this is available via the API. We can't interact with GKE via |
It looks like this is the post body when using gcloud and the Does that provide the necessary info? Or does that mean it belongs in the beta provider repo instead?
|
woah, |
based on @bgeesaman output, I added the following to the node_config: node_config {
metadata {
"disable-legacy-endpoints" = "true"
}
} It works expected per the tests provided by the docs |
can confirm that the behavior is still the same. Even after adding the block pointed out by @samhagan, I coudn't get states to match. |
@lucazz I double checked on two node pools - 1x with the metadata field set and 1x without. The one with the field set gets the expected result from the checks below. Whereas the one without the metadata set is able to access legacy endpoints. How were you verifying it?
|
I've added this block to the gke control plane terraform module we wrote, ran it, it spun un a cluster and when I issued again a |
Rolling back to 1.11 prevents this cycle from ever occurring |
@lucazz do you mind sharing the provider version you're using, a minimal config, and the plan results? I think GoogleCloudPlatform/magic-modules#1507 solves this, but I'd like to confirm. |
Sure thing:
Essentially the module I have does a little bit of provisioning (Service Accounts, Passwords, Compute Addresses for ingress controllers) and this is how we're building our control plane
Node pools are much more simpler:
|
And the all plans would look something like this:
|
Can you confirm that that plan came from the exact
Regardless, GoogleCloudPlatform/magic-modules#1507 should resolve the issue. |
Now that you mention it it looks indeed kinda off. I think this is an older iteration of the issue. |
That change will be applied to both providers at the same time, in |
& yeah, if you don't mind running again. |
kk, let me give it a try |
This is resolved by GoogleCloudPlatform/magic-modules#1507 if you're still experiencing issues on a release after |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Description
There is now an option to prevent the older metadata API versions from being available to GKE node pools. This can help thwart the simpler SSRF attack types from being able to reach the potentially sensitive metadata attributes (especially if the metadata concealment proxy is not in use).
Suggest adding a flag to the node_config > workload_metadata_config block to allow for control over this feature.
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: