Enabling Windows Integrated Authentication
About This Document
This section describes the audience for this document and some additional sources of information.
Audience
For More Information
For background information on Kerberos refer to these sources:
•
|
The topic “Configuring Crawl and Serve for Kerberos” in the document Managing Search for Controlled-Access Content, and the online help topics on the pages cited in that topic.
|
•
|
A Google search on Kerberos (http://www.google.com/search?q=kerberos) can provide background information on the Kerberos network authentication protocol.
|
For background information on the technology described in this document, refer to these sources:
•
|
The topic The SAML Authentication Service Provider Interface (SPI) in the document Managing Search for Controlled-Access Content, and the online help topics on the pages cited in that topic.
|
•
|
The Authentication/Authorization for Enterprise SPI Guide. SAML Bridge is an application of the Google Search Appliance Authentication/Authorization SPI, for which it has the roles of Identity Provider and Policy Decision Point. These terms are explained in the SPI Guide.
|
•
|
A Google search on SAML (http://www.google.com/search?q=saml) can provide background information on the SAML protocol.
|
Overview
There are two options for enabling silent authentication in Windows on the Google Search Appliance:
Choose one of the following based on how your environment will provide authentication:
Enabling Kerberos on the Search Appliance
On board Kerberos can be used for both crawling and for serving controlled-access content. You must configure the search appliance to use Kerberos authentication at serve time. For information about configuring Kerberos-based authentication for serve, refer to the topics Configuring Crawl and Serve for Kerberos and Kerberos-Based Authentication in the document Managing Search for Controlled-Access Content.
Using SAML Bridge with the Search Appliance
It is preferable to achieve silent authentication by enabling Kerberos on the search appliance (called “Kerberizing”). However, if your implementation requires the use of SAML Bridge for authentication (see examples listed in the Overview, then SAML Bridge can be used to mediate between your users and your Windows domain. SAML Bridge is implemented as an ASP.NET website that resides in IIS.
Note: Although SAML Bridge can be used to authorize content that resides on web servers, this is no longer a common use for it. If your environment requires this, refer to Authorize Content with SAML Bridge for details.
Silently Authenticate Users with SAML Bridge
Prerequisites for Using SAML Bridge
The following prerequisites apply to the IIS content server that hosts SAML Bridge:
•
|
The server must be running .NET Framework Version 2.0 or later. To verify the version, in the IIS Manager tree view, under the host name, choose Web Service Extensions. In the Web Service Extensions panel, look for ASP.NET version 2.0 or later.
|
Additional prerequisites apply to content servers when using SAML Bridge for Authorization. For details, refer to Prerequisites for Using SAML Bridge for Authorization.
Installing SAML Bridge
You can install SAML Bridge on any IIS server that meets the prerequisites described above.
5.
|
Double-click the installer file. The Welcome screen is displayed.
|
6.
|
Click Next.
|
7.
|
On the Installer Type panel, select Custom and click Next. On the Custom Setup panel, SAML Bridge is part of the GSA Resource Kit for SharePoint.
|
8.
|
Select GSA Resource Kit for SharePoint.
|
9.
|
Click Next.
|
If you’re installing SAML Bridge for silent authentication, see Configuring SAML Bridge in IIS.
If you’re installing SAML Bridge to authorize web content, which is no longer a common use but might be needed in some environments as described in the Overview, proceed to Configuring the Search Appliance to Use SAML Bridge for Authorization.
Configuring SAML Bridge in IIS
Configuring SAML Bridge in IIS 6.0
SAML Bridge is implemented as a virtual directory that runs in IIS. In SAML Bridge 2.0 and later, the virtual directory is created automatically when you install SAML Bridge, and files in the saml-bridge virtual directory have anonymous access. The following instructions apply when you use IIS 6.0.
Configuring the SAML Bridge Virtual Directory as a Web Application
When you install SAML bridge, two virtual directories are created: gsa-simulator and saml-bridge.
To configure the saml-bridge virtual directory as a web application:
1.
|
In the IIS Manager tree view, under the web site gsa-resource-kit, find the virtual directory called saml-bridge, which the installer created during the installation process.
|
2.
|
Right click the virtual directory saml-bridge, and select Properties. The Properties dialog box appears, showing the default tab Virtual Directory.
|
3.
|
4.
|
5.
|
Write down the name that appears on the Application Pool drop-down menu. You’ll use this name when you verify the configuration of the Application Pool.
|
6.
|
Click the Directory Security tab.
|
7.
|
In the Authentication and Access Control region, click Edit. The Authentication Methods dialog box is displayed.
|
8.
|
Select Enable anonymous access if it is not already selected, and clear any options that are selected in the Authenticated access region.
|
9.
|
Click OK to close the Authentication Methods dialog box and then click OK to close the Properties dialog box.
|
Next, verify the configuration of the SAML Bridge application pool.
Verifying the Configuration in IIS 6.0 of the SAML Bridge Application Pool
This process verifies that the Application Pool Identity for SAML Bridge is Network Service.
1.
|
In the IIS Manager tree view, click to expand Application Pools.
|
2.
|
3.
|
4.
|
In Application pool identity, verify that Predefined is selected and that Network Service is selected in the drop-down menu.
|
5.
|
Next, configure the IdP endpoint in IIS for SAML Bridge. Refer to Configuring the IdP Endpoint in IIS for SAML Bridge.
Configuring SAML Bridge in IIS 7 with Windows 2008
SAML Bridge is implemented as a virtual directory that runs in IIS. In SAML Bridge 2.0 and later, the virtual directory is created automatically when you install SAML Bridge, and files in the saml-bridge virtual directory have anonymous access. The following steps apply when you use IIS 7.0.
Verifying the .NET Framework Version
To verify the version of .Net framework in Windows 2008:
2.
|
Verifying the Configuration in IIS 7 of the SAML Bridge Application Pool
This process verifies that the Application Pool Identity for SAML Bridge is Network Service.
1.
|
In the IIS Manager tree view, click to expand the Application Pools.
|
2.
|
Select the name of the application pool that was configured for SAML Bridge and select Advanced Setting from the Actions pane.
|
3.
|
4.
|
Click OK to close the dialog box.
|
Next, configure the IdP endpoint in IIS for SAML Bridge.
Configuring the IdP Endpoint in IIS for SAML Bridge
SAML Bridge supports both POST Binding, which is recommended, and Artifact Binding. As a SAML IdP, SAML Bridge uses different endpoints for these binding types. The endpoint is where the search appliance redirects the client to be authenticated. For POST Binding, Post.aspx is the authentication endpoint. For Artifact Binding, Login.aspx is the authentication endpoint.
1.
|
2.
|
Select the Content view.
|
•
|
•
|
If you are using Artifact Binding, select Login.aspx.
|
4.
|
In the Actions pane, click Switch to Features view, which displays either the Post.aspx home or Login.aspx home, depending on the endpoint you previously selected.
|
5.
|
Double-click the Authentication icon.
|
6.
|
7.
|
The endpoint file is treated differently from other files in SAML Bridge. The endpoint file identifies users by enabling authentication. Other files (in particular, Resolve.aspx and Authz.aspx used for Artifact Binding and authorization) must allow anonymous access in the virtual directory.
Granting Permissions for the SAML Bridge Log File
To grant permission for users to write to the SAML Bridge log file:
1.
|
2.
|
3.
|
4.
|
5.
|
Click OK.
|
6.
|
7.
|
Click OK.
|
Additional Steps to Configure SAML Bridge for POST Binding
To configure SAML Bridge for POST Binding, you must:
Locate the Certificate to Use
If there is not a ready-to-use certificate, you must create one. The certificate for SAML POST Binding can be generated the same way it is for HTTPS serving in IIS. See http://technet.microsoft.com/en-us/library/cc753127(v=ws.10).aspx for details on generating a certificate in Windows.
To locate the name of the certificate on the server and copy the certificate name to the web.config file:
1.
|
2.
|
Choose File > Add/Remove Snap-in, and click Add to select a certificate to add. A wizard displays, which lets you choose the account to manage certificates.
|
3.
|
4.
|
5.
|
6.
|
In the certificates tree, navigate to and expand the node named Personal. This is where certificates are stored in IIS.
|
8.
|
In the Details tab, locate the Friendly Name attribute, and copy it as the value for the certificate_friendly_name attribute in the SAML Bridge web.config file.
|
Also, note the value of the Subject attribute in the Details tab. You will need it in the next step to grant SAML Bridge access to the certificate.
Grant SAML Bridge Access to the Certificate
To list accounts that have access to this certificate, type:
winhttpcertcfg -l -c LOCAL_MACHINE\My -s any_word_in_the_subject_attribute_of_the_certificate
To grant the Network Service account access to the certificate, type:
winhttpcertcfg -g -c LOCAL_MACHINE\My -s any_word_in_the_subject_attribute_of_the_certificate -a "Network Service"
Obtain the Public Key
You must copy the public key in text format into the SAML configuration in the search appliance Admin Console: Search > Secure Search > Universal Login Auth Mechanisms > SAML tab (Public Key of IDP field). If the public key is in PEM format, you can obtain the base64 encoded text from the certificate. If the certificate is not in PEM format, you must convert it to PEM format.
To convert a certificate to PEM format:
1.
|
Open a FireFox browser, and click the lock icon that appears in the status bar. The Certificate Viewer window displays.
|
2.
|
Click View Certificate,
|
3.
|
4.
|
Click Save.
|
Verifying the SAML Bridge Configuration
•
|
•
|
You’ll see a response such as the following, which assumes that your domain is sam1 and your Windows account is davidd.
Application Pool Identity = NT AUTHORITY\NETWORK SERVICE
Your Windows account = sam1\davidd
Use Login.aspx?subject=user@domain to test impersonation
The NETWORK SERVICE keyword shows that SAML Bridge is properly configured to use Network Service. If Application Pool Identity is not set to Network Service, follow steps in Verifying the Configuration in IIS 6.0 of the SAML Bridge Application Pool or Verifying the Configuration in IIS 7 of the SAML Bridge Application Pool, depending on the version of IIS you use.
Configuring the Search Appliance to use SAML Bridge for Authentication
To configure the search appliance, do the following:
1.
|
In the search appliance Admin Console, click Search > Secure Search > Universal Login Auth Mechanisms.
|
2.
|
In the SAML tab, select the credential group from the drop-down list.
|
3.
|
Type a value in the Mechanism Name field.
|
4.
|
Type a value in the IDP Entity ID field.
|
5.
|
In the Login URL field, type the login URL of SAML Bridge, which is in the format:
|
http(s)://saml-hostname:port/saml-bridge/Login.aspx
http(s)://saml-hostname:port/saml-bridge/Post.aspx
•
|
If you're using Artifact Binding, enter the Artifact Resolver URL. Do not specify a Public Key of IDP. The Artifact Resolver URL is in the format:
|
http(s)://saml-hostname:port/saml-bridge/Resolve.aspx
7.
|
Click Save.
|
Completing the Configuration Process
Follow steps in this section to complete the configuration process.
Checking Time Synchronization
Verify that these system clocks are synchronized.
If your environment uses Network Time Protocol (NTP), do the following:
a.
|
In the search appliance Admin Console, go to Administration > Network Settings.
|
c.
|
Use the Network Diagnostics box to test connectivity between the search appliance and the NTP server.
|
Ensuring Connectivity Between the Google Search Appliance and SAML Bridge
Verify that the two systems can communicate with each other:
1.
|
In the Admin Console, go to Administrator > Network Settings.
|
2.
|
In Network Diagnostics, enter the URL for the Login.aspx file in the URLs to Test box as follows, where your_ac_host is the name of the host on which SAML Bridge is installed:
|
3.
|
Click Update and Perform Diagnostics.
|
If you discover problems here, check for network connectivity issues as you would for any two hosts.
Enable SSL on SAML Bridge
For information on how to enable SSL for the search appliance, in the Admin Console, click Administration > SSL Settings. Use the online help that is available from that page for information.
For information on how to enable SSL for SAML Bridge, refer to the Microsoft IIS documentation.
Performing a Test Search
Troubleshooting SAML Bridge for Authentication
•
|
Set the log level in the SAML Bridge web.config file to ‘debug’, and then view the ac.log file for log messages.
|
You Are Prompted When Testing Impersonation
Problem
When you test impersonation (see Verifying the SAML Bridge Configuration) by accessing one of the following URLs, you are prompted to enter your username and password when you should not be prompted:
Resolution
•
|
Security for the .aspx file might be configured incorrectly.
|
Only Some Accounts Can Be Impersonated
Problem
When you test impersonation (see Verifying the SAML Bridge Configuration), some users can be impersonated but others cannot.
Suggestion
3.
|
Click View > Advanced.
|
4.
|
5.
|
Select the Security Window.
|
8.
|
More Troubleshooting Steps
For more troubleshooting steps, visit the SAML Bridge wiki (http://code.google.com/p/google-saml-bridge-for-windows/wiki/SAMLBridgeFAQsTroubleshooting).
Authorize Content with SAML Bridge
Although SAML Bridge can also be used to authorize content that resides on web servers, this is no longer a common use for it. If you will be using SAML Bridge for authorization because your environment requires it as described in the Overview, follow steps in this section to meet prerequisites for installing and configuring it.
Review Authentication/Authorization for Enterprise SPI Guide for more details about communications between search appliance and SAML Bridge host.
Prerequisites for Using SAML Bridge for Authorization
If you are using SAML Bridge for authorization, the following prerequisites apply:
Content Server Kerberos Prerequisites
WWW-Authenticate: Negotiate
For example, in the following header, look for the Negotiate header in the server responses.
GET /ac/login.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET
CLR 1.1.4322; .NET CLR 2.0.50727)
Host: myhost
Connection: Keep-Alive
HTTP/1.1 401 Unauthorized
Content-Length: 1656
Content-Type: text/html
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Date: Monday, 15 Nov 2010 21:26:01 GMT
You can refer to an unsupported Wiki page on configuring Kerberos for more information (http://code.google.com/p/google-saml-bridge-for-windows/wiki/ConfigKerberos).
Important: If SAML Bridge is only used for authentication, Kerberos is not required on the content servers. However, because the search appliance requires the authorization service to be specified to allow the basic authentication prompt to be muted, you must properly configure SAML Bridge for authorization. To do this, perform the steps in Active Directory and Domain Controller Prerequisites on the domain controller machine, and perform the steps in Granting ‘Act as Part of the Operating System’ Privilege.
Active Directory and Domain Controller Prerequisites
The domain controller that is running Active Directory must meet the following requirements:
To configure Active Directory to permit SAML Bridge to use delegated credentials:
1.
|
Open the Microsoft Management Console (MMC) Active Directory Users and Computers snap-in.
|
2.
|
In the tree view, click Computers.
|
4.
|
5.
|
Select Trust this computer for delegation to specified services only.
|
6.
|
Select Use any authentication protocol.
|
7.
|
8.
|
9.
|
Under Enter the object names to select, enter the Service Principal Name (SPN) for the Kerberized content server to which the SAML Bridge host will delegate.
|
10.
|
Optionally, click Check Names to verify that you entered the name correctly.
|
11.
|
Click OK. The Add Services dialog box reappears, showing the available services for the object whose SPN you specified.
|
12.
|
13.
|
Click OK. The Properties dialog box reappears. Under Services to which this account can present delegated credentials, you can view the list of services that you just specified.
|
14.
|
Click OK to close the Properties dialog box and then close the Active Directory Users and Computers snap-in.
|
Modifying the Windows Registry
This step is required only if the same IIS server is both a SAML Bridge host and a content server.
To avoid problems that occur when SAML Bridge attempts to access the local web files, you’ll need to update the Registry, by following the instructions in Microsoft KB article 896861 (http://support.microsoft.com/kb/896861/).
Granting ‘Act as Part of the Operating System’ Privilege
If you can configure the SAML Bridge host, follow these steps:
1.
|
Select Control Panel > Administrative Tools > Local Security Settings.
|
2.
|
In the left panel, select Security Settings > Local Policies > User Rights Assignment.
|
3.
|
Open Act as part of operating system.
|
4.
|
5.
|
In the Add User or Group dialog box, enter Network Service and click OK. The Act as part of the operating system Properties dialog box reappears, with Network Service in the box.
|
6.
|
Once the prerequisites are met, refer to the steps for Installing SAML Bridge.
Configuring the Search Appliance to Use SAML Bridge for Authorization
To configure the search appliance to use SAML for authorization:
1.
|
In the search appliance Admin Console, click Search > Secure Search > Flexible Authorization.
|
2.
|
Choose SAML from the pull-down menu, and click Add another rule. The Add Flexible Authorization Rule page appears.
|
3.
|
In the URL Pattern field, type the URL pattern identifying the protected content.
|
4.
|
Select an Authentication ID from the pull-down menu or accept the default credential group. By selecting the Authentication ID, you are instructing the authorization mechanism to use a session identity from a specific credential group or instance of an authentication mechanism.
|
5.
|
6.
|
In the Authorization service ID field, enter the Entity ID of the SAML server.
|
7.
|
In the Authorization service URL field, enter:
|
http(s)://saml-hostname:port/saml-bridge/Authz.aspx
8.
|
Check Use batched SAML AuthZ requests to send multiple URLs for authorization in a single AuthZ HTTP request for improved serve time performance (recommended).
|
9.
|
Click Save.
|
10.
|
On the Flexible Authorization page, select the added rule and click Move Up to move it ahead of the HEADREQUEST rule. This causes the SAML rule to take precedence over the HEADREQUEST rule.
|
11.
|
Click Save Rules Order.
|
Continue to Completing the Configuration Process.
Troubleshooting SAML Bridge for Authorization
This section contains some troubleshooting tips that apply to authorization. For general tips to narrow your problem, refer to Troubleshooting SAML Bridge for Authentication. For more troubleshooting steps, visit the SAML Bridge wiki (http://code.google.com/p/google-saml-bridge-for-windows/wiki/SAMLBridgeFAQsTroubleshooting).
Authorization Testing Results in Indeterminate Status
Problem
When you run an authorization test, the permit code ‘Indeterminate’ appears and the following messages appear in the ac.log file.
3/13/2007 5:17:59 PM, GetPermission: after WindowsIdentity
3/13/2007 5:17:59 PM, GetPermission: AuthImpl::caught exception
3/13/2007 5:17:59 PM, GetPermission: Either a required impersonation level was
not provided, or the provided impersonation level is invalid.
Suggestion
This error indicates that the host on which SAML Bridge resides might have an incompatible version of the .NET framework. Refer to the section Prerequisites for Using SAML Bridge for the correct version.
cd C:\WINDOWS\Microsoft.NET\Framework\your-version\
aspnet_regiis.exe -i
Finished installing ASP.NET (2.0.50727).
Authorization Error
Problem
The log file lists a 401 error (unauthorized):
1/4/2007 9:14:19 AM, GetURL: GetURL =http://host.domain.domain.com:82/deny.html
1/4/2007 9:14:19 AM, GetURL: inside GetURL internal
1/4/2007 9:14:19 AM, GetURL: Sending a Head request to target URL
1/4/2007 9:14:19 AM, GetPermission: AuthImpl::caught WebException
1/4/2007 9:14:19 AM, GetPermission: e = System.Net.WebException: The remote
server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at SAMLServices.Common.GetURL(String url, ICredentials cred)
at SAMLServices.Common.GetURL(String url)
at SAMLServices.Wia.AuthImpl.GetPermission(String url, String subject)
Suggestion
This problem indicates a Kerberos configuration error. Check that Kerberos is properly configured, following steps in Content Server Kerberos Prerequisites.