Understanding the Secure Reverse Proxy
Secure reverse proxying occurs when one or more of the connections between the proxy server and another machine uses the Secure Sockets Layer protocol to encrypt data.
Secure reverse proxying has many uses, for example:
Provides an encrypted connection from a proxy server outside a firewall to a secure content server inside the firewall
Allows clients to connect securely to the proxy server, facilitating the secure transmission of information (such as credit card numbers)
Secure reverse proxying causes each secure connection to be slower due to the overhead involved in encrypting your data. However, because SSL provides a caching mechanism, two connecting parties can reuse previously negotiated security parameters, dramatically reducing the overhead on subsequent connections.
This scenario is effective if there is little or no chance that the information being exchanged between your proxy and content server can be accessed by unauthorized users (FIGURE 2). If your company requires a higher level of security, the proxy server can communicate securely with the back-end Web Server over SSL. Another alternative is to choose technologies such as IP Security Protocol (IPSec).
FIGURE 2 Secure Reverse Proxy
To Set Up a Secure Reverse Proxy Server Instance
Open a browser and go to http://myproxy.sun.com:81.
Click the Create New iPlanet Web Proxy Server 3.6 link. The web proxy server starts the installation wizard. Do the following:
Create a new Proxy instance:
Click OK.
Click Return to server selector.
Generate your server's key pair (public and private keys).
Log in as the proxy user.
Run the key-pair file generation program by typing $PROXY_HOME/bin/admin/admin/bin/sec-key.
When prompted, type an alias for the new key-pair file.
A screen with a progress meter appears. Type random keys at different speeds until the progress meter is full.
When prompted, type a password of eight characters or more for your key-pair file.
Request a certificate from a certificate authority (CA).
Click the Keys & Certificates button from the Administration Interface.
Click Request Certificate from the left menu options.
Supply the appropriate information:
Click OK.
Submit the generated certificate request to your CA.
Install the certificate the CA sends to you.
Click the Keys & Certificates button in the Administration Interface.
Click Install Certificate from the left menu options.
Supply the appropriate information:
Click OK.
Install the Trusted CA's certificate.
Click the Keys & Certificates button in the Administration Interface.
Click Install Certificate from the left menu options.
Supply the appropriate information:
Click OK.
Activate SSL for your server.
Click the secure proxy instance that was created.
Click Encryption On/Off in the menu.
Supply the appropriate information:
Click OK.
Click Save and Apply.
Select On/Off from the menu.
Click On to start your secure reverse proxy.
When prompted, enter your key-pair password., that is, sun1ProxySvr.
You will be prompted for a user ID and password. Enter the user ID proxyadmin and the password selected during the installation (for example, sun1ProxySvr).
Server Name: myproxy.sun.com Bind Address: ip_address_of_server Server Port: 443 Server Identifier: secure-myproxy Server User: proxyadmin Processes: 32 Select: Attempt to resolve IP addresses only for access control. Select: Extended log format (includes all byte counts, transfer time). Enable Proxying of: HTTP and HTTPS Enable SSL Tunneling for: HTTPS Uncheck: Cache FTP Uncheck: Cache Gopher
Leave all other options set to the default values.
The wizard creates the new proxy instance.
To generate a key-pair file, you need to run the key-pair file generator program from the command line.
Multiple instances can use different key pairs so you mightwant to choose an alias that matches your server (for example, myproxy). This way, you can easily identify the appropriate key pair to use for each specific instance. The alias cannot contain spaces, but it can use symbols that your operating system allows in file names (such as underscores). By default, the key-pair file is stored in server_root/alias/alias-key.db, where alias is the alias you typed. If you used the alias myproxy, your key-pair file would be server_root/alias/myproxy-key.db.
The time between each of your keystrokes is used to generate a random number for the unique key-pair file.
The password must have at least one non-alphabetical character (a number or punctuation mark). Make sure you memorize this password. The security of your server is only as good as the security of the key-pair file and its password. In this example, password is set to sun1ProxySvr.
You must know the password for the key-pair file referenced by the aliasthis is the password you must enter before starting or stopping a server that uses SSL encryption. The server uses the password to get your private key from the key pair.
Select: New Certificate Select: CA Email Address: <your_email_address> Alias: select_your_alias (that is, myproxy) Key Pair File Password: your_password (that is, sun1ProxySvr) Requestor Name: Your_Full_Name Telephone Number: Your_Telephone_Number Common Name: Fully qualified host name (that is, myproxy.sun.com) Email Address: your_email_address Organization: official name of your company Organizational Unit: optional organization within company Locality: optional entry describing your city State or Province: full name of state (that is, California) Country: two-character abbreviation (that is, US)
NOTE
We suggest that you specify your email in the "CA Email Address" field so that you can review the certificate request prior to submitting it to the Certificate Authority.
The wizard creates the certificate request.
----BEGIN NEW CERTIFICATE REQUEST----- MIIB1TCCAT4CAQAwgZQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh MRQwEgYDVQQHEwtTYW50YSBDbGFyYTEeMBwGA1UEChMVU3VuIE1pY3Jvc3lzdGVt cyBJbmMuMRQwEgYDVQQLEwtTdW4gT05FIFBUUzEkMCIGA1UEAxMbZ3Jhc3Nob3Bw ZXIucmVkLmlwbGFuZXQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDI +/4yIe1mJBHDQLy8sTtbAAaP6yy300pYj3t/i8diOsj/YCtYIJatWzkuoFgOQ+1K hiD+diS+HlYTh0ki/q8hCIFm/e08BnhXQ+zhMdwtazDWGeNqqKR9P1A6+WZIVtxa QWkdsXrYUkAkpKh+O8BsIpgBTelQQMbCetvhuI2oWwIDAQABoAAwDQYJKoZIhvcN AQEEBQADgYEAoAo/iQlu7CByZpWauXjDCfy9/W6jSKxXvxWQf+A22DNZ/LszgCf9 uwPAyr8E9RS2HUGCUtoBgWhzynCM3kS4qZnaGKM4EuIY7tGq5xkj7epVA0PI7O5G Pc5b2qs5NJOGVcvewZCOYtDQ1eaH4W5gZlHfu7PtG/CgH1Li5thKLTU= -----END NEW CERTIFICATE REQUEST-----
Remember that this capability can be provided internally by your organization, or this request can be fulfilled by organizations such as Verisign or Thawte.
Certificate for: This server Select: Message Text (with headers): <PASTE THE CERTIFICATE> Select: alias from the drop-down list (that is, myproxy) Encryption: On Port Number: (default SSL port is 443)
Certificate for: Trusted Certificate Authority (CA) Certificate Name: My Trusted CA Select: Message Text (with headers): Select: alias from the drop-down list (that is, myproxy)
NOTE
For instructions on how to select and disable "weak" ciphers, refer to the "Increase Server Security" section in the Sun ONE Web Proxy Server 3.6 SP3 Administrator's Guide.
Certificate for: This server Select: Message Text (with headers): <PASTE THE CERTIFICATE> Select: alias from the drop-down list (that is, myproxy)
The server will apply the changes and try to restart itself. Since the server is not in SSL mode, it will need to read the key-pair password. Since you have not supplied it, the server will not start.
To Set Up URL Mappings
Select the URLs button in the server menu.
Remove the default Client autoconfig mappings:
Click Remove in the Administration Interface.
Click OK.
Click Save and Apply.
Create Regular URL mappings.
Click Create Mappings in the Administration Interface.
Select Regular for Mapping type.
Enter the following for Map Source Prefix:
Enter the following for Map Destination:
Click OK.
Click Save and Apply.
Verify Reverse Proxy configuration.
The proxy will request verification that you want to remove that entry.
This will ensure that the changes are recognized by the proxy server and restart the proxy instance to ensure that the changes take effect immediately.
To illustrate the configuration with the example in FIGURE 2, the reverse proxy server at:
https://myproxy.sun.com
will be configured to proxy the content web server at:
http://www.sun.com
Note that the reverse proxy server address is the advertised address, and users may access it without any knowledge of the main server.
https://myproxy.sun.com
http://www.sun.com
This will ensure that the changes are recognized by the proxy server and restart the proxy instance to ensure that the changes take effect immediately.
Open a browser and access the proxy server. In this example, enter:
http://myproxy.sun.com
Controlling Access with Client Certificates
Since you have enabled SSL on your server, you can use client certificates in conjunction with access control. The server gathers information from the client certificate and matches it with a user entry in a Lightweight Directory Access Protocol (LDAP) directory. This match ensures that the client has a certificate and an entry in the LDAP directory. It can also ensure that the client certificate matches the one in the LDAP directory. Servers can use client certificates to ensure authenticity when communicating with a client. They can also use the certificate to determine if a user has access to the server. For a server to do this, you must specify that a resource requires a client certificate to access it. When users attempt to access a restricted resource, their client sends the server the client certificate, which the server checks against its list of mappings. If the certificate belongs to a user to whom you have granted access to the resource, the resource is served.
To leverage this function, you must first configure your directory services. The directory services tell the proxy server where to look for user and group data that you want to use to secure access to the proxy.
The following example uses the Sun ONE Directory Server to facilitate this function. This article assumes that you can configure and administer the Sun ONE Directory Server to have access through the firewall.
NOTE
The system administrator should be familiar with installing and configuring a Directory Server. To facilitate the SSL Client Certificate authentication, this configuration is required.
Currently, the proxy server does not support secured directory server access (LDAP over SSL).
To Set Up the Directory Services
This example leverages the Sun ONE Directory Server.
Open a browser and go to http://myproxy.sun.com:81.
Click the Global Settings link in the menu.
In the left panel, click the Configure Directory Service link.
Select the LDAP Directory Server by supplying the appropriate information:
Click Save Changes.
You will be prompted for a user ID and password. Enter the user ID proxyadmin and the password selected during the installation (for example, sun1ProxySvr).
Host Name: myldap.sun.com Port: 389 Use SSL for secure connections?: no Base DN: o=sun.com Bind DN: cn=directory manager Bind Password: sun1ProxySvr
NOTE
This bind DN is used only to initially search for the user name you entered in the administration server authentication dialog box. Once the entry corresponding to this user name is located, the administration server rebinds to the directory server using the retrieved entry. Therefore, if the user name you supplied when you first logged in to the administration server does not have access to the directory server, you will not have any access to the directory server, regardless of the bind DN information provided in this field.
To Set Up Users in the Directory Server
Open a browser and go to http://myproxy.sun.com:81.
Click the Users and Groups link in the menu.
From the left panel, click the New User link.
Supply the appropriate information:
Click Save Changes.
You will be prompted for a user ID and password. Enter the user ID proxyadmin and the password selected during the installation (for example, sun1ProxySvr).
Given Name (First Name): Proxyadmin Surname (Last Name): Administrator Full Name: Proxy Administrator User id: proxyadmin Password: sun1ProxySvr Password (Again): sun1ProxySvr Email Address: proxy@sun.com Add New User to: o=sun.com