Skip to content

Commit 2bdcb05

Browse files
committed
Merge remote-tracking branch 'IQSS/develop' into indexingperf2
2 parents 21abbcc + 180aa55 commit 2bdcb05

30 files changed

Lines changed: 336 additions & 162 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This release fixes a bug which was allowing the viewing of host collections' names when using anonymized preview URLS.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This release fixes a bug where the value of the dataverse.auth.oidc.enabled setting, available when Provisioning an authentication provider via JVM options (see ref: https://guides.dataverse.org/en/latest/installation/oidc.html#provision-via-jvm-options) was not being not being propagated to the current Dataverse user interface (where enabled=false providers are not displayed for login/registration) or represented in the GET api/admin/authenticationProviders API call.
2+
3+
A new JVM setting ('dataverse.auth.oidc.hidden-jsf') was added to hide an enabled OIDC Provider from the JSF UI.
4+
5+
For Dataverse instances deploying both the current JSF UI and the new SPA UI, this fix allows the OIDC Keycloak provider configured for the SPA to be hidden in the JSF UI (useful in cases where it would duplicate other configured providers).
6+
7+
Note: The API to create a new Auth Provider can only be used to create a provider for both JSF and SPA. Use JVM / MicroProfile config setting to create SPA only providers.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Bug / Not Bug in Dataverse. Bug is in SPA Frontend
2+
3+
Cleaned up Access APIs to localize getting user from session for JSF backward compatibility
4+
5+
This bug requires a front end fix to send the Bearer Token in the API call.
6+
7+
See: #11740
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In prior versions of Dataverse, configuring a proxy to forward to Dataverse over an http connection could result in failure of signed Urls (e.g. for external tools). This version of Dataverse supports having a proxy send an X-Forwarded-Proto header set to https to avoid this issue.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Publishing Enhancement ##
2+
3+
Before a Dataset can be published the user must acknowledge acceptance of the disclaimer if it is required.
4+
5+
The setting "PublishDatasetDisclaimerText", when set, will prevent a draft dataset from being published without the user acknowledging the disclaimer.
6+
The approved disclaimer text is `"By publishing this dataset, I fully accept all legal responsibility for ensuring that the deposited content is: anonymized, free of copyright violations, and contains data that is computationally reusable. I understand and agree that any violation of these conditions may result in the immediate removal of the dataset by the repository without prior notice."`
7+
8+
To enable/disable the acknowledgement requirement an Admin can set/delete the setting using the following APIs:
9+
10+
`curl -X PUT -d "By publishing this dataset, I fully accept all legal responsibility for ensuring that the deposited content is: anonymized, free of copyright violations, and contains data that is computationally reusable. I understand and agree that any violation of these conditions may result in the immediate removal of the dataset by the repository without prior notice." http://localhost:8080/api/admin/settings/:PublishDatasetDisclaimerText`
11+
12+
`curl -X DELETE http://localhost:8080/api/admin/settings/:PublishDatasetDisclaimerText`
13+
14+
The UI will prevent the user from publishing a Dataset unless the disclaimer is acknowledged.
15+
16+
The APIs will continue to publish without the acknowledgement for now. An Info API getter was added for non-superusers to get the disclaimer text.
17+
18+
`curl -X GET http://localhost:8080/api/info/settings/:PublishDatasetDisclaimerText`
19+
20+
See:
21+
- [#359](https://github.com/IQSS/dataverse.harvard.edu/issues/359)

doc/sphinx-guides/source/api/external-tools.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ The signed URL mechanism is more secure than exposing API tokens and therefore r
174174
- For tools invoked via a GET call, Dataverse will include a callback query parameter with a Base64 encoded value. The decoded value is a signed URL that can be called to retrieve a JSON response containing all of the queryParameters and allowedApiCalls specified in the manfiest.
175175
- For tools invoked via POST, Dataverse will send a JSON body including the requested queryParameters and allowedApiCalls. Dataverse expects the response to the POST to indicate a redirect which Dataverse will use to open the tool.
176176

177+
.. note::
178+
179+
**For Dataverse site administrators:** When Dataverse is behind a proxy, signed URLs may not work correctly due to protocol mismatches (HTTP vs HTTPS). Please refer to the :ref:`signed-urls-forwarded-proto-header` section to ensure signed URLs work properly in proxy environments.
180+
177181
API Token
178182
^^^^^^^^^
179183

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6366,11 +6366,14 @@ The fully expanded example above (without environment variables) looks like this
63666366
63676367
curl "https://demo.dataverse.org/api/info/server"
63686368
6369+
.. _show-custom-popup-for-publishing-datasets:
6370+
63696371
Show Custom Popup Text for Publishing Datasets
63706372
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63716373
63726374
For now, only the value for the :ref:`:DatasetPublishPopupCustomText` setting from the Configuration section of the Installation Guide is exposed:
63736375
6376+
.. note:: See :ref:`show-disclaimer-for-publishing-datasets` if you want the user to acknowledge before publishing.
63746377
.. note:: See :ref:`curl-examples-and-environment-variables` if you are unfamiliar with the use of export below.
63756378
63766379
.. code-block:: bash
@@ -6385,6 +6388,28 @@ The fully expanded example above (without environment variables) looks like this
63856388
63866389
curl "https://demo.dataverse.org/api/info/settings/:DatasetPublishPopupCustomText"
63876390
6391+
.. _show-disclaimer-for-publishing-datasets:
6392+
6393+
Show Disclaimer for Publishing Datasets
6394+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6395+
6396+
The setting "PublishDatasetDisclaimerText", when set, will prevent a draft dataset from being published through the UI without the user acknowledging the disclaimer.
6397+
6398+
.. note:: See :ref:`show-custom-popup-for-publishing-datasets` if the user acknowledgment is not required but you want the message to be displayed in the UI.
6399+
.. note:: See :ref:`curl-examples-and-environment-variables` if you are unfamiliar with the use of export below.
6400+
6401+
.. code-block:: bash
6402+
6403+
export SERVER_URL=https://demo.dataverse.org
6404+
6405+
curl "$SERVER_URL/api/info/settings/:PublishDatasetDisclaimerText"
6406+
6407+
The fully expanded example above (without environment variables) looks like this:
6408+
6409+
.. code-block:: bash
6410+
6411+
curl "https://demo.dataverse.org/api/info/settings/:PublishDatasetDisclaimerText"
6412+
63886413
.. _api-get-app-tou:
63896414
63906415
Get Application Terms of Use (General Terms of Use)
@@ -7654,6 +7679,8 @@ Add new authentication provider. The POST data is in JSON format, similar to the
76547679
76557680
POST http://$SERVER/api/admin/authenticationProviders
76567681
7682+
.. note:: This endpoint will create providers for both JSF and SPA. Use :ref:`jvm-options` / *MicroProfile Config* if you need to create SPA only providers.
7683+
76577684
Show Authentication Provider
76587685
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76597686

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ First of all, confirm that access is denied! If you are in fact able to access t
9494

9595
Still feel like activating this option in your configuration? - Have fun and be safe!
9696

97+
.. _signed-urls-forwarded-proto-header:
98+
99+
Using X-Forwarded-Proto for Signed URLs
100+
+++++++++++++++++++++++++++++++++++++++
101+
102+
If you use a proxy such as Apache or Nginx, or have a firewall such as Anubis, and they are configured to forward traffic to Dataverse over HTTP
103+
(i.e. your proxy receives user calls over HTTPS but forwards locally to Dataverse over HTTP), signed URLs, used by external tools and
104+
upload apps (such as DVWebloader), are likely to fail unless you configure your proxy to send an X-Forwarded-Proto HTTP Header.
105+
This allows Dataverse to recognize that the communication from the user was over HTTPS and that validation of signed URLs should assume
106+
they started with https:// (rather than http:// as received from the proxy).
97107

98108
.. _PrivacyConsiderations:
99109

@@ -5279,6 +5289,15 @@ This post-publish workflow is useful for actions such as sending notifications a
52795289

52805290
See :ref:`Workflow Admin section <workflow_admin>` for more details and context.
52815291

5292+
.. _:PublishDatasetDisclaimerText:
5293+
5294+
:PublishDatasetDisclaimerText
5295+
+++++++++++++++++++++++++++++
5296+
5297+
The text displayed to the user that must be acknowledged prior to publishing a Dataset. When not set the acknowledgment is not required nor displayed.
5298+
5299+
``curl -X PUT -d "By publishing this dataset, I fully accept all legal responsibility for ensuring that the deposited content is: anonymized, free of copyright violations, and contains data that is computationally reusable. I understand and agree that any violation of these conditions may result in the immediate removal of the dataset by the repository without prior notice." http://localhost:8080/api/admin/settings/:PublishDatasetDisclaimerText``
5300+
52825301
.. _:BagItHandlerEnabled:
52835302

52845303
:BagItHandlerEnabled

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ The following options are available:
151151
- Enable or disable provisioning the provider via MicroProfile.
152152
- N
153153
- ``false``
154+
* - ``dataverse.auth.oidc.hidden-jsf``
155+
- Show or Hide the provider from the JSF UI via MicroProfile.
156+
- N
157+
- ``false``
154158
* - ``dataverse.auth.oidc.client-id``
155159
- The client-id of the application to identify it at your provider.
156160
- Y
@@ -187,4 +191,4 @@ The following options are available:
187191
- Tune the maximum age, in seconds, of all OIDC providers' verifier cache entries. Default is 5 minutes, equivalent to lifetime
188192
of many OIDC access tokens.
189193
- N
190-
- 300
194+
- 300

docker-compose-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ services:
2222
DATAVERSE_MAIL_SYSTEM_EMAIL: "dataverse@localhost"
2323
DATAVERSE_MAIL_MTA_HOST: "smtp"
2424
DATAVERSE_AUTH_OIDC_ENABLED: "1"
25+
DATAVERSE_AUTH_OIDC_HIDDEN_JSF: "1"
2526
DATAVERSE_AUTH_OIDC_CLIENT_ID: test
2627
DATAVERSE_AUTH_OIDC_CLIENT_SECRET: 94XHrfNRwXsjqTqApRrwWmhDLDHpIYV8
2728
DATAVERSE_AUTH_OIDC_AUTH_SERVER_URL: http://keycloak.mydomain.com:8090/realms/test

0 commit comments

Comments
 (0)