I have a local gitlab (mygitlab.local) and vault (myvault.local) community/free instances. I have followed the gitlab documentation to enable jwt authentication method. Also, I have created my test secrets and my role (see below). I am currently facing an issue where my gitlab runner can’t authenticate against vault. Error message says:
* error validating claims: aud claim does not match any bound audience
Also, I just realized your user_claim may be invalid. That should be a field name found in the JWT payload. Usually user_id, user_login, user_email, project_name, or namespace_name (something that stays consistent over pipeline runs).
If you don’t have a bound_audiences you may need to specify a groups_claim instead (I’m not sure of this, just inferring based on the configs in my setup). I typically use project_path or namespace_path for these depending on the need.
BTW - It turns out (as of the time of writing) that the aud field is not set in the GitLab JWT
In my vast ignorance of how JWT actually works, I presume that this is why if you set anything in bound_audiences, the claim validation error happens.