|
8 | 8 | - 1.16.4 |
9 | 9 |
|
10 | 10 | #### Issue |
11 | | -A behavior change was made in the jwt auth plugin to address CVE-2024-5798. |
12 | | -Since the behavior change was a breaking change, we reverted the change in |
13 | | -the versions after 1.15.10 and 1.16.4. However, the behavior change will go |
14 | | -into effect in 1.17. |
15 | | - |
16 | | -The new behavior requires that the `bound_audiences` parameter of "jwt" roles |
17 | | -**must** match at least one of the JWT's associated `aud` claims. The `aud` |
18 | | -claim can be a single string or a list of strings as per |
| 11 | + |
| 12 | +A behavior change was introduced in the **JWT auth plugin** to address **CVE-2024-5798**. |
| 13 | +Because this change introduced breaking behavior, it was **reverted** in versions **after 1.15.10 and 1.16.4**. |
| 14 | +However, the change was **reintroduced in version 1.17+**. |
| 15 | + |
| 16 | +The updated behavior enforces stricter validation of the `bound_audiences` parameter in JWT roles. |
| 17 | + |
| 18 | +- The `bound_audiences` parameter **must** match at least one of the JWT’s `aud` (audience) claims. |
| 19 | +- The `aud` claim can be a single string or an array of strings, as defined in |
19 | 20 | [RFC 7519 Section 4.1.3](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3). |
20 | 21 |
|
21 | | -Users may not be able to log into Vault if the JWT role is configured |
22 | | -incorrectly. For additional details, refer to the |
| 22 | +Once a JWT is confirmed to be properly signed and not expired, Vault performs additional authorization checks to ensure that configured “bound” |
| 23 | +parameters match the corresponding claims in the token. |
| 24 | + |
| 25 | +For **roles of type `jwt`**: |
| 26 | + |
| 27 | +- The `bound_audiences` parameter is **required** when an `aud` claim is present. |
| 28 | +- The value of `bound_audiences` must **exactly match** at least one of the provided `aud` claims. |
| 29 | + |
| 30 | +Additionally, roles can validate arbitrary claim values using the `bound_claims` map. |
| 31 | + |
| 32 | +```json |
| 33 | +{ |
| 34 | + "division": "Europe", |
| 35 | + "department": "Engineering" |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +Only JWTs containing both the "division" and "department" claims, and respective matching values of "Europe" and "Engineering", would be authorized. |
| 40 | +If the expected value is a list, the claim must match one of the items in the list. To limit authorization to a set of email addresses: |
| 41 | + |
| 42 | +```json |
| 43 | +{ |
| 44 | + "email": ["fred@example.com", "julie@example.com"] |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +For additional details, refer to the |
23 | 49 | [JWT auth method (API)](/vault/api-docs/auth/jwt) documentation. |
24 | 50 |
|
25 | 51 | See this [issue](https://github.com/hashicorp/vault/issues/27343) for more details. |
26 | 52 |
|
27 | 53 | #### Workaround |
28 | 54 |
|
29 | 55 | Configure the `bound_audiences` parameter of "jwt" roles to match at least one |
30 | | -of the JWT's associated `aud` claims. This configuratoin will be required for |
| 56 | +of the JWT's associated `aud` claims. This configuration will be required for |
31 | 57 | 1.17 and later. |
0 commit comments