This page presents an approach how to protect WebDAV resources using Shibboleth.
An example configuration using the Shibboleth Service Provider together with Apache mod_dav is listed below.
Assure that the following requirements are meet if you you wish to setup this example:
- Running Shibboleth Identity Provider.
- Running Shibboleth Service Provider.
- Running Apache web server with mod_shib and mod_dav.
The used WebDAV client must support:
- HTTP redirects
- HTTP cookies
Identified working clients (incomplete list):
Identified not working clients (incomplete list):
- Mac OS X built-in
The V3 Identity Provider comes pre-configured with some support for basic authentication if the Password login flow is used, but it requires that the client volunteer the username/password. One of the RemoteUser-based flows can also be used to support clients that can't offer credentials without a prompt (with appropriate web server configuration for authentication), and can be run in first position to handle DAV clients while leaving the form-based option available for browser clients.
The Identity Provider must also support the SAML Artifact binding. It does so by default, but this feature is often disabled or left untested in clustered configurations.
Service Provider Setup
First, a special
SessionInitiator for WebDAV is added into the relevant application definition's
<Sessions> element, which:
- allows only the redirect profile for authentication requests
- specifies the artifact endpoint for responses
Second, an example WebDAV resource is configured:
The figure of Cyberduck shows the login to WebDAV resource using the defined default IdP. Note that Cyberduck
displays the hostname as well as the realm of the IdP.
An open issue is, how to solve the discovery problem. A possible solution is to work with aliases to retrieve and set the IdP
Note that the path is only used to determine the the IdP, both points to the same resource path.
The figure below shows Cyberduck with some IdPs configured as bookmarks.
Probably there is a more sophisticated solutions using rewrites or other ideas.
The idea is to use a script to read the federation metadata and generate the appropriate Apache conf file automatically.