Google Search Appliance software version 5.0
Posted October 2007
Google SAML Bridge for Windows lets you integrate Google Search Appliance into a Windows domain environment, to provide a better search experience for your users. By default, a Google Search Appliance user who searches for and views secure content must enter credentials at an authentication stage and a results authorization stage. The Google SAML Bridge for Windows enables the search appliance to use the user's Windows domain login credentials and removes the need for redundant logins.
About This Document
Overview
Meeting the Prerequisites
Downloading and Unpacking the SAML Bridge
Configuring the SAML Bridge in IIS
Granting the "Act as Part of the Operating System" Privilege
Verifying the Setup
Setting Up and Using the Google Search Appliance Simulator
Deploying to a Production Environment
Troubleshooting
This section describes the audience for this document, some terminology that you should be aware of, and some additional sources of information.
This document assumes that you are an experienced Windows administrator. You must have privileges to configure Active Directory and to configure the Internet Information Services (IIS) server that will host the SAML Bridge, or access to someone who can do that.
In this document, Internet Information Services (IIS) servers are used in two ways:
When this document refers to the Windows networking protocol SMB/CIFS, it uses the term Common Internet File System (CIFS), to match the user interface of the components you'll be configuring. Other search appliance documentation refers to the same protocol by using the term Server Message Block (SMB).
For background information on the technology described in this document, refer to these sources:
Google SAML Bridge for Enterprise facilitates authentication and authorization for search results, mediating between your users and your Windows domain. It allows users to gain seamless access to content that resides on file systems, web servers, or Microsoft Office Sharepoint servers. The SAML Bridge is implemented as an ASP.NET website that resides in IIS.
This overview describes the role of the SAML Bridge in the lifecycle of a search query:
Before installing the SAML Bridge, you'll need to check software versions and perform some configuration.
This section covers the following prerequisites:
You can use the SAML Bridge with file shares or other content servers. The following content servers were tested:
To verify the version of IIS, do this: From the Start menu, point to Administrative Tools, then click Internet Information Services (IIS) Manager. In IIS Manager, choose Help > About.
The following prerequisites apply to the IIS server that hosts the SAML Bridge:
Kerberos must be running on each content server whose content requires authorization.
To verify whether Kerberos is being used, you can use tools such as Windows Network Monitor or tcp trace or a browser extension that shows HTTP headers. You can view the headers that result from any communication with the content server. The content server should send the following header if Kerberos is in use.
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: Wed, 26 Sep 2007 21:26:01 GMT
You can refer to an unsupported Wiki page on configuring Kerberos for more information.
The domain controller that is running Active Directory must meet the following requirements:
To configure Active Directory to permit the SAML Bridge to use delegated credentials, follow this procedure:
To find the service type:
To select the name of the services in the User or Computer column:
You can install the SAML Bridge on any IIS server that meets the prerequisites listed above.
To install the SAML Bridge software, do the following:
There are two sub folders:
saml-bridge directory contains the SAML Bridge. gsa-simulator directory contains a simulator that you use to test the SAML Bridge before connecting it to the search appliance. The SAML Bridge for Enterprise is implemented as a virtual directory that runs in IIS.
You must now create the virtual directory in IIS.
The Virtual Directory Creation Wizard appears.
When you configured the virtual directory to run scripts such as ASP, you configured it as a web application. You'll now configure the web application.
saml-bridge, which you created in the previous procedure. saml-bridge, and select Properties. The Properties dialog appears, showing the default tab Virtual Directory. Now you have created the saml-bridge virtual directory and configured it as a web application.
The Login.aspx file is the component of the SAML Bridge that authenticates the user. When a user makes a secure search request, the search appliance redirects the request to this Login.aspx file for authentication, as described in the Overview section.
You will now configure the Login.aspx file to require authentication, so that the user's browser sends Windows login credentials.
saml-bridge. This file is treated differently from other files in the saml-bridge website. This file requires authentication, but the search appliance needs anonymous access to other files under the virtual directory.
This process verifies that the Application Pool identity for the SAML Bridge is Network Service.
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 the 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.
When the search appliance sends an authorization request with a user name, the SAML Bridge can generate a Windows token by impersonation, but it can use the token to access remote resources only if it has the privilege "Act as part of the operating system." The Network Service that represents the identity of the SAML Bridge Application Pool must now be configured to act as part of the operating system, if it is not already configured that way.
In some environments, you can't configure a host individually, because the domain controller sets security settings for all hosts in the domain. If your environment is set up that way, you'll need to get access to the domain controller or to ask its administrator to perform this configuration.
If you can configure the SAML Bridge host, do the following:
Before proceeding, you now need to verify the configuration as follows:
This step verifies that the Application Pool of the SAML Bridge is using Network Service and that the SAML Bridge can obtain a user's identity.
In the address field of an Internet Explorer browser, enter http://your_saml_bridge_host/saml-bridge/Login.aspx.
You'll see a response like 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 the SAML Bridge is properly configured to use Network Service. If Application Pool Identity is not set to Network Service, follow the steps in Verifying the Configuration of the SAML Bridge Application Pool.
In the response, you'll see your own domain and login information, because you accessed the file. When the system is in use, the file obtains the domain and login information for each authenticated user.
This step checks that Active Directory is configured to allow delegation by the SAML Bridge. You specify a domain and username, and the test returns a message that is written using the user's identity.
In the address field of an Internet Explorer browser, enter http://your_saml_bridge_host/saml-bridge/Login.aspx?subject=user@domain, in which user@domain is any domain user. You should not be prompted for credentials. If you are prompted for credentials, refer to the section Troubleshooting.
If your SAML Bridge host is myhost, your username is jeff, and your domain is inside-sales, you'd enter the following address:
http://myhost/saml-bridge/Login.aspx?subject=jeff@inside-sales
Text like the following appears in the browser:
Obtained Windows identity for jeff@inside-sales This message was written using the identity of jeff@inside-sales
Impersonation successful!
Repeat this test with a variety of user accounts, to ensure that the SAML Bridge can impersonate various users.
A Google Search Appliance simulator lets you test that the SAML Bridge can gain authorization for resources on the content server, without involving the complexity of the search appliance. Once you know that the SAML Bridge works, you can reconfigure it to work with the search appliance.
Like the SAML Bridge, the simulator is implemented as a .NET web application. When you configure the simulator, you'll repeat some of the steps you took to configure the SAML Bridge. The simulator is in the SAML Bridge sub folder /gsa-simulator/.
The steps are as follows:
You perform all these steps on the host on which you installed the SAML Bridge and simulator.
You must now create a virtual directory in IIS for the simulator.
The Virtual Directory Creation Wizard appears.
You'll now configure the web application.
Now you have created the gsa-simulator virtual directory and configured it as a web application.
The search appliance simulator lets you examine the communication flow between the SAML Bridge and search appliance. These steps configure the simulator by providing it with the location of the SAML bridge:
Web.config for edit. <appSettings>. You'll see the following lines:
<add key="ac" value="http://saml-bridge-hostname/saml-bridge/" />
These steps configure the SAML Bridge by providing it with the location of the simulator.
Web.config for edit. <appSettings>. You'll see the following lines:
<add key="provider" value="SAMLServices.Wia.AuthImpl"/> <add key="log_level" value="error"/> <!-- gsa uses Https for artifactConsumer --> <!--add key="artifact_consumer" value="https://gsa_host/SamlArtifactConsumer"/--> <!-- this is the GSA simulator -->
<add key="artifact_consumer" value="http://host_name/gsa/SamlArtifactConsumer.aspx"/>
debug. You'll reset the value to error when you're ready to deploy the SAML Bridge, for performance reasons.
Notice the fourth and sixth lines, which are similar. These lines specify the artifact_consumer, which is a URL for the service to which the SAML Bridge sends information. The fourth line is a configuration to use with the search appliance and the sixth line is a configuration to use with the simulator.
Later, when you're ready to deploy the SAML Bridge to a production environment, you'll reverse this process, to enable the SAML Bridge to communicate with the search appliance rather than the simulator.
To test the SAML Bridge by using the simulator, do the following:
http://your_saml_bridge_host/gsa-simulator/Default.aspx
The browser window displays a link with this text: "Click this link to simulate a secure document search."
The file Search.aspx appears. This simulated search page lets you specify a file or URL resource whose authorization you want to test. In response, you receive feedback about whether you are permitted access to the specified resource.
SMB://rest-of-url
This is an example of a permit code:
<saml:AuthzDecisionStatement Resource="http://contentvm10/test2.html" Decision="Permit">This is an example of a deny code:
<saml:AuthzDecisionStatement Resource="http://contentvm10/test2.html" Decision="Deny">If the content server is down, or if there are configuration errors, the response contains the following:
<saml:AuthzDecisionStatement Resource="http://contentvm10/test2.html" Decision="Indeterminate">
Once you have successfully used the SAML Bridge with the simulator, you can set up communication between the SAML Bridge and your search appliance.
If you haven't already configured the search appliance to crawl your secure content, do it now. In the Admin Console, do the following:
You are now ready to set up your environment.
You must now configure the Google Search Appliance so that it uses the SAML Bridge for authentication and authorization. You do this by configuring it to use the authentication SPI and the authorization SPI.
To configure the search appliance, do the following:
http://your_ac_host/ac/Login.aspx, where your_ac_host is the name of the host on which the SAML Bridge is installed http://your_ac_host/ac/Resolve.aspx. http://your_ac_host/ac/Authz.aspx. SSL is required by the SAML artifact consumer URL on the Google Search Appliance, but not by the search page or SAML Bridge. However, if you do not enable SSL on both the Google Search Appliance and SAML Bridge host, secure searches display warnings about redirection to secured sites from non-secured sites. Therefore, Google recommends that you enable SSL on both the Google Search Appliance and SAML Bridge.
For information on how to enable SSL for the Google 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.
In a previous step, you configured the SAML Bridge to communicate with the simulator. Now you must reconfigure the SAML Bridge so that it communicates with the search appliance instead of the simulator.
Web.config for edit. <appSettings>. You'll see the following lines:
<add key="provider" value="SAMLServices.Wia.AuthImpl"/> <add key="log_level" value="debug"/> <!-- gsa uses Https for artifactConsumer --> <!--<add key="artifact_consumer" value="https://gsa_host/SamlArtifactConsumer"/>--> <!-- this is the GSA simulator -->
<add key="artifact_consumer" value="http://host_name/gsa/SamlArtifactConsumer.aspx"/>
debug to error. It's important to make sure that the two systems can communicate with each other, as follows:
http://your_ac_host/ac/Login.aspx, where your_ac_host is the name of the host on which the SAML Bridge is installed. If you discover problems here, check for network connectivity issues as you would for any two hosts.
The system clock of the SAML Bridge host and the system clock of the search appliance must be synchronized, to prevent the search appliance from invalidating authentication responses. The search appliance treats an authentication response as invalid if the timestamp of the response is not close to the time of the search appliance system clock.
Take measures to verify that these system clocks are synchronized.
If your environment uses the Network Time Protocol (NTP), do the following:
Perform a search that includes secure results and check that the results match your expectations. If problems occur, refer to the next section, Troubleshooting.
This section contains some troubleshooting tips. These are some general tips for narrowing your problem:
web.config file to "debug," and then view the ac.log file for log messages. In the step in which you test impersonation and access http://your_saml_bridge_host/saml-bridge/Login.aspx, you are prompted to enter your username and password, although you should not be prompted.
If you enter credentials and are granted access, the cause for this problem can be one of the following:
If you enter credentials but are not granted access, the Kerberos configuration may be incorrect and might have duplicate SPNs configured. Contact Microsoft Support.
In the step in which you test impersonation, some users can be impersonated but others cannot.
There are many ways in which user security can be inconsistent. This is one technique for resolving this problem:
By default, the permissions for Authenticated Users is Read.
In the step in which 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.
This error indicates that the host on which the SAML Bridge resides might have an incompatible version of the .NET framework. Refer to the section Web Server Prerequisites for the correct version.
If you've checked the .NET version and determined that it meets the requirements, you can reconfigure the .NET framework for IIS as follows:
cd C:\WINDOWS\Microsoft.NET\Framework\your-version\
aspnet_regiis.exe -i
When the command is done reconfiguring your IIS server to use the specified version of .NET, it displays a message like the following:
Finished installing ASP.NET (2.0.50727).
The log file shows a 401 error (unauthorized). The following is an example.
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)
This problem is typically a result of Kerberos configuration problems. Check that Kerberos is set up, using the procedure specified in the Prerequisites section.
For more troubleshooting steps, visit the SAML Bridge wiki.
Last modified: