TomEE MicroProfile JWT
Apache TomEE supports MicroProfile JWT 2.0, which allows applications to be secured using JWTs. JWTs may be either:
Key types supported:
-
RSA
-
Elliptic curve (EC)
Key formats supported:
-
PEM PKCS1 and PKCS8
-
JWK and JWKS
-
OpenSSH Public Key (
.pub
andauthorized_keys
) -
SSH 2 Public Key
Signature algorithms supported:
-
RS256
-
RS384
-
RS512
-
ES256
-
ES384
-
ES512
Decryption algorithms supported:
-
RSA-OAEP
-
RSA-OAEP-256
-
ECDH-ES
-
ECDH-ES+A128KW
-
ECDH-ES+A192KW
-
ECDH-ES+A256KW
MicroProfile JWT Configuration Properties
Specifying the keys for verifying or decrypting JWTs is done via a META-INF/microprofile-config.properties
and the following MP JWT 2.0 Configuration Properties.
Property | Type | Description |
---|---|---|
|
String |
The contents of any valid public key file. Allows the public key to be inlined into the |
|
String |
The location of any valid public key file. Can be specified as a relative path on disk, relative path on the classpath, or valid URL such a |
|
String |
The location of any valid private key file. Can be specified as a relative path on disk, relative path on the classpath, or valid URL such a |
|
String |
The name of the HTTP Request header where clients will JWTs. The default value is |
|
String |
When |
|
String |
A comma delimited list of allowable values for the JWT |
|
String |
The expected value of the |
|
String |
The expected value of the |
TomEE JWT Configuration Properties
In addition to the standard MicroProfile JWT configuration properties above, the META-INF/microprofile-config.properties
may contain any of the following TomEE-specific configuration properties.
Property | Type | Description |
---|---|---|
|
|
Boolean |
Disables enforcing the |
|
Boolean |
Enables public keys to be supplied after deployment has occurred or refreshed periodically at runtime. Useful for when keys are supplied via an |
|
|
Should the first attempt to load keys fail, this setting specifies how long we should wait before trying again. An exponential backoff will occur and the delay will double on each subsequent retry. This allows retrying to be very aggressive in the event of a temporary issue, but prevents overloading the server supplying the keys. The default value is |
|
|
Allows the retry attempts to eventually reach a fixed rate after a certain maximum delay is reached. This property disables the exponential backoff once the specified maximum delay is reached. All subsequent retries will happen at the interval specifed. To disable exponential backoff entirely, set |
|
|
Specifies the maximum time incoming HTTP Requests with JWTs will block and wait for keys when no keys are available. If specified time is reached, callers will recieve a HTTP |
|
|
Specifies how frequently TomEE should check the configured location for new keys. Should any refresh fail or result in no valid keys, the keys currently in use are not replaced and no subsequent attempts are made until the next refresh interval. The default value is |
|
Boolean |
Enables private keys to be supplied after deployment has occurred or refreshed periodically at runtime. Useful for when keys are supplied via an |
|
|
Should the first attempt to load keys fail, this setting specifies how long we should wait before trying again. An exponential backoff will occur and the delay will double on each subsequent retry. This allows retrying to be very aggressive in the event of a temporary issue, but prevents overloading the server supplying the keys. The default value is |
|
|
Allows the retry attempts to eventually reach a fixed rate after a certain maximum delay is reached. This property disables the exponential backoff once the specified maximum delay is reached. All subsequent retries will happen at the interval specifed. To disable exponential backoff entirely, set |
|
|
Specifies the maximum time incoming HTTP Requests with JWTs will block and wait for keys when no keys are available. If specified time is reached, callers will recieve a HTTP |
|