hashicorp / hashicorp/vault-plugin-auth-jwt
Azure OIDC fails if using custom signing keys
- Dominant language
- Go
- Stars
- 107
- Forks
- 73
- Avg merge
- 13h 49m
- Merged PRs (30d)
- 7
Description
**Describe the bug**
Login fails with a failure to verify signature error if Azure is using custom signing keys for the integration. Looking at the Azure documentation the OpenID discovery URL needs to have ?appid=xxx appended to return the correct signing key details. Without this set the custom keys aren't returned and Vault fails to validate the JWT signature (no key found).
Looking at the code I can't see a way to add this query string parameter or override the discovered signing keys/URL.
**To Reproduce**
Steps to reproduce the behavior:
1. Setup OIDC authentication as per the instructions in the documentation.
2. Ensure Azure is using a custom signing key
3. Attempt login
4. Check error log for returned JWT
5. Decode JWT to find kid used to sign
6. Visit discovery URL to find key URL and then visit.
7. Verify key isn't listed
8. Visit discovery URL with query string parameter to find key URL.
8. Verify signing key is now returned
**Expected behavior**
Vault would have a mechanism to either allow the query string parameter to be appended to the discovery URL (would require go-oidc changes) and/or allow key URL to be overriden (instead of it being taken from the discovery URL)
**Additional context**
go-oidc have a few Azure related issues listed, but not directly related to this issue: https://github.com/coreos/go-oidc/issues/212
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.