1

I have a problem. I'm using Legrandin's NTLM Authentication Module PyAuthenNTLM2 with my Apache2 server. It really works well and it was easy to install. I recommend it to everybody.

The authentication works perfectly fine. But I have a problem once POST-Requests are sent. Everytime a POST is sent to the server, IE's annoying credentials prompt keeps appearing. Even though I checked "Remember my Credentials". This is how I have it configured right now:

<Directory /var/www/>
            AuthType NTLM
            AuthName DOMAIN
            require valid-user

            PythonAuthenHandler pyntlm
            PythonOption Domain DOMAIN
            PythonOption PDC 123.45.67.89
            PythonOption BDC 123.45.67.89

            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
</Directory>

My question to you guys:

Is it possible to do the authentication only on one single URL?

For example: If a user access my page for the first time, the URL will be: http://domain.com/custom/login. This URL doesn't represent the directory though. It's just a controller of the Zend Framework.

Is this possible?

Kel
  • 13
  • 4

1 Answers1

0

What you're looking to do is use the <Location> container, which maps URLs to options, like:

<Location /custom/login>
    ... options ...
</Location>
Kyle Smith
  • 9,563
  • 1
  • 30
  • 32
  • Hi. Thanks for your response. I tried replacing the Directory Tag with a Location tag (like in your example) and it didn't work. – Kel Mar 16 '12 at 14:14
  • It did not work at all, or produced the same results as before? – Kyle Smith Mar 16 '12 at 14:35
  • This is what gets logged: [Fri Mar 16 15:35:08 2012] [notice] [client IP] PYNTLM: User username/DOMAIN has been authenticated to access URI /custom/index/login Looks like the -Tag fires. I will check the code now and see if it gets the REMOTE_USER. – Kel Mar 16 '12 at 14:37
  • I can verify that I get a value for the property PHP_AUTH_USER with but not with . – Kel Mar 16 '12 at 14:44
  • I just saw that the username gets passed to another variable, if you use . The username is now available in $_SERVER['REDIRECT_REMOTE_USER']. It works Kyle, thanks a lot :) – Kel Mar 16 '12 at 15:09
  • Interesting. Glad it worked for you. – Kyle Smith Mar 16 '12 at 15:13