Home > Articles > Operating Systems, Server > Solaris

  • Print
  • + Share This
Like this article? We recommend

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 2FIGURE 2 Secure Reverse Proxy

To Set Up a Secure Reverse Proxy Server Instance

  1. Open a browser and go to http://myproxy.sun.com:81.

  2. 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).

  3. Click the Create New iPlanet Web Proxy Server 3.6 link. The web proxy server starts the installation wizard. Do the following:

    1. Create a new Proxy instance:

    2. 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.

    3. Click OK.

    4. The wizard creates the new proxy instance.

    5. Click Return to server selector.

  4. Generate your server's key pair (public and private keys).

  5. To generate a key-pair file, you need to run the key-pair file generator program from the command line.

    1. Log in as the proxy user.

    2. Run the key-pair file generation program by typing $PROXY_HOME/bin/admin/admin/bin/sec-key.

    3. When prompted, type an alias for the new key-pair file.

    4. 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.

    5. A screen with a progress meter appears. Type random keys at different speeds until the progress meter is full.

    6. The time between each of your keystrokes is used to generate a random number for the unique key-pair file.

    7. When prompted, type a password of eight characters or more for your key-pair file.

    8. 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 alias—this 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.

  6. Request a certificate from a certificate authority (CA).

    1. Click the Keys & Certificates button from the Administration Interface.

    2. Click Request Certificate from the left menu options.

    3. Supply the appropriate information:

    4. 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.

    5. Click OK.

    6. 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----- 
    7. Submit the generated certificate request to your CA.

    8. Remember that this capability can be provided internally by your organization, or this request can be fulfilled by organizations such as Verisign or Thawte.

  7. Install the certificate the CA sends to you.

    1. Click the Keys & Certificates button in the Administration Interface.

    2. Click Install Certificate from the left menu options.

    3. Supply the appropriate information:

    4. 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)
    5. Click OK.

  8. Install the Trusted CA's certificate.

    1. Click the Keys & Certificates button in the Administration Interface.

    2. Click Install Certificate from the left menu options.

    3. Supply the appropriate information:

    4. 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)
    5. Click OK.

  9. Activate SSL for your server.

  10. 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.

    1. Click the secure proxy instance that was created.

    2. Click Encryption On/Off in the menu.

    3. Supply the appropriate information:

    4. Certificate for: This server
      Select: Message Text (with headers):
      <PASTE THE CERTIFICATE>
      Select: alias from the drop-down list (that is, myproxy)
    5. Click OK.

    6. Click Save and Apply.

    7. 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.

    8. Select On/Off from the menu.

    9. Click On to start your secure reverse proxy.

    10. When prompted, enter your key-pair password., that is, sun1ProxySvr.

To Set Up URL Mappings

  1. Select the URLs button in the server menu.

  2. Remove the default Client autoconfig mappings:

    1. Click Remove in the Administration Interface.

    2. The proxy will request verification that you want to remove that entry.

    3. Click OK.

    4. Click Save and Apply.

    5. 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.

  3. Create Regular URL mappings.

  4. 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.

    1. Click Create Mappings in the Administration Interface.

    2. Select Regular for Mapping type.

    3. Enter the following for Map Source Prefix:

    4. https://myproxy.sun.com
    5. Enter the following for Map Destination:

    6. http://www.sun.com
    7. Click OK.

    8. Click Save and Apply.

    9. 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.

  5. Verify Reverse Proxy configuration.

  6. 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.

  1. Open a browser and go to http://myproxy.sun.com:81.

  2. 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).

  3. Click the Global Settings link in the menu.

  4. In the left panel, click the Configure Directory Service link.

  5. Select the LDAP Directory Server by supplying the appropriate information:

  6. 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.

  7. Click Save Changes.

To Set Up Users in the Directory Server

  1. Open a browser and go to http://myproxy.sun.com:81.

  2. 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).

  3. Click the Users and Groups link in the menu.

  4. From the left panel, click the New User link.

  5. Supply the appropriate information:

  6. 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
  7. Click Save Changes.

  • + Share This
  • 🔖 Save To Your Account