Skip to content

Commit 1b80bc7

Browse files
qqmyerspdurbin
andauthored
Apply suggestions from code review
Co-authored-by: Philip Durbin <[email protected]>
1 parent 15f7b0d commit 1b80bc7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

doc/release-notes/Filter-efficiency.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ New JvmSettings:
1717
- `dataverse.cors.headers.allow`: Allowed headers for CORS requests
1818
- `dataverse.cors.headers.expose`: Headers to expose in CORS responses
1919
- `dataverse.api.blocked.policy`: Policy for blocking API endpoints
20-
- `dataverse.api.blocked.endpoints`: List of API endpoints to be blocked
20+
- `dataverse.api.blocked.endpoints`: List of API endpoints to be blocked (comma-separated)
2121
- `dataverse.api.blocked.key`: Key for unblocking API endpoints
2222

2323
Deprecated database settings:
@@ -35,6 +35,9 @@ If :AllowCors is not set or is true:
3535
bin/asadmin create-jvm-options -Ddataverse.cors.origin=*
3636

3737
Optionally set origin to a list of hosts and/or set other CORS JvmSettings
38+
Your currently blocked API endpoints can be found at http://localhost:8080/api/admin/settings/:BlockedApiEndpoints
39+
40+
Copy them into the new setting with the following command. As with the deprecated setting, the endpoints should be comma-separated.
3841

3942
bin/asadmin create-jvm-options '-Ddataverse.api.blocked.endpoints=<current :BlockedApiEndpoints>'
4043

doc/sphinx-guides/source/installation/config.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,9 +3184,13 @@ Can also be set via any `supported MicroProfile Config API source`_, e.g. the en
31843184
dataverse.api.blocked.endpoints
31853185
+++++++++++++++++++++++++++++++
31863186

3187-
A comma-separated list of API endpoints that should be blocked. For example:
3187+
A comma-separated list of API endpoints that should be blocked. A minimal example that blocks endpoints for security reasons:
31883188

3189-
``./asadmin create-jvm-options '-Ddataverse.api.blocked.endpoints=api/datasets/:persistentId/versions/:versionId/files,api/files/:id'``
3189+
``./asadmin create-jvm-options '-Ddataverse.api.blocked.endpoints=api/admin,api/builtin-users'``
3190+
3191+
Another example:
3192+
3193+
``./asadmin create-jvm-options '-Ddataverse.api.blocked.endpoints=api/admin,api/builtin-users,api/datasets/:persistentId/versions/:versionId/files,api/files/:id'``
31903194

31913195
Defaults to an empty string (no endpoints blocked), but, in almost all cases, should include at least ``admin, builtin-users`` as a security measure.
31923196

0 commit comments

Comments
 (0)