hashicorp / hashicorp/vault-plugin-auth-jwt

Improper validation of role config

Open
#270 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
107
Forks
73
Avg merge
13h 49m
Merged PRs (30d)
7

Description

A customer of mine ran into an issue where they configured a jwt auth role using vault write config/auth/jwt/role/xyz and used the json in the screenshot. Vault took it with no complaints as shown.
There's a subtle error here in that claim_mapping should actually be claim_mapping**S** & it took us a while to track it down & wasted a bunch of time to figure out why the claim_mappings didn't work.
My ask is to at least warn on unknown parameters if not outright fail.
thanks.

![image](https://github.com/hashicorp/vault-plugin-auth-jwt/assets/106760442/0a256233-0a55-495a-bc75-d220693278cf)
![image](https://github.com/hashicorp/vault-plugin-auth-jwt/assets/106760442/3fbb7118-2dd1-45e0-a5e5-68b82b93619d)

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the JWT role configuration validation and reproduce the issue with the misspelled claim_mapping field from the report. Check how unknown role parameters are handled, then verify that the chosen warning or failure behavior catches the typo without breaking valid claim_mappings configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.