I am trying to create a vault jwt role through the vault cli. I am using a json file to config the role.
The json looks like this:
{
"role_type": "jwt",
"policies": ["myproject-staging"],
"token_explicit_max_ttl": 60,
"user_claim": "user_email",
"bound_claims": {
"project_id": "22",
"ref": "master",
"ref_type": "branch"
}
}
When running the following cli command:
vault write auth/jwt/role/test_role role=@jwt.json
i receive the following error:
Error writing data to auth/jwt/role/test_role: Error making API request.
Code: 400. Errors:
* a user claim must be defined on the role
but I am clearly defining a user_claim in the json and also when I use the same json to create a jwt role through an api call it works without problems.
I want to use it in a pipeline and therefore would like to use the command line.
Have you experienced the same or know any solution for this?
Thanks for the help!