# Is the instance metadata service hardened (IMDSv2 required on AWS, managed identity endpoint protected on Azure, metadata concealment on GKE)?

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

Question 13 of the assessment asks: Is the instance metadata service hardened (IMDSv2 required on AWS, managed identity endpoint protected on Azure, metadata concealment on GKE)? A server-side request forgery bug can read the metadata service and walk away with the instance's cloud credentials.

## Why it matters

A server-side request forgery bug can read the metadata service and walk away with the instance's cloud credentials.

## Answers and what each is worth

| Answer | Value |
| --- | --- |
| Yes, enforced everywhere | 1 |
| On new resources only | 0.5 |
| No or not known | 0 |

## How to check it in each cloud

- **AWS:** Describe instances and check MetadataOptions.HttpTokens is required, and that the account default under EC2 data protection and security is set to required.
- **Azure:** Check that workloads do not accept unvalidated URLs, that managed identity use is scoped per resource, and that Defender for Cloud has no open server-side request findings.
- **Google Cloud:** Check that GKE clusters use Workload Identity (metadata server mode GKE_METADATA) and that Compute Engine instances do not run with the default service account.

## The fix

Require IMDSv2 on all instances and set the account default so new instances cannot opt out. Effort: low.

## Where it comes from

- AWS documentation Instance metadata: [Configure the instance metadata service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html)
- Microsoft cloud security benchmark IM-8: [source](https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-v2-identity-management)

## Related pages

- [Question 14: Network reachability, egress controlled](/questions/egress-controlled/)
- [Question 15: Network reachability, reachability analysis](/questions/reachability-analysis/)
- [Question 16: Data perimeter, public storage blocked](/questions/public-storage-blocked/)

## Sources

- AWS documentation Instance metadata: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html (read 16 Nov 2026)
- Microsoft cloud security benchmark IM-8: https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-v2-identity-management (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudsecurityriskassessment.com/questions/metadata-service-hardened/
