OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.14k stars 587 forks source link

BETA BLOG - MicroProfile JSON Web Token 1.2 #14454

Closed teddyjtorres closed 3 years ago

teddyjtorres commented 3 years ago

The information you provide here will be included in the Open Liberty beta blog post (example), which will be published on the OpenLiberty.io blog, and potentially elsewhere, to promote this beta of Open Liberty.

Please provide the following information the week before the GA/beta date (to allow for review and publishing):

  1. Which Liberty feature does your update relate to?

    Human-readable name (eg WebSockets feature):

MicroProfile JSON Web Token 1.2

Feature name (eg websockets-1.0):

mpJwt-1.2

  1. Who is the target persona? Who do you expect to use the update? eg application developer, operations.

application developer

  1. Write a paragraph to summarises the update, including the following points:

    • A sentence or two that introduces the update to someone new to the general technology/concept.

The MicroProfile JSON Web Token 1.2 specification allows using a JWT token for authenticating and authorizing requests to a service. The specification simplifies the configuration for managing the validation of the JWT by introducing new MicroProfile Config properties. Enhanced signature algorithm support is added in this Open Liberty beta.

Version 1.2 of the MicroProfile JSON Web Token specification adds the following MicroProfile Config properties to control different aspects of the JWT validation.

mp.jwt.token.header

The mp.jwt.token.header property allows you to control the HTTP request header which is expected to contain a JWT token. You can specify either Authorization (default) or Cookie values.

mp.jwt.token.cookie

The mp.jwt.token.cookie property allows you to specify the name of the cookie which is expected to contain a JWT token. The default value is Bearer if not specified.

mp.jwt.verify.audiences

The mp.jwt.verify.audiences property allows you to create list of allowable "aud" values. At least one of these must be found in the claim. Previously, this had to be configured in the server.xml file. Now, you can configure the audiences in the MicroProfile config property as follows:

mp.jwt.verify.audiences=conferenceService

mp.jwt.verify.publickey.algorithm

The mp.jwt.verify.publickey.algorithm property allows you to control the Public Key Signature Algorithm that is supported by the MP JWT endpoint. The default value is RSA256 if not specified. Previously, this had to be configured in the server.xml file. Now, you can configure the public key algorithm used for verification of the JWT in the MicroProfile config property as follows:

mp.jwt.verify.publickey.algorithm=ES256

The specification also adds support for the ES256 signature algorithm, while this Open Liberty beta supports using the RS384, RS512, HS384, HS512, ES256, ES384, and the ES512 signature algorithms.

Enable the MicroProfile JWT 1.2 feature in the server.xml.

   <featureManager>
       <feature>mpJwt-1.2</feature>
   </featureManager>
  • Where can they find out more about this specific update (eg Open Liberty docs, Javadoc) and/or the wider technology?

  • The specification

  • The release note

What happens next?

teddyjtorres commented 3 years ago

For beta 20.0.0.12

austin0 commented 3 years ago

Blog has been published, closing.