Correct GCE Token Parameter (#5667)
As written the GCE token curl results in an error: "non-empty audience parameter required". Google's docs (https://cloud.google.com/compute/docs/instances/verifying-instance-identity) confirm that the parameter is 'audience' not 'aud'.
This commit is contained in:
parent
37683e234d
commit
d3774e6aaa
|
@ -276,14 +276,13 @@ commands from the GCE instance.** The JWT token can be obtained from the
|
|||
|
||||
```text
|
||||
ROLE="my-gce-role"
|
||||
SERVICE_ACCOUNT="service-account@my-project.iam.gserviceaccount.com"
|
||||
|
||||
curl \
|
||||
--header "Metadata-Flavor: Google" \
|
||||
--get \
|
||||
--data-urlencode "aud=http://vault/${ROLE}" \
|
||||
--data-urlencode "audience=http://vault/${ROLE}" \
|
||||
--data-urlencode "format=full" \
|
||||
"http://metadata/computeMetadata/v1/instance/service-accounts/${SERVICE_ACCOUNT}/identity"
|
||||
"http://metadata/computeMetadata/v1/instance/service-accounts/default/identity"
|
||||
```
|
||||
|
||||
## API
|
||||
|
|
Loading…
Reference in New Issue