I am trying to automatically register users in an Xwiki installation through basic auth. This is because help is stored on the wiki, but we want the search process to be transparent to the user.
We push the user to the URL (via the <a> tag), for example: http://username: password@xwiki.example.org /xwiki/bin/view/Main?basicauth=1
This works great in every browser except Internet Explorer (see http://support.microsoft.com/kb/834489 . Unfortunately, 80% of our user base uses Internet Explorer, and this does not mean that they manually entered credentials .
Currently, IIS 7.5 sits in front of Xwiki and proxies all requests for a Tomcat instance on another server. It works great. To solve my problem, I thought I could use the IIS rewrite rule to include a URL like this:
http://xwiki.example.org/xwiki/bin/view/Main?basicauth=1&_username=username&_password=password
in it:
http://username: password@xwiki.example.org /xwiki/bin/view/Main?basicauth=1&_username=username&_password=password
The idea was that IIS would replace the _username / _password querystring request parameters with the URL and pass it to Tomcat, and Xwiki would ignore the additional parameters.
I created a URL rewrite rule, for example:
<rule name="BasicAuthRewrite" enabled="true"> <match url="https?://(.+)&?_username=(.+)&_password=(.+)" /> <action type="Rewrite" url="http://{R:2}:{R:3}@xwiki.example.org/{R:1}" /> </rule>
When I go the "test pattern" in IIS and put in my url, all the backlinks ({R: x)) correspond to the data I want. However, when I visit the URL in my browser, the rewrite rule cannot be invoked.
Is there a way to achieve the desired behavior?