Hi,
I've managed to setup Vault GCP secrets engine with a
GCP service account so it gives me back OAuth tokens for accessing a
GCP bucket. I'm now trying to do the same for a Google Kubernetes Engine
cluster. I can't seem to set the right resource address in the bindings
hcl. I'm not sure if the problem is with Vault, or if I am just putting
the wrong resource address? Has anyone got this to work, or pointers as
to where I might be going wrong?
My workflow is:
# Enable GCP secrets engine
# Write service credentials
vault write gcp/config credentials=@gcp_service_account.json ttl=3600 max_ttl=86400
# Write roleset
token_role_bindings_gke.hcl contains:
I get back messages like:
Error writing data to gcp/roleset/my-token-roleset: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/gcp/roleset/my-token-roleset
Code: 400. Errors:
* error parsing relative resource path in full resource name '//container.googleapis.com/v1/projects/<redacted>/zones/<redacted>/clusters/<redacted>': invalid relative resource name v1/projects/<redacted>/zones/<redacted>/clusters/<redacted> (invalid collection ID v1)
I have tried various combinations for resource address, but none of them are recognised.
Thanks
Oliver