Skip to content

Releases: awslabs/aws-jwt-verify

v5.0.0

08 Jan 08:41
b291c6c
Compare
Choose a tag to compare

Notable new features in v5.0.0:

  • Support for ECDSA and EdDSA algorithms:
    • ES256
    • ES384
    • ES512
    • Ed25519
    • Ed448
  • Allow padding characters (even though non-standard) so e.g. AWS ALB JWTs can be verified with this library (however work is still underway to make that easier still, see #176 )
  • The default response timeout of the JWKS fetcher was increased from 1500 ms. to 3000 ms. because multiple users reported the previous 1500 ms. being too low--they were hitting timeouts too often. We believe the 3000 ms. is a better, more reasonable, default value.

Breaking changes

This release includes breaking changes, hence moving to major version 5.0.0:

  • Dropped support for Node.js 14, now 16 is the minimum.
  • The fetchJson interface was changed and renamed to fetch. Thus the JsonFetcher was renamed to Fetcher, and corresponding changes were made in the SimpleJwksCache see #167. So, this affects users who were using the SimpleJsonFetcher, potentially to increase the response timeout (maybe that's no longer needed now, as we raised the default value from 1500 ms. to 3000 ms.).
  • It is now allowed to use an explicit null as issuer when creating the verifier, to cater for issuers that create JWTs without iss field (which is non-standard): see #183 . Previously, you couldn't create a verifier for issuer null and JWTs without iss field would always throw JwtInvalidIssuerError. This change likely is breaking to no-one, but technically this is a breaking change. So if your code was explicitly using JwtInvalidIssuerError (e.g. because you imported it), check if it still TS-compiles and works.
  • We renamed the JwtRsaVerifier to JwtVerifier as it handles ECDSA and EdDSA now too but created a top level (immediately deprecated) alias to JwtVerifier so if you do import { JwtRsaVerifier } from "aws-jwt-verifier" that still works. This will break though: import { JwtRsaVerifier } from "aws-jwt-verifier/jwt-rsa" and should become import { JwtVerifier } from "aws-jwt-verifier/jwt-verifier" (if for some reason you were importing like that and not from top-level).

What's Changed

Full Changelog: v4.0.1...v5.0.0

v4.0.1

12 Feb 15:14
8bb9b6e
Compare
Choose a tag to compare

What's Changed

  • Bump vite from 2.9.13 to 2.9.16 in /tests/vite-app by @dependabot in #124
  • Bump fast-xml-parser and @aws-sdk/client-cognito-identity-provider in /tests/cognito by @dependabot in #125
  • Bump tough-cookie from 4.0.0 to 4.1.3 in /tests/cognito by @dependabot in #129
  • Bump fast-xml-parser and @aws-sdk/client-cognito-identity-provider in /tests/cognito by @dependabot in #130
  • Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #131
  • Bump word-wrap from 1.2.3 to 1.2.4 in /tests/cognito by @dependabot in #132
  • update cypress (v9 to v12), vite (v2 to v4) by @hakanson in #134
  • fix: pin build to npm v9 by @hakanson in #143
  • Bump postcss from 8.4.27 to 8.4.31 in /tests/vite-app by @dependabot in #139
  • Bump @cypress/request and cypress in /tests/vite-app by @dependabot in #144
  • Bump @babel/traverse from 7.15.4 to 7.23.2 in /tests/cognito by @dependabot in #140
  • Bump @babel/traverse from 7.22.10 to 7.23.2 in /tests/vite-app by @dependabot in #142
  • Bump @babel/traverse from 7.20.12 to 7.23.2 by @dependabot in #141
  • Add sub claim to JWT standard fields by @kaira in #148
  • Bump vite from 4.4.9 to 4.4.12 in /tests/vite-app by @dependabot in #150
  • Bump vite from 4.4.12 to 4.5.2 in /tests/vite-app by @dependabot in #153
  • Fix MSB 1 leading to negative modulus in bun by @ottokruse in #155
  • Bump to v4.0.1 for npm release by @ottokruse in #156

New Contributors

Full Changelog: v4.0.0...v4.0.1

v4.0.0

20 Mar 14:41
16a3d53
Compare
Choose a tag to compare

What's Changed

NOTE: #117 constitutes a breaking change, hence we created new major version v4.0.0, but you will only be impacted by this change, if you were doing this:

import { decomposeJwt } from "aws-jwt-verify/jwt"

That method has been renamed (to make it more clear) and must now be imported like so:

import { decomposeUnverifiedJwt } from "aws-jwt-verify/jwt";

Happy coding!

Full Changelog: v3.4.0...v4.0.0

v3.4.0

27 Jan 17:28
0fad4d3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.3.0...v3.4.0

v3.3.0

11 Jan 15:40
d932662
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.2.0...v3.3.0

v3.2.0

26 Oct 07:58
691e27d
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.1.0...v3.2.0

v3.1.0

23 May 07:45
0963e65
Compare
Choose a tag to compare

What's Changed

  • Sync README.md with implementation: group --> groups by @ottokruse in #65
  • Only verify for the JWK at hand, that it is a JWK intended for RSA signatures by @ottokruse in #70
  • Documented how to use the generic RSA verifier with Cognito by @ottokruse in #74
  • Release v3.1.0 by @ottokruse in #75

Full Changelog: v3.0.0...v3.1.0

v3.0.0

29 Mar 15:15
cd68173
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.1.3...v3.0.0

v2.1.3

02 Feb 13:34
090b5cf
Compare
Choose a tag to compare

What's Changed

  • TypeScript fix (add missing d.ts file to the NPM published package) by @ottokruse in #54

Full Changelog: v2.1.2...v2.1.3

v2.1.2

01 Feb 09:45
e3feb11
Compare
Choose a tag to compare

Reduced bundle size

  • Clean up typescript configuration to avoid including types twice (both for ESM and common JS) and instead do it only once. This also resulted in a reduced bundle size for the library distribution.

Upgrades CDK package versions used in integration tests

  • CDK packages in test/Cognito for integration tests are upgraded to bump up a dependency used by CDK - VM2 version to 3.9.4 . This is to address dependabot alert for VM2 version 3.9.3

What's Changed

Full Changelog: v2.1.1...v2.1.2