Skip to content

Commit 6da52f3

Browse files
committed
Update upgrade to v9 with jwt configuration breaking change
1 parent 6a8200d commit 6da52f3

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

docs/foundations/upgrade-to-v9.adoc

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -669,36 +669,89 @@ permissions:
669669

670670
==== Breaking Changes
671671

672-
1. **Map-Reduce Pipelines Removed**
672+
1. **JWT Configuration Restructuring**
673+
- **JWT Now Default**: JWT authentication is now enabled by default (previously RND tokens were default)
674+
- **Centralized Configuration**: New `jwtConfigProvider` component consolidates JWT settings (key, algorithm, issuer, audience) into a single source of truth, eliminating duplication across `jwtAuthenticationMechanism` and `jwtTokenManager`
675+
- **Secure Key Generation**: JWT key defaults changed from `"secret"` to `null`, enabling automatic secure random key generation
676+
- **Cookie Handling Enabled**: `authCookieHandler` and `authCookieSetter` are now enabled by default
677+
- **Cookie TTL Unit Change**: Cookie TTL configuration unit changed from seconds (`expires-ttl`) to minutes
678+
- **Token Endpoint Change**: Token service URI changed from `/tokens` to `/token`
679+
- Action: Review and update JWT configuration if you have custom settings
680+
- Action: If you prefer RND tokens, explicitly disable JWT and enable RND in your configuration
681+
- Action: Update any references from `/tokens` to `/token` endpoint
682+
683+
2. **Map-Reduce Pipelines Removed**
673684
- Action: Migrate all map-reduce aggregations to standard aggregation pipelines before upgrading
674685

675-
2. **Docker Image Changes**
686+
3. **Docker Image Changes**
676687
- Action: Update Docker references from `softinstigate/restheart` (OpenJDK) to the GraalVM-based image
677688
- Note: The `latest` tag now points to the GraalVM image
678689

679-
3. **GraphQL App Descriptor Structure**
690+
4. **GraphQL App Descriptor Structure**
680691
- Action: Remove `descriptor.name` field from GraphQL app definition documents
681692
- Action: Ensure `_id` fields are strings if not using custom URIs
682693

683-
4. **Token Authentication Endpoints**
694+
5. **Token Authentication Endpoints**
684695
- Action: Update client applications to use `/token` or `/token/cookie` endpoints
685696
- Action: Remove `?set-auth-cookie` and similar query parameters from API calls
686697

687698
==== Configuration Updates
688699

700+
**JWT Configuration Provider:**
701+
702+
RESTHeart v9 introduces a centralized JWT configuration provider that eliminates duplication. JWT settings are now defined once and shared across all JWT-related components:
703+
704+
[source,yml]
705+
----
706+
jwtConfigProvider:
707+
key: null # null enables secure random key generation
708+
algorithm: HS256
709+
issuer: restheart
710+
audience: restheart
711+
----
712+
689713
**Default JWT Authentication:**
690714

691-
JWT authentication is now enabled by default. If you prefer RND tokens, update your configuration:
715+
JWT authentication is now enabled by default with secure defaults. If you prefer RND tokens, update your configuration:
692716

693717
[source,yml]
694718
----
719+
# Disable JWT authentication and token manager
720+
jwtAuthenticationMechanism:
721+
enabled: false
722+
695723
jwtTokenManager:
696724
enabled: false
697725
726+
# Enable RND token manager
698727
rndTokenManager:
699728
enabled: true
700729
----
701730

731+
**Cookie Handling:**
732+
733+
Cookie handlers are now enabled by default. Note the TTL unit has changed from seconds to minutes:
734+
735+
[source,yml]
736+
----
737+
authCookieHandler:
738+
enabled: true
739+
740+
authCookieSetter:
741+
enabled: true
742+
ttl: 15 # minutes (previously was expires-ttl in seconds)
743+
----
744+
745+
**Token Endpoint:**
746+
747+
The token service endpoint has changed from `/tokens` to `/token`:
748+
749+
[source,yml]
750+
----
751+
authTokenService:
752+
uri: /token # changed from /tokens
753+
----
754+
702755
**Aggregation Security:**
703756

704757
Review and configure aggregation security settings based on your security requirements:

0 commit comments

Comments
 (0)