ProxyPass with windows auth?

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 18
Joined: 30 May 2012, 23:43

ProxyPass with windows auth?

04 Oct 2012, 05:21

Is it at all possible to allow authenticate the user using kerberos/windows auth before running through a proxypass?.

Basically I want to authenticate the user (and use the X-Forwarded-User headers in my app).

ProxyPass works fine, but There's no mod_auth_kerb or such in APE. I can create a site in IIS and have that use windows auth, but then I can't specify proxypass anywhere but the httpd.conf file :S.

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: ProxyPass with windows auth?

04 Oct 2012, 09:33

Hello,

Create a site and set up desired authentication using IIS.
Then create .htaccess in the root of the site and use the following directive for proxy:

RewriteProxy (.*) http://backend/$1 [A]

The following headers will be present in the request:

X-ISRW-PROXY-AUTH-TYPE
X-ISRW-PROXY-AUTH-USER
X-ISRW-PROXY-LOGON_USER
X-ISRW-PROXY-REMOTE-USER

Posts: 19
Joined: 28 Sep 2012, 01:54

Re: ProxyPass with windows auth?

04 Oct 2012, 23:37

I guess this could work if you have different proxies, right? Image

User avatar
Posts: 18
Joined: 30 May 2012, 23:43

Re: ProxyPass with windows auth?

05 Oct 2012, 00:13

That makes sense but for the life of me i can't get the rewrite engine working.

.htaccess looks like

RewriteEngine On
RewriteLogLevel 9
RewriteBase /

#RewriteRule (.*) $1/pancakes
RewriteProxy (.*) http://127.0.0.1:3001/$1 [A]


I have loglevel debug enabled. It doesn't list any errors. Shows.

[10/5/2012 11:07:22 AM] [LicenseManager] Site with id=1 is working with free license
[10/5/2012 11:07:22 AM] [cache_module] items stored in the cache: 0; bytes available for the cache: 1774190592, physical memory limit: 98%
[10/5/2012 11:07:22 AM] [mod_core_context] (8) [/] ConfigFactory.LoadHtaccess: c:\inetpub\wwwroot\empty\.htaccess


Rewrite.log is always empty. I've set up the directory rewrite and error log are stored in to be writeable by everyone (error.log is created if I delete it).

I've also set loglevel Debug as you can see. Why doesn't it log/run those commands?. If i purposefully misspell RewriteRule or so, it will put an error in the error.log file. It seems baffling that is going my rules are fine, but just refusing to do anything about them.


Also rewrite_module is uncommented eg
LoadModule rewrite_module modules/mod_rewrite.so

User avatar
Posts: 18
Joined: 30 May 2012, 23:43

Re: ProxyPass with windows auth?

05 Oct 2012, 04:54

*sigh*.

It seems rewrite rules only work on websites running on port 80. :(

Actually, those log files were correct. Site Id 1 was my default site, apparently the one i was editing was 3.

Weird as it was loading the HTAccess file. Changed the site ids and it works.

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 29 guests