Discussion Locked

Avoid Login Prompt after IIS/IWA 401.3

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Using Integrated Windows Authentication on a WIN/2000 Server running IIS that is acting as an Intranet server. Trying to find a way to eliminate the login prompt that IE generates following an authenticated user's attempt to access a web page in a subdirectory that has been protected by limiting rights (ACL) to selective user groups. IIS generates 401.3 and IE reacts by displaying a login prompt.

Details

Our Intranet site has pages that are both public and some that are restricted by user group. It is my understanding that when an attempt to access a page from within a directory that specifies IWA, IIS does not initially prompt the user for a user name and password.

The current Windows user information on the client computer isused for authentication. The user's browser proves its knowledge of the password through a cryptographic exchange with the Web server.

However, if this authentication exchange fails to identify the user (such as when a user is not logged into the network), the browser will prompt the user for a Windows user name & password. In our case the user is logged onto the network and the authentication is successful, but the identified user just doesn't have access rights (via ACL) to the file.

When our users attempt to access such a restricted page IIS generates a 401.3 & as a result IE issues a login prompt. It is IE making the decision to issue the prompt, giving the user an opportunity to enter alternate credentials that might have access rights. However, we want to just deny access to that page because our users have no other id.

We see no need for this prompt, it's an invitation to try and hack the system. Displaying either the 401.3 or 401.1 error page (which is what gets displayed after canceling out of the login prompt) would be fine.

Do you know how to influence IE's behavior so that is does not issue the logon prompt?

Rudie

5 replies

by joseph moore

First off, this is how it works with IIS and IE, when you have the ACLs on files/folders on IIS locked down. When the IUSR_MACHINENAME account does not have at least Read access to something in its website, it will throw up the login/password box toany user, irregardless of what account they are physically logged into on their workstation.
All connections to IIS from workstations are allowed under the context of the IUSR_MACHINENAME account; when you browse a web page on an IIS server, the IIS server says that you are actually IUSR_MACHINENAME connecting over the network. You have to think of it as JUST LIKE normal file server access. Just like setting the ACLs on a file server, you allow certain user accounts certain rights to a sharedfolder and to files/folders underneath. IIS takes the same approach, only it by default allows Read and List Contents rights to the web pages and images.

Ok, so with that in mind, try this trick.
Let's assume your web server has a machine name of WEBSERV, and an IP address of 192.168.1.10

Now, let's also assume you are WWW.MYDOMAIN.COM and that you have an internal DNS that resolves http://www.mydomain.com to the 192.168 address for your internal users.
Ok. Now, when your users go to http://www.mydomain.com they get resolved to the 192.168 address. Then when they try and go to http://www.mydomain.com/SECURED (a locked-down folder) they get the challenge/response box.

So, try this for your users. Have them go to:

http://WEBSERV/SECURED

If you have them put the Windows machine name in the browser window, that "should" have them connect to the IIS machine using their logged in credentials (the login they logged into their workstation with).

Connecting like this doesNOT use the IUSR_MACHINENAME account for the users; it passes the logged on account.

hope this helps

by rdnoble

Joseph,

Thank you for responding.

You are correct about the difference in behavior depending on how you access the machine. However, we already use the machine name style of address. And the user's credentials (the login they logged into their workstation with) are being passed to and accepted by IIS. But when IIS goes to serve the requested page which has been secured by limiting who has read permissions the 401.3 is generated and IE responds by prompting the user for alternate credentials.

As you point out "You have to think of it as JUST LIKE normal file server access. Just like setting the ACLs on a file server, you allow certain user accounts certain rights to a shared folder and to files/folders underneath. IIS takes the same approach, ..."

But this prompt is a different reaction then what Windows would do if you had logged directly on to the server and attempted to open the file using Windows Explorer. Windows would just deny your request. That is what we're looking for IIS/IE to do, just deny the request and display the 401.3 error screen (or something like it). Unless the user is not currently authenicated (and they are authenicated in this case) there should not be a prompt to the known user for an alternate user-id, that they don't have. We view this prompt as an invititation to the user to try and defeat the system's security.

Rudie

by shmaltz

What you are trying to accomplish is impossible (by design - this is by design of IE, not IIS - when ever there is a foder that allows you access thru HTTP - regardless of the authentication required - unlesss it is by IP address you will alwyas get the prompt). The only way you will be able to present them with the 401.3 or 401.1 error is if you deny - on those folders - access by IP address. To do that you have to use IIS Manager.

This discussion is closed to new replies.