Safari problems accessing Windows Integrated Authentication (aka NTLM) protected web site - iis

Our web application uses Windows Integrated Authentication (aka NTLM Auth) for security.
It's working fine for both IE and Firefox users, but Safari users are seeing intermittent problems. Browsing the site will work fine, but every once in a while there will be problems loading elements of a page (e.g. CSS or JS files). Reload and the problem will go away.
If we use a debugging proxy (Fiddler) we can see that there is a lot of extra 401 requests happening with Safari. Every once in a while a request for a resource will get stuck in a 401 request loop, and eventually fail.
I can't see anything that we're doing to cause this, and it would appear that it's a bug in Safari. Has anyone ran across this issue before, and have any suggestions for a resolution?
Thanks,
Darren.

Some web sites http://www.musteat.org/nodes/show/151 indicate this is an issue with negotiated authentication.
You can turn off Negotiate in favor of pure NTLM in IIS via the NTAuthenticationProviders Metabase setting, and the following ADSUTIL command.
cscript adsutil.vbs set w3svc/WebSite/<SiteID>/NTAuthenticationProviders "NTLM"
Change < SiteID > to the appropriate ID, typically 1.

Related

Fiddler Causes Error to Go Away

I have an application set up in IIS that has Windows Authentication enabled. When I browse to this site in IE11 it prompts me for login credentials (which is strange because I'm logged on to the domain)
However, when I open up Fiddler it starts working perfectly fine, no prompts for authentication. When I close Fiddler again, it starts prompting me again. Any idea what could cause this? I'm trying to narrow down what exactly Fiddler is doing so I can figure out what I need to do to make the prompts on my app go away.
I cover many possible culprits in my post Help, Running Fiddler Fixes My App. My guess here, though, is that maybe your server is trying to use Kerberos authentication when going direct and NTLM when you go through a proxy.
To better debug this, a few things we need to know: Which browser? What's the hostname of the target server? Is it hosted on your current machine? If you disable Tools > Internet Options > Advanced > Use Windows Integrated Authentication (and restart) does it make a difference? What Zone (Right-click the page in IE, choose Properties) does the target run in?

Chrome fails to show http authentication window

I am developing a Drupal site, within which is a page with an iframe, displaying an external SQL Reporting server driven site.
This iframed site is protected on by HTTP authentication. In all browsers, apart from Chrome, when the page is viewed, the browser driven login box pops up.
In Chrome (Windows & OS X), no login box appears and I get an immediate 401 error from the SQL Reporting Server. I've cleared cache's and even tried on a fresh chrome installation on a VM.
The above method works fine on the clients existing live site, which is ASP driven. Other than CMS technology, the only other obvious difference is domains.
The working live site is referencing a sub domain of itself in the iframe. The development site is referencing a completely different domain.
I've tried /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome -–allow-cross-origin-auth-prompt, which seems to make no difference.
Does Chrome have much tighter cross domain login rules? Or am I missing something else?
According to the devs at chromium, this was an intentional change to protect against phishing attacks. If you say the prod sites reference the same domain, you shouldn't have any issues.
http://code.google.com/p/chromium/issues/detail?id=91814
To switch the (in my mind stupid) security-feature off set Browser flag:
--allow-cross-origin-auth-prompt
In Linux close all Browser Instances and type in terminal:
chromium-browser --allow-cross-origin-auth-prompt
For Windows, Mac, Android... take a look here: http://www.chromium.org/developers/how-tos/run-chromium-with-flags
See http://www.chromium.org/administrators/policy-list-3#AllowCrossOriginAuthPrompt for the policy that can be set versus using flags.
On Windows this can be set via the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome. See http://www.chromium.org/administrators/policy-templates for more information.

401 - Unauthorized in IE7 only with windows authentication.

I've created an intranet site that uses windows authentication
In chrome I can access the site instantly, and in FF it requires Active Directory login.
But with IE7 I'm getting the following error:
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.
Im unsure as to why its okay in other browsers but not IE?
Any help appreciated.
Thanks
Solution:
IE is using Kerberos and not falling back on NTLM like Chrome and Firefox. You must force NTLM authentication in IIS7.5 by following these steps:
Select your site.
Double click authentication.
Select "Windows Authentication" (ensuring that it is enabled).
Click "Providers..." in the right hand column.
Select NTLM and click "Move Up".
Link: windows authentication not working in ie7
I'm not familiar with IIS, but in the past few weeks I've had lots of hand-on experience in integrating AD login into web applications. As is quite logical - every Microsoft product would be better integrated with another such, and Internet Explorer (should be valid for all versions, not just 7) automatically passes your AD login credentials as long as you use Active Directory for your Windows login authentication method.
Every other browser will either need to be configured to do so, ask you to type them in manually or will not support it at all. Which explains why Firefox asks you for a username and a password. Under Opera, you'll most likely get the same error message.
My guess about Chrome is that it's your default browser of choice and at some point in time, you've typed in your login creditenials and that session is still active.
All of this would mean (if my assumptions are correct) that you need to use a different AD account to login into this application than Windows and the latter (being automatically passed by IE) is not authorized.
It sounds like your environment is not setup properly for Kerberos authentication to take place. There are many things that can cause Kerberos authentication failure. E.g. Clock skew on the server or client, missing SPN on the web server, etc.
Normally, when you configure to use Windows authentication, you are asking to use SPNEGO, which means using Kerberos whenever possible and then fall back to NTLM if Kerberos fails. However, this post pointed out that this is no longer true. IE7 stops at Kerberos in certain cases but not falling back to NTLM.
You can try to disable the "Enable Integrated Windows Authentication" as the post suggested. It looks odd but it actually just turns off the SPNEGO, you will still use the NTLM.
I guess Firefox and Chrome works because they are using NTLM but not Kerberos. From my experience, non-Microsoft browser doesn't do Kerberos out-of-box. You need to do some configuration work to make it happens. For example, in FireFox, you need to set the network.negotiate-auth.trusted-uris parameter. See here
Once you confirm the NTLM for IE7 is still working fine. Then, you can post another question to ask how to fix the Kerberos authentication problem for IIS.
start off by looking here and getting a more detailed error description. I had some crazy problems with CRM and it all came down to the order of settings in IIS the answer to the problem ended up being as simple as ;
going into iis and then the authentication setting
clicking on windows authentication and selecting advanced
make sure kernel mode is on
click on providers and ensure negotiate is above NTLM.

Configure Firefox 3.0.x to authenticate with Kerberos and not prompt

I have an Intranet http application running on several machines in our Windows domain; everything works when using IE 7 because I can configure it to use Kerberos authentication and I've figured out how to get one of the intermediate machines to be Trusted for Delegation.
I have researched and tried to get Firefox 3.0.10 to use Kerberos:
navigate to about:config
filter to network.negotiate
update network.negotiate-auth.delegation-uris and network.negotiate-auth.trusted-uris
with the following entries(separated by comma): http://jupiter2000/trimbrokerclient,http://johnxp/fileservicedemo
I have done this and even restarted Firefox and when I browse to the above sites on our LAN, I still get prompted for username and password and even when I supply them and the web page is loaded, I have some code in the app which displays the authentication method in effect and it is still NTLM, not Kerberos as when IE is used.
Can someone comment on how to get Firefox usable on this Intranet application of mine? Thank you.
p.s. while the names above are different, the app is the same. JUPITER2000 is IIS 6.0; JOHNXP is IIS 5.1.
From what I have done myself, you will only want to input the domain, and not the http:// or path.
There are 5 settings that need to be changed in FireFox.
Only the domain is necessary.
See them all here:
FireFox settings for Integrated Windows Authentication
you must use just the server name:
jupiter2000,johnxp

Windows Safari cannot access sever by NetBIOS/WINS name

Whenever I try to access a NTLM authenticated intranet site, Safari takes forever to process and then comes back with "The sever is unavailable" or if allowed by the site, loads with out authenticating. I can access these same sites with no problems in both Firefox and Internet Explorer. The sites are hosted on IIS6 and are being generated with either ASP, ASP.Net 1.1 or ASP.Net 2.0.
Any insight on why Safari choking on these sites? Are there any work-arounds to get NTLM to correctly authenticate with Safari?
Update:
In further playing with it I have determined that NTLM will work (with the page loading reasonably fast) if I am using the FQDN for the site (i.e. http://mysite doesn't work, but http://mysite.domain.prv will work). Unfortunately, this will not work due to other constraints on the project.
Does anyone know why the FQDN would work but the shorter name will not? Is this something that can be worked around or is it "Sorry out of luck"?
Update 2:
According to the Wireshark packet sniffer, safari sends a SYN to the correct severs IP address. The intranet sever responds with a SYN, ACK, to which safari sends an ACK. This is the end in communication between safari and the sever. When attempting to access the intranet site by FQDN these three packets were the same but were then followed by a HTTP GET request, which then successfully loaded the page.
Because Safari is connecting to the correct IP address, I find it hard to believe that Safari just doesn't support NetBIOS/WINS names. Additionally, because the NTLM packets are never exchanged as safari never sends the initial GET request, I'm certain that NTLM has nothing to do with this issue.
Does anyone know the status of safari's support of NetBIOS/WINS?
In a similar situation with a Java based B2B client, I was successful in using http://ntlmaps.sourceforge.net/ to traverse the proxy.
Any insight on why Safari choking on these sites?
Because NTLM is not a web standard. You can't expect any given web browser to support it.
Until recently only IE supported it at all. And Firefox's support has to be specifically configured.
Firefox has always been able to traverse NTLM sites. I know because I'm stuck with this god awful custom ASP solution and SharePoint site to use in our intranet... Firefox is a dream.
Apple.. fix Safari kthx?

Resources