Failed to download metadata from /Shibboleth.sso/DiscoFeed

154 views
Skip to first unread message

Asbjørn KU-IT

unread,
Dec 5, 2023, 3:19:21 AM12/5/23
to Dataverse Dev
Hello

We are using Shibboleth (WAYF) for authentication.

We are encountering the following error when reaching the login page:

"Failed to download metadata from /Shibboleth.sso/DiscoFeed"

Does anyone know what this error means and how to fix it?`


We use Ansible for installation.

Regards
Asbjørn
University of Copenhagen

Paul Boon

unread,
Dec 5, 2023, 10:07:22 AM12/5/23
to datave...@googlegroups.com
Hi Asbjørn,

At DANS we have changed the Dataverse code (in our fork) to not use that 'discoFeed' endpoint.
Our IdP has its' own WAYF and the dropdown list would contain only on entry.
Regretfully I don't remember how we got that discoFeed working, because we had it working at some tests we did years ago, and the person changing the configs then doesn't work with us anymore.
If you have the same problem as we have; just one IdP as 'proxy' for the others, it would be useful If I created an Issue and PR for that special case.
Also, I am interested in how to 'fix' the discoFeed endpoint.

Regards,
Paul Boon (DANS)



From: datave...@googlegroups.com <datave...@googlegroups.com> on behalf of Asbjørn KU-IT <a...@adm.ku.dk>
Sent: Tuesday, December 5, 2023 9:19 AM
To: Dataverse Dev <datave...@googlegroups.com>
Subject: [Dataverse-Dev] Failed to download metadata from /Shibboleth.sso/DiscoFeed
 
--
You received this message because you are subscribed to the Google Groups "Dataverse Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-dev/1f1b100e-5819-46ad-b1c5-94eea44ac420n%40googlegroups.com.

Philip Durbin

unread,
Dec 18, 2023, 5:29:35 PM12/18/23
to datave...@googlegroups.com
Hi Asbjørn,

I'm a little confused. Was Shibboleth/DiscoFeed ever working properly? Or has it been broken (not working) the whole time?

Our docs do try to explain that DiscoFeed is supposed to be working: https://guides.dataverse.org/en/6.1/installation/shibboleth.html#verify-discofeed-and-metadata-urls

On your installation is seems like neither https://t-dataverse.ku.dk/Shibboleth.sso/DiscoFeed nor https://t-dataverse.ku.dk/Shibboleth.sso/Metadata are working (both 404s) so we might need to retrace your steps (or Ansible's steps) to see if something was missed.

I hope this helps,

Phil




--

Asbjørn KU-IT

unread,
Dec 19, 2023, 7:31:59 AM12/19/23
to Dataverse Dev
Hi Philip

Thanks for replying.

No, our Shibboleth was never working. It's been broken the entire time.
We've based our Ansible installation on the dataverse-ansible repository and made adjustments to the code.
We've read the official documentation several times.

I can share any number of YAML files from our Ansible, or preferably would you or a colleague be available for a remote bugfixing session?

We are running RHEL8 and Dataverse 6.0.

Don Sizemore

unread,
Dec 19, 2023, 8:14:41 AM12/19/23
to datave...@googlegroups.com
Hello,

I wouldn't expect Dataverse-Ansible's implementation to result in a working Shibboleth installation. It's stubbed out, barely-tested if at all (pull requests welcomed), and each institution's IDP is something of a snowflake.

That said, I'd be happy to screen-share some time and take a look. If you're not seeing DiscoFeed I'd start by looking in Shibboleth's warn_log or equivalent.

Thank you,
Don

Philip Durbin

unread,
Dec 19, 2023, 8:26:57 AM12/19/23
to datave...@googlegroups.com
Oh, one gotcha is SELinux. You probably saw this in the guides: https://guides.dataverse.org/en/6.1/installation/shibboleth.html#disable-or-reconfigure-selinux .As a quick test you could try disabling it.

We definitely need that /Shibboleth.sso/Metadata path working.

Don Sizemore

unread,
Dec 19, 2023, 8:37:12 AM12/19/23
to datave...@googlegroups.com
oh, yes. for SELinux and Shibboleth:

# Allow httpd
sudo /usr/sbin/setsebool -P httpd_can_network_connect 1
sudo /usr/sbin/setsebool -P httpd_read_user_content 1

# Allow httpd to connect to Shib socket
sudo grep httpd_t /var/log/audit/audit.log |/usr/bin/audit2allow -M allow_httpd_shibd_sock
sudo /usr/sbin/semodule -i allow_httpd_shibd_sock.pp

# Allow httpd to read /var/cache/shibboleth
sudo /usr/sbin/semanage fcontext -a -t httpd_sys_content_t "/var/cache/shibboleth(/.*)?"
sudo /usr/sbin/restorecon -vR /var/cache/shibboleth

Don

Asbjørn KU-IT

unread,
Jan 2, 2024, 7:34:33 AM1/2/24
to Dataverse Dev
Happy New Year!

We would be very grateful to have a session with you, @Don Sizemore.
Let us know when you may be available, our agendas are open for any timeslot and date to resolve this issue for us.

For now we have SELinux set to permissive, as this:

- name: Set SELinux in permissive mode, logging actions that would be blocked
  ansible.posix.selinux:
    policy: targeted
    state: permissive

Philip Durbin

unread,
Jan 5, 2024, 2:36:12 PM1/5/24
to datave...@googlegroups.com
I'm confused. Was it SELinux? In permissive mode is everything working?

Also, why are we on the dev list? :) Next time, let's use the main list.


Asbjørn KU-IT

unread,
Jan 8, 2024, 6:41:40 AM1/8/24
to Dataverse Dev
Hello Philip

We had a great session with Don and we got some errors from the shib warnings log fixed. The only logs we have now is:

2024-01-08 12:39:46 WARN Shibboleth.DEPRECATION : MetadataGenerator handler
2024-01-08 12:39:47 WARN Shibboleth.AttributeExtractor.XML : attribute mappings are reloadable; be sure to restart web server when adding new attribute IDs

However, it did not fully resolve our issues.

We have SELinux set to permissive and that is OK according to Don.

Do you have any pointers for us on how to resolve this?

The dev list was a mistake on my behalf. I thought I wrote to the other channel. If this can be moved to the other channel, that is the right thing to do.

Philip Durbin

unread,
Jan 8, 2024, 2:02:48 PM1/8/24
to datave...@googlegroups.com
No, that's ok. Let's just stay on this list for this problem. Let me check in with Don about the state of things. We both hang out at https://chat.dataverse.org if you ever want to pop in.

Asbjørn KU-IT

unread,
Jan 10, 2024, 9:22:18 AM1/10/24
to Dataverse Dev
We talked with our idm group/manager as Don suggested and he helped us fix some stuff:

- In shibboleth2.xml our tag for "include" in the MetadataProvider tag was <include> instead of uppercase <Include>
- We can get the necessary files /Metadata and /DiscoFeed on the localhost domain using:  "curl -sk https://localhost/Shibboleth.sso/DiscoFeed"
- The files are denied using our site URL
- Tomorrow we will try to replace "localhost" with our site URL in the config files and see what happens, as we suspect this is now our problem. We identified three places, we have inserted "localhost". In Apache/httpd, Payara and the Dataverse installer arguments. Is there any one of these that are the right ones to change, or should we just apply our trial'n'error approach as suggested?

Regards
Asbjørn

Don Sizemore

unread,
Jan 10, 2024, 9:27:02 AM1/10/24
to datave...@googlegroups.com
Hello,

When you say "denied" does your Apache proxy include

  <IfModule mod_shib>
    # don't pass paths used by Shibboleth to Payara
    ProxyPassMatch ^/Shibboleth.sso !
    ProxyPassMatch ^/shibboleth-ds !
    ProxyPassMatch ^/shibboleth-sp !

    <Location /shib.xhtml>
      AuthType shibboleth
      ShibRequestSetting requireSession 1
      require shibboleth
    </Location>
  </IfModule>

The Payara siteUrl setting needs to remain the public FQDN of your service, https://t-dataverse.ku.dk

Don

Asbjørn KU-IT

unread,
Jan 10, 2024, 9:46:19 AM1/10/24
to Dataverse Dev
We have this:

<IfModule mod_shib>
  # don't pass paths used by Shibboleth to Glassfish
  ProxyPassMatch ^/Shibboleth.sso !
  ProxyPassMatch ^/shibboleth-ds !
  ProxyPassMatch ^/shibboleth-sp !

  <Location /shib.xhtml>
    AuthType shibboleth
    ShibRequestSetting requireSession 1
    require shibboleth
  </Location>
</IfModule>

# pass everything else to Glassfish
ProxyPass / ajp://localhost:8009/

Great, thanks.
We have set up full siteURL all those places the dataverse-ansible repo had "payara.siteurl" mentioned.

Do we need to set this in default.config Dataverse installer arguments also?

The dataverse-ansible repo has two different variants of the file, one with "localhost" and a template with "{{ servername }}" variable, but we cannot find this variable defined in defaults/main.yml.

Asbjørn KU-IT

unread,
Jan 10, 2024, 9:50:57 AM1/10/24
to Dataverse Dev
by that I mean this part

[glassfish]
HOST_DNS_ADDRESS = {{ payara_hostname }}

The two variants:

Don Sizemore

unread,
Jan 10, 2024, 10:44:51 AM1/10/24
to datave...@googlegroups.com
You all wrote your own Ansible role, but the end result is that your Payara dataverse.siteUrl jvm-option needs to point to the https://hostname of your service.

files/default.config can likely be cleaned up; I've made a note to remove it.

The ProxyPassMatch lines are what you need to enable access to Shibboleth.sso/, when you say these URIs are "denied" what error are you seeing?

Thank you,
Don

Asbjørn KU-IT

unread,
Jan 11, 2024, 12:11:56 PM1/11/24
to Dataverse Dev
Yes, that is true. You are right. 

We get "404 Not Found"

However when we curl the same URL replacing " t-dataverse.ku.dk" with "localhost" from inside the terminal of our Payara webserver, the expected content are delivered.

I will check the value of the Payara "dataverse.siteUrl jvm-option" and get back to you on that when we have our "asadmin" command fixed.

Asbjørn KU-IT

unread,
Jan 15, 2024, 5:30:51 AM1/15/24
to Dataverse Dev
These are our JVM options

-Ddataverse.fqdn=datavrsweb01tl.unicph.domain
-Ddataverse.siteUrl=http://${dataverse.fqdn}:8080

Could this be the reason to our problems? So it does not say "localhost". The FQDN works, however browser reports the URL as insecure.

Our "real" domain is https://t-dataverse.ku.dk

This file "idpselect_config.js" has this "localhost" value as seen below, is this a problem?

this.dataSource = window.location.hostname === 'localhost' ? '/resources/dev/sample-shib-identities.json' : '/Shibboleth.sso/DiscoFeed'; // where to get the data from (dev vs. prod)

Donald Sizemore II

unread,
Jan 15, 2024, 5:39:32 AM1/15/24
to datave...@googlegroups.com
you want both jvm-options using the public address of your service - fqdn and siteurl. the latter prepended with https://

don

painstakingly pecked on my iphone.

On Jan 15, 2024, at 05:30, Asbjørn KU-IT <a...@adm.ku.dk> wrote:

These are our JVM options

Philip Durbin

unread,
Jan 16, 2024, 9:52:55 AM1/16/24
to datave...@googlegroups.com
Yes, to reiterate what Don said, siteUrl should be your real domain: https://t-dataverse.ku.dk

Asbjørn KU-IT

unread,
Jan 17, 2024, 9:48:08 AM1/17/24
to Dataverse Dev
Hello

We got it working now. TBH we don't know what really fixed it. We did several things: updated the JVM options fqdn and siteUrl, changed apache config file (removed SSL, point to port 80) and did complete reinstall of everything including operating system on the virtual machines.
Thank you so much for your guidance @Don and @Philip.
We feel very relieved.

Philip Durbin

unread,
Jan 17, 2024, 2:35:11 PM1/17/24
to datave...@googlegroups.com
We're relieved as well! Good job sticking with it!

Reply all
Reply to author
Forward
0 new messages