You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Sets auth cookie on successful authentication when '?set-auth-cookie' is present
184
+
# Sets auth cookie on POST /token/cookie (or legacy: when '?set-auth-cookie' is present)
172
185
# Compatible with both rndTokenManager and jwtTokenManager
173
186
authCookieSetter:
174
-
enabled: false # Not enabled by default
175
-
name: rh_auth # The name of the cookie to be set
176
-
domain: localhost # The domain within which the cookie is valid.
177
-
path: / # The cookie path, applicable to the entire domain.
178
-
http-only: true # If true enhances security by making the cookie inaccessible to JavaScript.
179
-
same-site: true # Restricts the cookie to first-party contexts, preventing CSRF attacks.
180
-
same-site-mode: strict # Strictly prevents the cookie from being sent along with cross-site requests.
181
-
expires-ttl: 86_400 # Defines the duration in seconds for which the cookie is valid (default: 86400 seconds = 1 day). When using jwtTokenManager, this value should match the TTL configured at /jwtTokenManager/ttl.
187
+
enabled: true # Enabled by default for /token/cookie endpoint
188
+
name: rh_auth # The name of the cookie to be set
189
+
domain: localhost # The domain within which the cookie is valid.
190
+
path: / # The cookie path, applicable to the entire domain.
191
+
http-only: true # If true enhances security by making the cookie inaccessible to JavaScript.
192
+
same-site: true # Restricts the cookie to first-party contexts, preventing CSRF attacks.
193
+
same-site-mode: strict # Strictly prevents the cookie from being sent along with cross-site requests.
194
+
ttl: 15 # Cookie expiration time in minutes (matches jwtTokenManager/ttl)
195
+
allow-legacy: false # If true, allows legacy ?set-auth-cookie query parameter on any endpoint (not recommended)
182
196
183
197
# Creates Authorization header from auth cookie. Compatible with Basic and JWT auth.
184
198
authCookieHandler:
185
-
enabled: false # Not enabled by default
199
+
enabled: true # Enabled by default for cookie-based authentication
186
200
187
201
# Clears auth cookie on POST /logout, logging out the user
188
202
authCookieRemover:
189
-
enabled: false # Not enabled by default
190
-
secure: false # If request to clean the cookie should be authenticated
191
-
defaultUri: /logout # The endpoint that triggers this service.
203
+
enabled: true # Enabled by default
204
+
secure: false # If request to clean the cookie should be authenticated
205
+
defaultUri: /logout # The endpoint that triggers this service.
192
206
----
193
207
194
208
=== Authorizers
@@ -246,22 +260,20 @@ fullAuthorizer:
246
260
# Generates and verifies auth tokens. First configured manager is used.
247
261
# Token returned via auth-token header on successful authentication.
248
262
249
-
# rndTokenService generates auth tokens using a random number generator.
263
+
# rndTokenManager generates auth tokens using a random number generator.
250
264
rndTokenManager:
251
-
enabled: true
265
+
enabled: false
252
266
ttl: 15 # in minutes
253
267
srv-uri: /tokens
254
268
255
269
# jwtTokenManager generates JWT auth tokens.
256
270
# Use this in clustered deployments, since all nodes sharing the key
257
271
# can verify the token independently
258
272
jwtTokenManager:
259
-
enabled: false
260
-
key: secret
273
+
enabled: true
261
274
ttl: 15 # in minutes
262
-
srv-uri: /tokens
263
-
issuer: restheart.org
264
-
audience: null
275
+
srv-uri: /token
276
+
# Note: key, algorithm, issuer, audience configured via jwtConfigProvider
265
277
# additional JWT claims from accounts properties
266
278
account-properties-claims:
267
279
# - foo # property name
@@ -453,6 +465,8 @@ graphql:
453
465
# The time limit in milliseconds for processing queries. Set to 0 for no time limit.
454
466
query-time-limit: 0 # in milliseconds
455
467
verbose: false
468
+
# restrict-mapping-db: when enabled, all mappings must use the same db as the GraphQL app definition
469
+
restrict-mapping-db: false
456
470
457
471
# Automatically creates indexes on {"descriptor.uri":1} and {"descriptor.name":1}
458
472
# for GraphQL applications to improve query performance when fetching app definitions
@@ -502,10 +516,6 @@ static-resources:
502
516
503
517
[source,yml]
504
518
----
505
-
# Service to GET and DELETE (invalidate) the user auth token generated by the TokenManager
506
-
authTokenService:
507
-
uri: /tokens
508
-
509
519
# Simple ping service
510
520
# Must respond with HTTP 200 OK
511
521
# If enable-extended-response is true, returns the following JSON response
@@ -526,8 +536,20 @@ roles:
526
536
527
537
# A global blacklist for mongodb operators in filter query parameter
528
538
filterOperatorsBlacklist:
529
-
blacklist: [ "$where" ]
539
+
blacklist: ["$where"]
540
+
enabled: true
541
+
542
+
# Aggregation pipeline security settings
543
+
aggregationSecurity:
530
544
enabled: true
545
+
# Block dangerous pipeline stages that can access other databases or execute code
0 commit comments