About Authentication

You can require users to provide a valid Microsoft Windows user-account name and password before they access any information on your server. This identification process is called authentication. Authentication, like many of the features in IIS, can be set at the Web site, directory, or file level. IIS provides the following authentication methods to control access to the content on your server:

WWW Methods

FTP Methods

For information about setting up authentication, see Enabling and Configuring Authentication.


Summary of Authentication Methods

Method Security Level Sends Passwords How? Usable Across Proxy Servers and Firewalls? Client Requirements
Anonymous None N/A Yes Any browser
Basic Low Base64 encoded clear text Yes; however, sending passwords across a proxy server or firewall in clear text is a security risk because Base64 encoded clear text is not encryption Most browsers
Digest Medium Hashed Yes Internet Explorer 5.0 or later
Advanced Digest Medium Hashed Yes Internet Explorer 5.0 or later
Integrated Windows High Hashed when NTLM is used.
Kerberos ticket when Kerberos is used
No, unless used over a PPTP connection Internet Explorer 2.0 and later for NTLM, and Windows 2000 or later with Internet Explorer 5.0 or later for Kerberos
Certificates High N/A Yes, using an SSL connection Internet Explorer and Netscape
FTP Anonymous None N/A Yes Any FTP client
FTP Basic Low Clear text Yes Any FTP client


Anonymous Authentication

Anonymous authentication gives users access to the public areas of your Web or FTP site without prompting them for a user name or password. When a user attempts to connect to your public Web or FTP site, your Web server assigns the connection to the Windows user account IUSR_computername, where computername is the name of the server on which IIS is running. By default, the IUSR_computername account is included in the Windows user group Guests. This group has security restrictions, imposed by NTFS permissions, that designate the level of access and the type of content available to public users.

If you have multiple sites on your server or if you have areas of your site that require different access privileges, you can create multiple anonymous accounts, one for each Web or FTP site, directory, or file. By giving these accounts different access permissions or by assigning these accounts to different Windows user groups, you can grant users anonymous access to different areas of your public Web and FTP content.

The following process explains how IIS uses the IUSR_computername account as follows:

  1. The IUSR_computername account is added to the Guests group on the IIS computer during setup.
  2. When a request is received, IIS impersonates the IUSR_computername account before executing any code or accessing any files. IIS is able to impersonate the IUSR_computername account because the user name and password for this account are known by IIS.
  3. Before returning a page to the client, IIS checks NTFS file and directory permissions to see whether the IUSR_computername account is allowed access to the file.
  4. If access is allowed, authentication completes and the resources are available to the user.
  5. If access is not allowed, IIS attempts to use another authentication method. If none is selected, IIS returns an "HTTP 403 Access Denied" error message to the browser.

Important    If you enable Anonymous authentication, IIS always attempts to authenticate the user with Anonymous authentication first, even if you enable additional authentication methods.

You can change the account that is used for Anonymous authentication from the IIS snap-in, either at the Web server service level or for individual virtual directories and files. The anonymous account must have the user right to log on locally. If the account does not have the Log On Locally permission, IIS will not be able to service any anonymous requests. The IIS installation specifically grants the Log On Locally permission to the IUSR_computername account. The IUSR_computername accounts on domain controllers are not given to guest accounts by default. To allow anonymous logons, you must change IUSR_computername accounts to Log On Locally.

Note   You can programmatically change the requirement for Log On Locally rights by using the Active Directory Service Interfaces (ADSI). For information, see the LogonMethod reference in the Active Server Pages Guide.

You can also change the security privileges for the IUSR_computername account in Windows by using the Group Policy Manager snap-in of the Microsoft Management Console (MMC). However, if the anonymous user account does not have permission to access a specific file or resource, your Web server will refuse to establish an anonymous connection for that resource. For more information, see Setting Web Server Permissions.

Important   When you change the IUSR_computername account, the changes affect every anonymous HTTP request that a Web server services. Use caution if you modify this account.

Basic Authentication

The Basic authentication method is a widely used, industry-standard method for collecting user name and password information.

Client Authentication Process

  1. The Internet Explorer Web browser displays a dialog box where a user enters his or her previously assigned Windows account user name and password, also known as credentials.
  2. The Web browser then attempts to establish a connection to a server using the user's credentials. The clear text password is Base64 encoded before it is sent over the network.
  3. Important   Base64 encoding is not encryption. If a Base64 encoded password is intercepted over the network by a network sniffer, unauthorized persons can easily decode and reuse the password.

  4. If a user's credentials are rejected, Internet Explorer displays an authentication dialog window for the user to re-enter his or her credentials. Internet Explorer allows the user three connection attempts before failing the connection and reporting an error to the user.
  5. When your Web server verifies that the user name and password correspond to a valid Microsoft Windows user account, a connection is established.

For information about setting up Basic authentication, see Enabling and Configuring Authentication.

The advantage of Basic authentication is that it is part of the HTTP specification and is supported by most browsers. The disadvantage is that Web browsers using Basic authentication transmit passwords in an unencrypted form. By monitoring communications on your network, someone can easily intercept and decode these passwords using publicly available tools. Therefore, Basic authentication is not recommended unless you are confident that the connection between the user and your Web server is secure, such as with a dedicated line or a Secure Sockets Layer (SSL) connection. For more information, see Encryption.

Note   Integrated Windows authentication takes precedence over Basic authentication. The browser chooses integrated Windows authentication and attempts to use the current Windows logon information before prompting the user for a user name and password. Currently, only Internet Explorer versions 2.0 and later support Integrated Windows authentication.

Digest Authentication

Digest authentication offers the same functionality as Basic authentication. However, Digest authentication is a security improvement in the way that a user's credentials are sent across the network. Digest authentication transmits credentials across the network as an MD5 hash, also known as a message digest, where the original user name and password cannot be deciphered from the hash. Digest authentication is available to Web Distributed Authoring and Versioning (WebDAV) directories.

Installation of additional client software is not required, but Digest authentication does rely on the HTTP 1.1 protocol as defined in the RFC 2617 specification at the World Wide Web Consortium Web site. Because Digest authentication requires HTTP 1.1 compliance, not all browsers support it. If a non-HTTP 1.1 compliant browser requests a file from a server using Digest authentication, the server will request the client for digest credentials. The non-HTTP 1.1. compliant client rejects the request because digest is not supported by the client.

Requirements for Digest

Before enabling Digest authentication on your IIS server, ensure that all of the following minimum requirements are met. Only domain administrators can verify that the domain controller (DC) requirements are met. Check with your domain administrator if you are unsure about whether your DC meets the following requirements:

Client Authentication Process

The following steps outline how a client is authenticated using Digest authentication: Digest Authentication client authentication.
  1. The client requests a file from the IIS server.
  2. The IIS server denies the request and sends the client the following information:
  3. Internet Explorer prompts the user for credentials (user name and password). Internet Explorer then combines these credentials with the name of the realm to create an MD5 hash and resubmits the request for the file from the IIS server, this time sending the MD5 hash.
  4. The IIS server receives the hash and sends the client's hash to the domain controller for verification.
  5. The domain controller informs the IIS server of the authentication results.
  6. If the client is authenticated, IIS sends the requested document or data to the client.

Important    Digest authentication completes only if the DC has a clear-text copy of the requesting user's password stored in Active Directory. Because the DC stores clear-text copies of passwords, Active Directory must be secured both from physical and from network attacks.

Advanced Digest Authentication

Advanced Digest authentication is exactly the same as Digest authentication except for the way that user credentials are stored on the domain controller (DC). Advanced Digest is a security improvement over Digest because Advanced Digest not only sends users credentials across the network as an MD5 hash, Advanced Digest also stores user credentials in Active Directory on the DC as an MD5 hash, also known as a message digest. Because credentials are stored in Active Directory as an MD5 hash, user passwords cannot be feasibly discovered by someone with access to the DC. Advanced Digest authentication is available to Web Distributed Authoring and Versioning (WebDAV) directories and does not replace Digest authentication.

Installation of additional client software is not required; however, Advanced Digest authentication does rely on the HTTP 1.1 protocol as defined in the RFC 2617 specification at the World Wide Web Consortium Web site. Because Advanced Digest authentication relies on the HTTP 1.1 protocol, not all browsers support it. If a non-HTTP 1.1 compliant browser requests a file from a server using Digest authentication, the server will request the client to provide digest credentials. The non-HTTP 1.1. compliant client rejects the request because digest is not supported by the client.

Requirements for Advanced Digest

Before enabling Advanced Digest authentication on your IIS server, ensure that all of the following minimum requirements are met. Only domain administrators can verify that the domain controller (DC) requirements are met. Check with your domain administrator if you are unsure about whether your DC meets the following requirements:

Important    You can enable Advanced Digest authentication only when the DC and IIS server are both running Windows XP. If either your DC or IIS server is running Windows 2000 or earlier, IIS defaults to Digest Authentication and does not warn you of this action.

Client Authentication Process

The following steps outline how a client is authenticated using Advanced Digest authentication:

Digest Authentication Client Authentication.

  1. The client requests a file from the IIS server.
  2. The IIS server denies the initial request and sends the client the following information:
  3. Internet Explorer prompts the user for credentials (user name and password). Internet Explorer then combines these credentials with the name of the realm to create an MD5 hash and resubmits the request for the file to the IIS server, this time also sending the MD5 hash in the header of the HTTP request.
  4. The IIS server receives the client's hash and sends it to the domain controller for verification.
  5. The domain controller compares the client's hash to the copy stored in Active Directory. If the hash values match, the domain controller informs the IIS server that the client is authenticated.
  6. The IIS server sends the requested file to the client.

Note   In Step 2, the IIS server reports to the client (Internet Explorer) that Digest authentication is used, rather than Advanced Digest authentication because the same Digest authentication algorithm is used between the IIS server and the client for both Digest and Advanced Digest authentication.

Integrated Windows Authentication

Integrated Windows authentication (formerly called NTLM, also referred to as Windows NT Challenge/Response authentication) is a secure form of authentication because the user name and password are hashed before being sent across the network. When you enable Integrated Windows authentication, the user's browser proves its knowledge of the password through a cryptographic exchange with your Web server, involving hashing.

Integrated Windows authentication uses Kerberos v5 authentication and NTLM authentication. If Active Directory Services is installed on a Windows 2000 or later domain controller and the user's browser supports the Kerberos v5 authentication protocol, Kerberos v5 authentication is used; otherwise, NTLM authentication is used.

The Kerberos v5 authentication protocol is a feature of the Windows 2000 Distributed Services architecture. For Kerberos v5 authentication to be successful, both the client and the server must have a trusted connection to a Key Distribution Center (KDC) and be Directory Services compatible. For more information about Kerberos and NTLM, see the Windows XP online documentation.

Integrated Windows Authentication Process

The following steps outline how a client is authenticated using Integrated Windows authentication:
  1. Unlike Basic authentication, Integrated Windows authentication does not initially prompt for a user name and password. The current Windows user information on the client computer is used for Integrated Windows authentication.
  2. Note   Internet Explorer versions 4.0 and later can be configured to initially prompt for user information if needed. For more information, see the Internet Explorer documentation.

  3. If the authentication exchange initially fails to identify the user, the browser prompts the user for a Windows user account user name and password, which it processes by using Integrated Windows authentication.
  4. Internet Explorer continues to prompt the user until the user either enters a valid user name and password or closes the prompt dialog box.

Although Integrated Windows authentication is secure, it does have two limitations:

  1. Only Microsoft Internet Explorer versions 2.0 and later support this authentication method.
  2. Integrated Windows authentication does not work over HTTP Proxy connections.

Therefore, Integrated Windows authentication is best suited for an intranet environment, where both user and Web server computers are in the same domain and where administrators can ensure that every user has Microsoft Internet Explorer version 2.0 or later.

Certificate Authentication

You can also use your Web server's Secure Sockets Layer (SSL) security features for two types of authentication. You can use a server certificate to allow users to authenticate your Web site before they transmit personal information, such as a credit card number. Also, you can use client certificates to authenticate users requesting information on your Web site. SSL authenticates by checking the contents of an encrypted digital identification submitted by the user's Web browser during the logon process. (Users obtain client certificates from a mutually trusted third-party organization.) Server certificates usually contain information about your company and the organization that issued the certificate. Client certificates usually contain identifying information about the user and the organization that issued the certificate. For more information, see About Certificates.

Client Certificate Mapping

Because a Windows user account is required to access resources like files, you can associate, or map, client certificates to Windows user accounts on your Web server. After you create and enable a certificate map, each time a user logs on with a client certificate, your Web server automatically associates that user to the appropriate Windows user account. This way, you can automatically authenticate users who log on with client certificates, without requiring the use of either Basic, Digest, or Integrated Windows authentication. You can map either one client certificate to one Windows user account or many client certificates to one account. For example, if you had several different departments or businesses on your server, each with its own Web site, you could use many-to-one mapping to map all of the client certificates of each department or company to its own Web site. This way, each site provides access only to its own clients. For more information, see Mapping Client Certificates to User Accounts.

FTP Authentication

Anonymous FTP Authentication

You can configure your FTP server to allow anonymous access to FTP resources. If you select Anonymous FTP authentication for a resource, all requests for that resource are taken without prompting the user for a user name or password. This is possible because IIS automatically creates a Windows user account called IUSR_computername, where computername is the name of the server on which IIS is running. This is very similar to Web-based Anonymous authentication. If Anonymous FTP authentication is enabled, IIS always try to use it first, even if you enable Basic FTP authentication. For more information, see Anonymous Authentication.

Basic FTP Authentication

To establish an FTP connection with your Web server by using Basic FTP authentication, users must log on with a user name and password corresponding to a valid Windows user account. If the FTP server cannot verify a user's identity, the server returns an error message. FTP authentication is not very secure because the user transmits password and user name across the network in an unencrypted form. For more information, see About Access Control.


© 1997-2001 Microsoft Corporation. All rights reserved.