SmallRye JWT is a library for implementing the Eclipse MicroProfile JWT RBAC. Currently it is focused on supporting the MP-JWT 1.1 spec, and primarily deals with the parsing of the JWT string into a JsonWebToken implementation.
In the future, when MP-JWT 2.0 can build on the JSR-375 security APIs, there should be more support for defining the CDI extension and security layer integration.
Property Name | Default | Description |
---|---|---|
|
|
Public Key supplied as a string, parsed from it in the order defined in section Supported Public Key Formats. |
|
|
Config property allows for an external or internal location of Public Key to be specified. |
|
|
Expected value of the JWT |
Public Keys may be formatted in any of the following formats, specified in order of precedence:
-
Public Key Cryptography Standards #8 (PKCS#8) PEM
-
JSON Web Key (JWK) or JSON Web Key Set (JWKS)
-
Base64 URL encoded JSON Web Key (JWK) or JSON Web Key Set (JWKS)
Smallrye JWT supports many properties which can be used to customize the token processing:
Property Name | Default | Description |
---|---|---|
|
|
Signature algorithm. Set it to |
|
|
Set this property to a specific key format such as |
|
|
Set this property if another header such as |
|
|
Name of the cookie containing a token. This property will be effective only if |
|
|
Comma-separated list containing an alternative single or multiple schemes, for example, |
|
|
Key identifier. If it is set then the verification JWK key as well every JWT token must have a matching |
|
|
The maximum number of seconds that a JWT may be issued for use. Effectively, the difference between the expiration date of the JWT and the issued at date must not exceed this value. |
|
|
If an application relies on |
|
|
Path to the claim containing the subject name. It starts from the top level JSON object and can contain multiple segments where each segment represents a JSON object name only, example: |
|
|
This property can be used to set a default sub claim value when the current token has no standard or custom |
|
|
Path to the claim containing the groups. It starts from the top level JSON object and can contain multiple segments where each segment represents a JSON object name only, example: |
|
|
Separator for splitting a string which may contain multiple group values. It will only be used if the |
|
|
This property can be used to set a default groups claim value when the current token has no standard or custom groups claim available. |
|
|
JWK cache refresh interval in minutes. It will be ignored unless the |
|
|
Expiration grace in seconds. By default an expired token will still be accepted if the current time is no more than 1 min after the token expiry time. |
|
|
Comma separated list of the audiences that a token |
Compile and install this project:
mvn clean install
-
implementation - Implementation of the Eclipse MicroProfile JWT RBAC library.
-
tck - Test suite to run the implementation against the Eclipse MicroProfile JWT RBAC TCK.
-
docs - Project documentation.