Support file:// scheme in <Subst> element

Description

Support the file:// scheme (in addition to http:// or https://) in the MetadataProvider/Subst element.

Environment

None

Activity

Show:

Scott Cantor June 22, 2016 at 7:16 PM

http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=602b55fa62efadb5c73477279ada61d9d360074e

Any value starting with file:// is handed to the base class for resolution, which uses libcurl, and that handles file:// URLs.

A hashed property will tell it to hash the entityID before doing a substitution, so something like this will work:

<Subst hashed="SHA1">file:///etc/shibboleth/metadata/$entityID.xml</Subst>

You'd have to pre-hash the entityIDs of course, but that's pretty easy to do in a script if you're stuffing metadata into a folder. It will be fully dynamic otherwise, same caching rules used for remote resources.

Scott Cantor June 22, 2016 at 6:22 PM

This turns out to be easy to implement, but the tricky bit is that turning the entityID into a viable filename isn't so easy, at least on Windows.

I think I'll probably need to just patch in a SHA transform capability to turn it into a string usable for a filename.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Created April 9, 2016 at 12:50 PM
Updated June 22, 2021 at 8:42 PM
Resolved June 22, 2016 at 7:16 PM