Search code examples
apache.htaccesssessionshibboleth

WebDAV configuration, getting error related to require valid-user using lazy sessions


I'm trying to configure a WebDAV environment. However, I keep getting this error: htaccess: require valid-user not given a valid session, are you using lazy sessions?

Looking at Fiddler, I see HTTP Code 500.

All google searches seem to include references to Shibboleth, which I have installed, but not calling in this path structure.

<Directory "/path/to/webdav">
  Options Indexes MultiViews FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

<VirtualHost *:443>
    ServerName my.domain.com
    DocumentRoot "/path/to/root"        
    ...
    Alias /aaa/bbb /path/to/webdav/aaa/bbb
    <Location /aaa/bbb>
            Options Indexes
            DAV On
            AuthType Basic
            AuthName "webdav"
            AuthUserFile /path/to/webdav.pwd
            Require valid-user
    </Location>
</VirtualHost>

Solution

  • Solution below...

    Essentially, there's a blanket requirement for a Shibboleth session in the last lines of my Host configuration.

    <PathRegex regex=".*" authType="shibboleth"
    requireSession="true" requireSessionWith="Intranet" />
    

    I simply had to add an exception on the webdav folder before those lines.

    <Path name="webdav" authType="shibboleth" requireSession="false" />