Hi,
we are currently running Vault in Kubernetes Engine on GCP. We installed it from Kubeapps. Now we want to use the gcp auth method. We enabled it and added a role:
vault auth-enable gcp
vault write auth/gcp/role/test-role \
type="gce" \
project_id="$GOOGLE_PROJECT" \
policies="default" \
bound_service_accounts="$SERVICE_ACCOUNT"
Now we login to the GCE VM associated with $SERVICE_ACCOUNT and request an id_token:
We check this id_token on
jwt.io just to make sure, that it is a proper JWT. The next step is to login to vault:
vault write auth/gcp/login role=test-role jwt=${JWT_TOKEN}
Now the reponse is:
Error writing data to auth/gcp/login: Error making API request.
Code: 400. Errors:
* could not find service account with id '10....30': service account 'projects/<removed>/serviceAccounts/10....30' does not exist
However, this service account is existing.
Furthermore, we don't understand how vault could know that the SA does not exist, since it should only be necessary to validate and parse the provided JWT.
Even though it should not be necessary, we uploaded a service account JSON into the vault gcp auth configuration, but that leads to the same error.
We are really desperate and are looking forward to your support.
Thank you very much and best wishes,
Simon