The imds_http_tokens
parameter determines whether the Instance Metadata Service requires session tokens (IMDSv2). This setting enhances the security of instance metadata by requiring a session token for access.
The default value for imds_http_tokens
is optional
.
To set the imds_http_tokens
parameter, use the following command:
$ convox rack params set imds_http_tokens=required -r rackName
Setting parameters... OK
This command sets the IMDSv2 tokens requirement to required
.
Instance Metadata Service Version 2 (IMDSv2) improves the security of metadata access by requiring a session token. This mitigates certain types of attacks, such as SSRF (Server-Side Request Forgery). Ensure that your applications and scripts that access instance metadata are updated to use IMDSv2 when this setting is enabled.
The imds_http_tokens
parameter can be set to:
optional
: Allows access to the metadata service with or without a session token.required
: Requires a session token to access the metadata service.Setting imds_http_tokens
to required
ensures that all requests to the Instance Metadata Service are authenticated using a session token, providing an additional layer of security.