-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump jjwt_version from 0.12.3 to 0.12.4 #3995
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps `jjwt_version` from 0.12.3 to 0.12.4. Updates `io.jsonwebtoken:jjwt-api` from 0.12.3 to 0.12.4 - [Release notes](https://github.com/jwtk/jjwt/releases) - [Changelog](https://github.com/jwtk/jjwt/blob/master/CHANGELOG.md) - [Commits](jwtk/jjwt@0.12.3...0.12.4) Updates `io.jsonwebtoken:jjwt-impl` from 0.12.3 to 0.12.4 - [Release notes](https://github.com/jwtk/jjwt/releases) - [Changelog](https://github.com/jwtk/jjwt/blob/master/CHANGELOG.md) - [Commits](jwtk/jjwt@0.12.3...0.12.4) Updates `io.jsonwebtoken:jjwt-jackson` from 0.12.3 to 0.12.4 --- updated-dependencies: - dependency-name: io.jsonwebtoken:jjwt-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.jsonwebtoken:jjwt-impl dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.jsonwebtoken:jjwt-jackson dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
bot
added
dependencies
Pull requests that update a dependency file
java
Pull requests that update Java code
labels
Jan 29, 2024
dependabot
bot
requested review from
cwperks,
DarshitChanpura,
davidlago,
peternied,
RyanL1997,
stephen-crawford,
reta and
willyborankin
as code owners
January 29, 2024 06:57
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3995 +/- ##
==========================================
- Coverage 65.62% 65.56% -0.06%
==========================================
Files 298 298
Lines 21246 21246
Branches 3457 3457
==========================================
- Hits 13942 13930 -12
- Misses 5585 5595 +10
- Partials 1719 1721 +2 |
reta
approved these changes
Jan 29, 2024
willyborankin
approved these changes
Jan 29, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jan 29, 2024
Bumps `jjwt_version` from 0.12.3 to 0.12.4. Updates `io.jsonwebtoken:jjwt-api` from 0.12.3 to 0.12.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/releases">io.jsonwebtoken:jjwt-api's releases</a>.</em></p> <blockquote> <h2>0.12.4</h2> <p>This is patch release completes <a href="https://github.com/jwtk/jjwt/issues?q=milestone%3A0.12.4+is%3Aissue">10 issues</a>, with two especially noteworthy changes, and a number of other smaller bug fixes and enhancements.</p> <ol> <li>The default Jackson deserializer will now reject duplicate JSON members by default in an attempt to be a little more strict at rejecting potentially malicious or malformed JSON. This is a default and can be overridden with a custom <code>ObjectMapper</code> if desired.</li> <li>Password-based JWE encryption key algorithms (<code>PBES2_HS256_A128KW</code>, <code>PBES2_HS384_A192KW</code> and <code>PBES2_HS512_A256KW</code>) now enforce an upper bound (maximum) number of iterations allowed during decryption to mitigate against potential DoS attacks. Many thanks to Jingcheng Yang and Jianjun Chen from Sichuan University and Zhongguancun Lab for their work on this!</li> </ol> <p>A number of other issues fixed: thread-safe <code>ServiceLoader</code> usage for dynamic JSON processor lookup, Android enhancements for JSON <code>Reader</code> APIs, fixed Elliptic Curve field element padding, and more. Please read the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/CHANGELOG.md">0.12.4 CHANGELOG</a> for full details of all of these changes, and as always, project documentation is in the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/README.md">0.12.4 README</a>.</p> <p>Please allow 30 minutes from the time this announcement is published for the release to be available in Maven Central.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/blob/master/CHANGELOG.md">io.jsonwebtoken:jjwt-api's changelog</a>.</em></p> <blockquote> <h3>0.12.4</h3> <p>This patch release includes various changes listed below.</p> <h4>Jackson Default Parsing Behavior</h4> <p>This release makes two behavioral changes to JJWT's default Jackson <code>ObjectMapper</code> parsing settings:</p> <ol> <li> <p>In the interest of having stronger standards to reject potentially malformed/malicious/accidental JSON that could have undesirable effects on an application, JJWT's default <code>ObjectMapper </code>is now configured to explicitly reject/fail parsing JSON (JWT headers and/or Claims) if/when that JSON contains duplicate JSON member names.</p> <p>For example, now the following JSON, if parsed, would fail (be rejected) by default:</p> <pre lang="json"><code>{ "hello": "world", "thisWillFail": 42, "thisWillFail": "test" } </code></pre> <p>Technically, the JWT RFCs <em>do allow</em> duplicate named fields as long as the last parsed member is the one used (see <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-4">JWS RFC 7515, Section 4</a>), so this is allowed. However, because JWTs often reflect security concepts, it's usually better to be defensive and reject these unexpected scenarios by default. The RFC later supports this position/preference in <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-10.12">Section 10.12</a>:</p> <pre><code>Ambiguous and potentially exploitable situations could arise if the JSON parser used does not enforce the uniqueness of member names or returns an unpredictable value for duplicate member names. </code></pre> <p>Finally, this is just a default, and the RFC does indeed allow duplicate member names if the last value is used, so applications that require duplicates to be allowed can simply configure their own <code>ObjectMapper</code> and use that with JJWT instead of assuming this (new) JJWT default. See [Issue <a href="https://redirect.github.com/jwtk/jjwt/issues/877">#877</a>](<a href="https://redirect.github.com/jwtk/jjwt/issues/877">jwtk/jjwt#877</a>) for more.</p> </li> <li> <p>If using JJWT's support to use Jackson to parse <a href="https://github.com/jwtk/jjwt#json-jackson-custom-types">Custom Claim Types</a> (for example, a Claim that should be unmarshalled into a POJO), and the JSON for that POJO contained a member that is not represented in the specified class, Jackson would fail parsing by default. Because POJOs and JSON data models can sometimes be out of sync due to different class versions, the default behavior has been changed to ignore these unknown JSON members instead of failing (i.e. the <code>ObjectMapper</code>'s <code>DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES</code> is now set to <code>false</code>) by default.</p> <p>Again, if you prefer the stricter behavior of rejecting JSON with extra or unknown properties, you can configure <code>true</code> on your own <code>ObjectMapper</code> instance and use that instance with the <code>Jwts.parser()</code> builder.</p> </li> </ol> <h4>Additional Changes</h4> <p>This release also:</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jwtk/jjwt/commit/bf4168cdceb85435b17d912a2087960ae597d37f"><code>bf4168c</code></a> [maven-release-plugin] prepare release 0.12.4</li> <li><a href="https://github.com/jwtk/jjwt/commit/5c6dec061ff99ef7122a33960ada95e496a37087"><code>5c6dec0</code></a> - Adding 0.12.4 release version references</li> <li><a href="https://github.com/jwtk/jjwt/commit/dd10b12b53b5bb26299c5435aa9d193e71b6b918"><code>dd10b12</code></a> Added JWK Set documentation to README.mdJwkset doc (<a href="https://redirect.github.com/jwtk/jjwt/issues/912">#912</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/6335381c978ce83c9c15bd3c349f32d1bed72d4f"><code>6335381</code></a> PBES2 decryption maximum iterations (<a href="https://redirect.github.com/jwtk/jjwt/issues/911">#911</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/2884eb79529ec8b56ecdd7c9f7e7fbea5dfc4806"><code>2884eb7</code></a> - Updating to GitHub latest actions/checkout and actions/setup-java script ve...</li> <li><a href="https://github.com/jwtk/jjwt/commit/628bd6f4e8b885be2f9cfbd8cbf0767ce616003a"><code>628bd6f</code></a> Secret JWK <code>k</code> values larger than HMAC-SHA minimums (<a href="https://redirect.github.com/jwtk/jjwt/issues/909">#909</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/b12dabf100bbe8749d9bce49628d70b9f73af729"><code>b12dabf</code></a> Fix small typos (<a href="https://redirect.github.com/jwtk/jjwt/issues/908">#908</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/26f5dc3dbbb6070735498e4ea497f174b0a3850f"><code>26f5dc3</code></a> Updating changelog with more information/clarity for the 0.12.4 release (<a href="https://redirect.github.com/jwtk/jjwt/issues/907">#907</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/f61cfa875d1bfd9164c16069ab62bf7b74fcc831"><code>f61cfa8</code></a> Test case change to reflect accurate assertion for Elliptic Curve 'd' values ...</li> <li><a href="https://github.com/jwtk/jjwt/commit/fd619e0a4229e01cbd3ab1bd0a7a4f6cab21d784"><code>fd619e0</code></a> disable FAIL_ON_UNKNOWN_PROPERTIES deserialization feature of Jackson by defa...</li> <li>Additional commits viewable in <a href="https://github.com/jwtk/jjwt/compare/0.12.3...0.12.4">compare view</a></li> </ul> </details> <br /> Updates `io.jsonwebtoken:jjwt-impl` from 0.12.3 to 0.12.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/releases">io.jsonwebtoken:jjwt-impl's releases</a>.</em></p> <blockquote> <h2>0.12.4</h2> <p>This is patch release completes <a href="https://github.com/jwtk/jjwt/issues?q=milestone%3A0.12.4+is%3Aissue">10 issues</a>, with two especially noteworthy changes, and a number of other smaller bug fixes and enhancements.</p> <ol> <li>The default Jackson deserializer will now reject duplicate JSON members by default in an attempt to be a little more strict at rejecting potentially malicious or malformed JSON. This is a default and can be overridden with a custom <code>ObjectMapper</code> if desired.</li> <li>Password-based JWE encryption key algorithms (<code>PBES2_HS256_A128KW</code>, <code>PBES2_HS384_A192KW</code> and <code>PBES2_HS512_A256KW</code>) now enforce an upper bound (maximum) number of iterations allowed during decryption to mitigate against potential DoS attacks. Many thanks to Jingcheng Yang and Jianjun Chen from Sichuan University and Zhongguancun Lab for their work on this!</li> </ol> <p>A number of other issues fixed: thread-safe <code>ServiceLoader</code> usage for dynamic JSON processor lookup, Android enhancements for JSON <code>Reader</code> APIs, fixed Elliptic Curve field element padding, and more. Please read the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/CHANGELOG.md">0.12.4 CHANGELOG</a> for full details of all of these changes, and as always, project documentation is in the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/README.md">0.12.4 README</a>.</p> <p>Please allow 30 minutes from the time this announcement is published for the release to be available in Maven Central.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/blob/master/CHANGELOG.md">io.jsonwebtoken:jjwt-impl's changelog</a>.</em></p> <blockquote> <h3>0.12.4</h3> <p>This patch release includes various changes listed below.</p> <h4>Jackson Default Parsing Behavior</h4> <p>This release makes two behavioral changes to JJWT's default Jackson <code>ObjectMapper</code> parsing settings:</p> <ol> <li> <p>In the interest of having stronger standards to reject potentially malformed/malicious/accidental JSON that could have undesirable effects on an application, JJWT's default <code>ObjectMapper </code>is now configured to explicitly reject/fail parsing JSON (JWT headers and/or Claims) if/when that JSON contains duplicate JSON member names.</p> <p>For example, now the following JSON, if parsed, would fail (be rejected) by default:</p> <pre lang="json"><code>{ "hello": "world", "thisWillFail": 42, "thisWillFail": "test" } </code></pre> <p>Technically, the JWT RFCs <em>do allow</em> duplicate named fields as long as the last parsed member is the one used (see <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-4">JWS RFC 7515, Section 4</a>), so this is allowed. However, because JWTs often reflect security concepts, it's usually better to be defensive and reject these unexpected scenarios by default. The RFC later supports this position/preference in <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-10.12">Section 10.12</a>:</p> <pre><code>Ambiguous and potentially exploitable situations could arise if the JSON parser used does not enforce the uniqueness of member names or returns an unpredictable value for duplicate member names. </code></pre> <p>Finally, this is just a default, and the RFC does indeed allow duplicate member names if the last value is used, so applications that require duplicates to be allowed can simply configure their own <code>ObjectMapper</code> and use that with JJWT instead of assuming this (new) JJWT default. See [Issue <a href="https://redirect.github.com/jwtk/jjwt/issues/877">#877</a>](<a href="https://redirect.github.com/jwtk/jjwt/issues/877">jwtk/jjwt#877</a>) for more.</p> </li> <li> <p>If using JJWT's support to use Jackson to parse <a href="https://github.com/jwtk/jjwt#json-jackson-custom-types">Custom Claim Types</a> (for example, a Claim that should be unmarshalled into a POJO), and the JSON for that POJO contained a member that is not represented in the specified class, Jackson would fail parsing by default. Because POJOs and JSON data models can sometimes be out of sync due to different class versions, the default behavior has been changed to ignore these unknown JSON members instead of failing (i.e. the <code>ObjectMapper</code>'s <code>DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES</code> is now set to <code>false</code>) by default.</p> <p>Again, if you prefer the stricter behavior of rejecting JSON with extra or unknown properties, you can configure <code>true</code> on your own <code>ObjectMapper</code> instance and use that instance with the <code>Jwts.parser()</code> builder.</p> </li> </ol> <h4>Additional Changes</h4> <p>This release also:</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jwtk/jjwt/commit/bf4168cdceb85435b17d912a2087960ae597d37f"><code>bf4168c</code></a> [maven-release-plugin] prepare release 0.12.4</li> <li><a href="https://github.com/jwtk/jjwt/commit/5c6dec061ff99ef7122a33960ada95e496a37087"><code>5c6dec0</code></a> - Adding 0.12.4 release version references</li> <li><a href="https://github.com/jwtk/jjwt/commit/dd10b12b53b5bb26299c5435aa9d193e71b6b918"><code>dd10b12</code></a> Added JWK Set documentation to README.mdJwkset doc (<a href="https://redirect.github.com/jwtk/jjwt/issues/912">#912</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/6335381c978ce83c9c15bd3c349f32d1bed72d4f"><code>6335381</code></a> PBES2 decryption maximum iterations (<a href="https://redirect.github.com/jwtk/jjwt/issues/911">#911</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/2884eb79529ec8b56ecdd7c9f7e7fbea5dfc4806"><code>2884eb7</code></a> - Updating to GitHub latest actions/checkout and actions/setup-java script ve...</li> <li><a href="https://github.com/jwtk/jjwt/commit/628bd6f4e8b885be2f9cfbd8cbf0767ce616003a"><code>628bd6f</code></a> Secret JWK <code>k</code> values larger than HMAC-SHA minimums (<a href="https://redirect.github.com/jwtk/jjwt/issues/909">#909</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/b12dabf100bbe8749d9bce49628d70b9f73af729"><code>b12dabf</code></a> Fix small typos (<a href="https://redirect.github.com/jwtk/jjwt/issues/908">#908</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/26f5dc3dbbb6070735498e4ea497f174b0a3850f"><code>26f5dc3</code></a> Updating changelog with more information/clarity for the 0.12.4 release (<a href="https://redirect.github.com/jwtk/jjwt/issues/907">#907</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/f61cfa875d1bfd9164c16069ab62bf7b74fcc831"><code>f61cfa8</code></a> Test case change to reflect accurate assertion for Elliptic Curve 'd' values ...</li> <li><a href="https://github.com/jwtk/jjwt/commit/fd619e0a4229e01cbd3ab1bd0a7a4f6cab21d784"><code>fd619e0</code></a> disable FAIL_ON_UNKNOWN_PROPERTIES deserialization feature of Jackson by defa...</li> <li>Additional commits viewable in <a href="https://github.com/jwtk/jjwt/compare/0.12.3...0.12.4">compare view</a></li> </ul> </details> <br /> Updates `io.jsonwebtoken:jjwt-jackson` from 0.12.3 to 0.12.4 Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 4525c95) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
github-actions bot
added a commit
that referenced
this pull request
Jan 29, 2024
Backport 4525c95 from #3995. Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dlin2028
pushed a commit
to dlin2028/security
that referenced
this pull request
May 1, 2024
Bumps `jjwt_version` from 0.12.3 to 0.12.4. Updates `io.jsonwebtoken:jjwt-api` from 0.12.3 to 0.12.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/releases">io.jsonwebtoken:jjwt-api's releases</a>.</em></p> <blockquote> <h2>0.12.4</h2> <p>This is patch release completes <a href="https://github.com/jwtk/jjwt/issues?q=milestone%3A0.12.4+is%3Aissue">10 issues</a>, with two especially noteworthy changes, and a number of other smaller bug fixes and enhancements.</p> <ol> <li>The default Jackson deserializer will now reject duplicate JSON members by default in an attempt to be a little more strict at rejecting potentially malicious or malformed JSON. This is a default and can be overridden with a custom <code>ObjectMapper</code> if desired.</li> <li>Password-based JWE encryption key algorithms (<code>PBES2_HS256_A128KW</code>, <code>PBES2_HS384_A192KW</code> and <code>PBES2_HS512_A256KW</code>) now enforce an upper bound (maximum) number of iterations allowed during decryption to mitigate against potential DoS attacks. Many thanks to Jingcheng Yang and Jianjun Chen from Sichuan University and Zhongguancun Lab for their work on this!</li> </ol> <p>A number of other issues fixed: thread-safe <code>ServiceLoader</code> usage for dynamic JSON processor lookup, Android enhancements for JSON <code>Reader</code> APIs, fixed Elliptic Curve field element padding, and more. Please read the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/CHANGELOG.md">0.12.4 CHANGELOG</a> for full details of all of these changes, and as always, project documentation is in the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/README.md">0.12.4 README</a>.</p> <p>Please allow 30 minutes from the time this announcement is published for the release to be available in Maven Central.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/blob/master/CHANGELOG.md">io.jsonwebtoken:jjwt-api's changelog</a>.</em></p> <blockquote> <h3>0.12.4</h3> <p>This patch release includes various changes listed below.</p> <h4>Jackson Default Parsing Behavior</h4> <p>This release makes two behavioral changes to JJWT's default Jackson <code>ObjectMapper</code> parsing settings:</p> <ol> <li> <p>In the interest of having stronger standards to reject potentially malformed/malicious/accidental JSON that could have undesirable effects on an application, JJWT's default <code>ObjectMapper </code>is now configured to explicitly reject/fail parsing JSON (JWT headers and/or Claims) if/when that JSON contains duplicate JSON member names.</p> <p>For example, now the following JSON, if parsed, would fail (be rejected) by default:</p> <pre lang="json"><code>{ "hello": "world", "thisWillFail": 42, "thisWillFail": "test" } </code></pre> <p>Technically, the JWT RFCs <em>do allow</em> duplicate named fields as long as the last parsed member is the one used (see <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-4">JWS RFC 7515, Section 4</a>), so this is allowed. However, because JWTs often reflect security concepts, it's usually better to be defensive and reject these unexpected scenarios by default. The RFC later supports this position/preference in <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-10.12">Section 10.12</a>:</p> <pre><code>Ambiguous and potentially exploitable situations could arise if the JSON parser used does not enforce the uniqueness of member names or returns an unpredictable value for duplicate member names. </code></pre> <p>Finally, this is just a default, and the RFC does indeed allow duplicate member names if the last value is used, so applications that require duplicates to be allowed can simply configure their own <code>ObjectMapper</code> and use that with JJWT instead of assuming this (new) JJWT default. See [Issue <a href="https://redirect.github.com/jwtk/jjwt/issues/877">#877</a>](<a href="https://redirect.github.com/jwtk/jjwt/issues/877">jwtk/jjwt#877</a>) for more.</p> </li> <li> <p>If using JJWT's support to use Jackson to parse <a href="https://github.com/jwtk/jjwt#json-jackson-custom-types">Custom Claim Types</a> (for example, a Claim that should be unmarshalled into a POJO), and the JSON for that POJO contained a member that is not represented in the specified class, Jackson would fail parsing by default. Because POJOs and JSON data models can sometimes be out of sync due to different class versions, the default behavior has been changed to ignore these unknown JSON members instead of failing (i.e. the <code>ObjectMapper</code>'s <code>DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES</code> is now set to <code>false</code>) by default.</p> <p>Again, if you prefer the stricter behavior of rejecting JSON with extra or unknown properties, you can configure <code>true</code> on your own <code>ObjectMapper</code> instance and use that instance with the <code>Jwts.parser()</code> builder.</p> </li> </ol> <h4>Additional Changes</h4> <p>This release also:</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jwtk/jjwt/commit/bf4168cdceb85435b17d912a2087960ae597d37f"><code>bf4168c</code></a> [maven-release-plugin] prepare release 0.12.4</li> <li><a href="https://github.com/jwtk/jjwt/commit/5c6dec061ff99ef7122a33960ada95e496a37087"><code>5c6dec0</code></a> - Adding 0.12.4 release version references</li> <li><a href="https://github.com/jwtk/jjwt/commit/dd10b12b53b5bb26299c5435aa9d193e71b6b918"><code>dd10b12</code></a> Added JWK Set documentation to README.mdJwkset doc (<a href="https://redirect.github.com/jwtk/jjwt/issues/912">#912</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/6335381c978ce83c9c15bd3c349f32d1bed72d4f"><code>6335381</code></a> PBES2 decryption maximum iterations (<a href="https://redirect.github.com/jwtk/jjwt/issues/911">#911</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/2884eb79529ec8b56ecdd7c9f7e7fbea5dfc4806"><code>2884eb7</code></a> - Updating to GitHub latest actions/checkout and actions/setup-java script ve...</li> <li><a href="https://github.com/jwtk/jjwt/commit/628bd6f4e8b885be2f9cfbd8cbf0767ce616003a"><code>628bd6f</code></a> Secret JWK <code>k</code> values larger than HMAC-SHA minimums (<a href="https://redirect.github.com/jwtk/jjwt/issues/909">#909</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/b12dabf100bbe8749d9bce49628d70b9f73af729"><code>b12dabf</code></a> Fix small typos (<a href="https://redirect.github.com/jwtk/jjwt/issues/908">#908</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/26f5dc3dbbb6070735498e4ea497f174b0a3850f"><code>26f5dc3</code></a> Updating changelog with more information/clarity for the 0.12.4 release (<a href="https://redirect.github.com/jwtk/jjwt/issues/907">#907</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/f61cfa875d1bfd9164c16069ab62bf7b74fcc831"><code>f61cfa8</code></a> Test case change to reflect accurate assertion for Elliptic Curve 'd' values ...</li> <li><a href="https://github.com/jwtk/jjwt/commit/fd619e0a4229e01cbd3ab1bd0a7a4f6cab21d784"><code>fd619e0</code></a> disable FAIL_ON_UNKNOWN_PROPERTIES deserialization feature of Jackson by defa...</li> <li>Additional commits viewable in <a href="https://github.com/jwtk/jjwt/compare/0.12.3...0.12.4">compare view</a></li> </ul> </details> <br /> Updates `io.jsonwebtoken:jjwt-impl` from 0.12.3 to 0.12.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/releases">io.jsonwebtoken:jjwt-impl's releases</a>.</em></p> <blockquote> <h2>0.12.4</h2> <p>This is patch release completes <a href="https://github.com/jwtk/jjwt/issues?q=milestone%3A0.12.4+is%3Aissue">10 issues</a>, with two especially noteworthy changes, and a number of other smaller bug fixes and enhancements.</p> <ol> <li>The default Jackson deserializer will now reject duplicate JSON members by default in an attempt to be a little more strict at rejecting potentially malicious or malformed JSON. This is a default and can be overridden with a custom <code>ObjectMapper</code> if desired.</li> <li>Password-based JWE encryption key algorithms (<code>PBES2_HS256_A128KW</code>, <code>PBES2_HS384_A192KW</code> and <code>PBES2_HS512_A256KW</code>) now enforce an upper bound (maximum) number of iterations allowed during decryption to mitigate against potential DoS attacks. Many thanks to Jingcheng Yang and Jianjun Chen from Sichuan University and Zhongguancun Lab for their work on this!</li> </ol> <p>A number of other issues fixed: thread-safe <code>ServiceLoader</code> usage for dynamic JSON processor lookup, Android enhancements for JSON <code>Reader</code> APIs, fixed Elliptic Curve field element padding, and more. Please read the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/CHANGELOG.md">0.12.4 CHANGELOG</a> for full details of all of these changes, and as always, project documentation is in the <a href="https://github.com/jwtk/jjwt/blob/0.12.4/README.md">0.12.4 README</a>.</p> <p>Please allow 30 minutes from the time this announcement is published for the release to be available in Maven Central.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jwtk/jjwt/blob/master/CHANGELOG.md">io.jsonwebtoken:jjwt-impl's changelog</a>.</em></p> <blockquote> <h3>0.12.4</h3> <p>This patch release includes various changes listed below.</p> <h4>Jackson Default Parsing Behavior</h4> <p>This release makes two behavioral changes to JJWT's default Jackson <code>ObjectMapper</code> parsing settings:</p> <ol> <li> <p>In the interest of having stronger standards to reject potentially malformed/malicious/accidental JSON that could have undesirable effects on an application, JJWT's default <code>ObjectMapper </code>is now configured to explicitly reject/fail parsing JSON (JWT headers and/or Claims) if/when that JSON contains duplicate JSON member names.</p> <p>For example, now the following JSON, if parsed, would fail (be rejected) by default:</p> <pre lang="json"><code>{ "hello": "world", "thisWillFail": 42, "thisWillFail": "test" } </code></pre> <p>Technically, the JWT RFCs <em>do allow</em> duplicate named fields as long as the last parsed member is the one used (see <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-4">JWS RFC 7515, Section 4</a>), so this is allowed. However, because JWTs often reflect security concepts, it's usually better to be defensive and reject these unexpected scenarios by default. The RFC later supports this position/preference in <a href="https://datatracker.ietf.org/doc/html/rfc7515#section-10.12">Section 10.12</a>:</p> <pre><code>Ambiguous and potentially exploitable situations could arise if the JSON parser used does not enforce the uniqueness of member names or returns an unpredictable value for duplicate member names. </code></pre> <p>Finally, this is just a default, and the RFC does indeed allow duplicate member names if the last value is used, so applications that require duplicates to be allowed can simply configure their own <code>ObjectMapper</code> and use that with JJWT instead of assuming this (new) JJWT default. See [Issue <a href="https://redirect.github.com/jwtk/jjwt/issues/877">#877</a>](<a href="https://redirect.github.com/jwtk/jjwt/issues/877">jwtk/jjwt#877</a>) for more.</p> </li> <li> <p>If using JJWT's support to use Jackson to parse <a href="https://github.com/jwtk/jjwt#json-jackson-custom-types">Custom Claim Types</a> (for example, a Claim that should be unmarshalled into a POJO), and the JSON for that POJO contained a member that is not represented in the specified class, Jackson would fail parsing by default. Because POJOs and JSON data models can sometimes be out of sync due to different class versions, the default behavior has been changed to ignore these unknown JSON members instead of failing (i.e. the <code>ObjectMapper</code>'s <code>DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES</code> is now set to <code>false</code>) by default.</p> <p>Again, if you prefer the stricter behavior of rejecting JSON with extra or unknown properties, you can configure <code>true</code> on your own <code>ObjectMapper</code> instance and use that instance with the <code>Jwts.parser()</code> builder.</p> </li> </ol> <h4>Additional Changes</h4> <p>This release also:</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jwtk/jjwt/commit/bf4168cdceb85435b17d912a2087960ae597d37f"><code>bf4168c</code></a> [maven-release-plugin] prepare release 0.12.4</li> <li><a href="https://github.com/jwtk/jjwt/commit/5c6dec061ff99ef7122a33960ada95e496a37087"><code>5c6dec0</code></a> - Adding 0.12.4 release version references</li> <li><a href="https://github.com/jwtk/jjwt/commit/dd10b12b53b5bb26299c5435aa9d193e71b6b918"><code>dd10b12</code></a> Added JWK Set documentation to README.mdJwkset doc (<a href="https://redirect.github.com/jwtk/jjwt/issues/912">#912</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/6335381c978ce83c9c15bd3c349f32d1bed72d4f"><code>6335381</code></a> PBES2 decryption maximum iterations (<a href="https://redirect.github.com/jwtk/jjwt/issues/911">#911</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/2884eb79529ec8b56ecdd7c9f7e7fbea5dfc4806"><code>2884eb7</code></a> - Updating to GitHub latest actions/checkout and actions/setup-java script ve...</li> <li><a href="https://github.com/jwtk/jjwt/commit/628bd6f4e8b885be2f9cfbd8cbf0767ce616003a"><code>628bd6f</code></a> Secret JWK <code>k</code> values larger than HMAC-SHA minimums (<a href="https://redirect.github.com/jwtk/jjwt/issues/909">#909</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/b12dabf100bbe8749d9bce49628d70b9f73af729"><code>b12dabf</code></a> Fix small typos (<a href="https://redirect.github.com/jwtk/jjwt/issues/908">#908</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/26f5dc3dbbb6070735498e4ea497f174b0a3850f"><code>26f5dc3</code></a> Updating changelog with more information/clarity for the 0.12.4 release (<a href="https://redirect.github.com/jwtk/jjwt/issues/907">#907</a>)</li> <li><a href="https://github.com/jwtk/jjwt/commit/f61cfa875d1bfd9164c16069ab62bf7b74fcc831"><code>f61cfa8</code></a> Test case change to reflect accurate assertion for Elliptic Curve 'd' values ...</li> <li><a href="https://github.com/jwtk/jjwt/commit/fd619e0a4229e01cbd3ab1bd0a7a4f6cab21d784"><code>fd619e0</code></a> disable FAIL_ON_UNKNOWN_PROPERTIES deserialization feature of Jackson by defa...</li> <li>Additional commits viewable in <a href="https://github.com/jwtk/jjwt/compare/0.12.3...0.12.4">compare view</a></li> </ul> </details> <br /> Updates `io.jsonwebtoken:jjwt-jackson` from 0.12.3 to 0.12.4 Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 2.x
backport to 2.x branch
dependencies
Pull requests that update a dependency file
java
Pull requests that update Java code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps
jjwt_version
from 0.12.3 to 0.12.4.Updates
io.jsonwebtoken:jjwt-api
from 0.12.3 to 0.12.4Release notes
Sourced from io.jsonwebtoken:jjwt-api's releases.
Changelog
Sourced from io.jsonwebtoken:jjwt-api's changelog.
... (truncated)
Commits
bf4168c
[maven-release-plugin] prepare release 0.12.45c6dec0
- Adding 0.12.4 release version referencesdd10b12
Added JWK Set documentation to README.mdJwkset doc (#912)6335381
PBES2 decryption maximum iterations (#911)2884eb7
- Updating to GitHub latest actions/checkout and actions/setup-java script ve...628bd6f
Secret JWKk
values larger than HMAC-SHA minimums (#909)b12dabf
Fix small typos (#908)26f5dc3
Updating changelog with more information/clarity for the 0.12.4 release (#907)f61cfa8
Test case change to reflect accurate assertion for Elliptic Curve 'd' values ...fd619e0
disable FAIL_ON_UNKNOWN_PROPERTIES deserialization feature of Jackson by defa...Updates
io.jsonwebtoken:jjwt-impl
from 0.12.3 to 0.12.4Release notes
Sourced from io.jsonwebtoken:jjwt-impl's releases.
Changelog
Sourced from io.jsonwebtoken:jjwt-impl's changelog.
... (truncated)
Commits
bf4168c
[maven-release-plugin] prepare release 0.12.45c6dec0
- Adding 0.12.4 release version referencesdd10b12
Added JWK Set documentation to README.mdJwkset doc (#912)6335381
PBES2 decryption maximum iterations (#911)2884eb7
- Updating to GitHub latest actions/checkout and actions/setup-java script ve...628bd6f
Secret JWKk
values larger than HMAC-SHA minimums (#909)b12dabf
Fix small typos (#908)26f5dc3
Updating changelog with more information/clarity for the 0.12.4 release (#907)f61cfa8
Test case change to reflect accurate assertion for Elliptic Curve 'd' values ...fd619e0
disable FAIL_ON_UNKNOWN_PROPERTIES deserialization feature of Jackson by defa...Updates
io.jsonwebtoken:jjwt-jackson
from 0.12.3 to 0.12.4Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)