Skip to content

Commit 4215552

Browse files
committed
docs: add CSRF warning for session cookie API authentication feature
1 parent 7681a11 commit 4215552

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3935,6 +3935,12 @@ dataverse.feature.api-session-auth
39353935
++++++++++++++++++++++++++++++++++
39363936

39373937
Enables API authentication via session cookie (JSESSIONID). This is needed for some JSF/SAML-oriented integrations where bearer tokens are not used.
3938+
3939+
.. warning::
3940+
3941+
Enabling this flag without also enabling :ref:`dataverse.feature.api-session-auth-hardening` exposes the installation to CSRF risks.
3942+
Always enable both flags together in production.
3943+
39383944
By itself, this feature flag does not enable CSRF protections. For stricter protections, also enable :ref:`dataverse.feature.api-session-auth-hardening`.
39393945

39403946
.. _dataverse.feature.api-session-auth-hardening:

src/main/java/edu/harvard/iq/dataverse/settings/FeatureFlags.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public enum FeatureFlags {
2727
/**
2828
* Enables API authentication via session cookie (JSESSIONID).
2929
* Needed for JSF/SAML-oriented integrations where bearer tokens are not used.
30+
* <p><b>Caution:</b> Enabling this flag without also enabling
31+
* {@link #API_SESSION_AUTH_HARDENING} exposes the installation to CSRF risks.</p>
3032
* By itself this flag does not enable CSRF protections; for stricter protections,
3133
* also enable {@link #API_SESSION_AUTH_HARDENING}.
3234
*
@@ -41,7 +43,7 @@ public enum FeatureFlags {
4143
* This feature only works when the feature flag {@link #API_SESSION_AUTH} is also enabled.
4244
*
4345
* @apiNote Raise flag by setting "dataverse.feature.api-session-auth-hardening"
44-
* @since Dataverse 6.9
46+
* @since Dataverse 6.10
4547
*/
4648
API_SESSION_AUTH_HARDENING("api-session-auth-hardening"),
4749
/**

0 commit comments

Comments
 (0)