SP TransportOption fails to set curl username/password

Lukas Hämmerle lukas.haemmerle at switch.ch
Tue May 17 15:24:38 UTC 2022


Hello all

I'm trying to configure an Shibboleth SP 3.2.3 to use the 
TransportOption element to make it download SAML2 metadata from a URL 
that is protected with HTTP Basic authentication. This is descibed on 
[1] and the curl options are [2].

In shibboleth2.xml this looks like this:


<MetadataProvider type="XML"
       validate="true"
       url="https://some-basic-auth.protected.url/metadata.xml"
       backingFilePath="metadata.xml"
       reloadInterval="3600">
     <!-- Curl option https://curl.se/libcurl/c/CURLOPT_USERNAME.html -->
     <TransportOption
      provider="CURL" option="173">username</TransportOption>
     <!-- Curl option https://curl.se/libcurl/c/CURLOPT_USERPWD.html -->
     <TransportOption
      provider="CURL" option="174">s3cr3tPasss0rd</TransportOption>
</MetadataProvider>


However, apparently the Shib SP cannot set these options. Even when 
setting the log level to DEBUG or TRACE for 
log4j.category.XMLTooling.libcurl all I see is this:


2022-05-17 15:11:17 ERROR XMLTooling.libcurl.InputStream : failed to set 
CURL transport option (174)
2022-05-17 15:11:17 ERROR XMLTooling.libcurl.InputStream : failed to set 
CURL transport option (173)

Has anybody successfully tried something like this or has a hint on what 
I'm missing here?


Best Regards
Lukas

[1] 
https://shibboleth.atlassian.net/wiki/spaces/SP3/pages/2065335485/CURLTransport
[2] https://github.com/curl/curl/blob/master/include/curl/curl.h

-- 
SWITCH
Lukas Hämmerle, Trust & Identity
Werdstrasse 2, P.O. Box, 8021 Zurich, Switzerland
+41 44 268 15 64  lukas.haemmerle at switch.ch  http://www.switch.ch


More information about the users mailing list