This page consolidates the public surface of Cervantes: artefacts to declare, exported JPMS modules, recognised security annotations, every mp.jwt.* key read by JwtAuthConfigProducer, and every JOSE algorithm supported by the signature and encryption engine.
Maven artefacts
groupId |
artifactId |
Role |
|---|---|---|
|
|
MP JWT 2.1 spec repackaged into a named JPMS module ( |
|
|
Stable public SPI — |
|
|
Pure validation engine — JWT parsing, signature verification (RS/ES/PS/HS), claim validation, key loading (PEM, JWKS), JWE decryption. No CDI, no JAX-RS. |
|
|
|
|
|
|
|
|
JMH benchmarks (vs SmallRye JWT, opt-in profile |
|
|
Examples ( |
|
|
Official MP JWT 2.1 TCK runner — outside the reactor (Model 4.0.0). Do not declare as an application dependency. |
All versions at 0.1.0-SNAPSHOT at the time of writing. Shared parent io.vidocq:vidocq-parent:1.0.0-SNAPSHOT.
JPMS modules
| Module | Contents |
|---|---|
|
Spec repackaging — annotations |
|
|
|
|
|
|
|
|
io.vidocq.cervantes.internal.* is never exported. Any application class depending on it signals a regression to be fixed.
Recognised security annotations
| Annotation | Effect | Status |
|---|---|---|
|
Caller must own at least one of the listed roles (a role is a string from the |
✅ |
|
Endpoint open to everyone, anonymous included. Disables inherited |
✅ |
|
Endpoint always rejected with 403, whatever the token. |
✅ |
|
CDI injection qualifier. The typed value is extracted from the current |
✅ |
|
Variant naming the claim by its MP standard enum (instead of a free string). |
✅ |
|
Application-level marker (spec compatibility). Cervantes accepts it without specific action — the auth filter is registered anyway. |
✅ |
Supported types for @Claim
| Java type | Semantics |
|---|---|
|
Coercion: |
|
|
|
|
|
|
|
|
|
For array-typed claims ( |
|
Raw value parsed by Champollion. |
|
JSON-P sub-types. |
|
Eager. Resolved once at injection. |
|
Lazy MP. |
|
Lazy CDI. |
|
Lazy JDK. |
|
The original raw token — useful for propagation. |
mp.jwt.* MicroProfile Config keys
All keys are read through ConfigProvider.getConfig() — provided by Ravel in the Vidocq ecosystem.
Signature verification
| Key | Effect |
|---|---|
|
Inline public key. Accepts X.509 PEM ( |
|
Public-key location: |
|
Expected algorithm family ( |
|
Expected issuer — string. Strictly compared to the token’s |
|
Accepted audiences — comma-separated list. At least one intersection with |
|
Clock-skew tolerance in seconds (default 60). Applied to |
|
Maximum token age, in seconds since |
|
Boolean — require the |
Token transport
| Key | Effect |
|---|---|
|
|
|
Cookie name carrying the token when |
JWE decryption (optional)
| Key | Effect |
|---|---|
|
Inline decryption private key. PKCS#8 PEM. |
|
Decryption private-key location. |
|
Expected key-wrapping algorithm: |
Supported signature algorithms
| Family | Algorithms | JDK implementation |
|---|---|---|
RSA |
|
|
RSA-PSS |
|
|
ECDSA |
|
|
HMAC |
|
|
Supported JWE algorithms
| Step | Algorithm | Notes |
|---|---|---|
Key wrapping ( |
|
|
Content encryption ( |
|
|
(planned) |
|
Not yet supported — to be added if a future TCK milestone requires it. |
HTTP behaviour
| Situation | Code |
|---|---|
No token + |
Endpoint runs anonymously. |
No token + |
|
Token present, invalid signature / expired |
|
Valid token but missing required role |
|
Valid token and required role present |
|
|
|
Compatibility
-
Java 25 (LTS), Maven 3.9.16.
-
JAX-RS 4.0 (Cassini or another compliant runtime).
-
CDI 4.1 Lite (Vauban) with BCE support.
-
MicroProfile Config 3.1+ (Ravel).
-
JSON-P 2.1 (Champollion).
-
No Jakarta EE Full Profile dependency.