Internet Security, Certificates, SSL

From Opentaps Wiki
Revision as of 16:55, 25 March 2010 by Claudefeistel2 (talk | contribs) (Installing A Self Signed Certificate for the Default Linux Installation)
Jump to navigationJump to search



Introduction to Preparing Your Operational Environment

Before you configure your opentaps system with any of your business data, or your company's confidential information, or your company employee's data, it will be prudent to consider the security of your opentaps system servers and the related internet network security. Best practices with respect to this topic suggest the following partial list of salient points:

  • Your server should be protected by a properly configured firewall to allow only the required forms of network access, as defined by your management and their technical system administrative staff.
  • Any internet access to the opentaps server should probably be limited to SSL (secure socket layer) internet transmission layer security, as determined by your management and their technical system administrative staff. Consider both the public internet and any in-house local internets in this topic.
  • You should secure all of the opentaps IDs that are active on the system, using a strong and unique password having properly limited distribution to users with a business need for them, and you should disable all other IDs on opentaps.
  • You should make sure that your technical system administrator has secured all of the opentaps host server software components and related ports of every kind, so that no unintended routes of access are possible on your system.
  • You should make sure that your opentaps server has physical security that is practiced 100% of the time, and that is robust enough to meet your management's requirements.
  • Before you put any of your opentaps system functions into a production mode of operation, you should develop, test, and deploy your methods for system data backup and for system data restoration. You should actually practice the system data restoration periodically to make sure that it actually does work.
  • Consider whether you will need a server for testing data restoration, migration, or new software component releases that is separate from the production servers that you use. (Usually, production servers are off limits for testing purposes.)
  • Included in this preparation, you should include a determination of when backup will be collected, by whom, and where it will be stored so that if your operational facility is breached or destroyed there will still be a copy of your system backup data available, somewhere else.
  • Make your own list adding all items to this topic which your company deems essential to your own best practices, and complete working your list. When making your own complete list, you may wish to consider what you would do if the internet access suffers an outage, either on the public internet or on your own local internets, or if the physical opentaps server computer suffers an outage.

If you do not need to attach your server to the internets while you are doing preliminary configuration, and preparing your environment then you may be able to phase some of the steps to make progress while other steps are still being completed.

Using SSL for opentaps Internet Security

opentaps can be configured to permit access only by the secure internet protocols, thus reducing the opportunity for unauthorized access to your system. This means having your users log-in and use your opentaps system via the secure internet https protocol (rather than non-encrypted http), and using the SSL-enabled ports (default on opentaps is port 8443) rather than the non-encrypted ports such as 80 or 8080.

Then there is the question of what to do about the SSL Certificate. The certificate is simply your internet identification "papers", including an encryption key that is uniquely yours, and these items are kept in a unique secure, encrypted file which acts as a lock box. This certificate (identity document) can be one that you have created and signed yourself, or it can be one that you initiate and submit to a public "certificate authority" recognized by the industry at large. Such a certificate authority will validate your identity first, then sign your certificate and return it to you for installation on your server(s). Thus, a chain of trust is created that your end-users or the customers of your eCommerce operations can rely upon.

Caution and Warning about Security and Access

When opentaps is downloaded in the release package and installed it contains a certificate for one of the organizations which produce the opentaps system releases. So that certificate is not yours, and it is not unique since many people will download the release code and install it with that common certificate. While you could operate with this default certificate for non-critical testing (using no private information of any kind) you must install your own unique certificate for secure use of the opentaps system. Also, the opentaps system, when it is initially installed, has several user identities enabled with trivial passwords that everyone knows about. You should disable or change passwords on all the existing IDs.

Introduction to Using SSL Certificates and Use Cases

The kind of Certificate you need depends upon how your opentaps system will be used, and by whom. Web browser software on the end user's computer will react differently to a self signed certificate which carries your unverified identity and your encryption key, as compared to a Certificate Authority signed certificate which has verified your identity, and also carries your encryption key. This verification of your identity is the significant item of difference.

You have the choice of using either a do-it-yourself, self-signed certificate or of purchasing a Certificate Authority verified and signed SSL certificate. The end user's web browser (such as Firefox or Internet Explorer) comes equiped with its on list of Certificate Authorities and will usually accept your certificate signed by one of them, without raising any warning messages to the user.

  • Typically, a self-signed certificate will be used when your users of opentaps are internal to your organization and operate mostly on the same internal network. They will have been trained in how to manage the web browser warning and permission messages that are produced when self-signed certificates are being used. (Refer to your web browser documentation for guidance on handling such messages.)
  • A certificate purchased from a Certificate Authority, such as GeoTrust, GoDaddy, VeriSign and others would be required for communications with users who are unable or unwilling to work with an unverified company identity that is using a self-signed certificate. Their issue with self-signed certificates is that the user cannot tell whether or not your internet site is legitimate unless they have personal knowledge of your company.
  • Thus, if opentaps will be used for eCommerce with a secure checkout procedure, a Certificate Authority issued certificate is likely the best option. This will give the user the required confidence in your legitimacy and also an error-free/warning-free user experience.

In opentaps configuration, whether using a self-signed or Certificate Authority signed and issued certificate, the same certificate is used for securely connecting to all parts of the opentaps system. Whether you are working in the various modules of the system, or your customers are shopping on your opentaps eCommerce site, the single certificate is controlling access and security for your user networks.

Configuring Your opentaps Server with an SSL Certificate

There are several possible operational configurations for the opentaps server software, and the one you choose to implement will determine how the secure socket layer (SSL) Certificate will need to be installed.

We will begin by describing how to install your unique Certificate for opentaps simplest installation, which involves using the imbedded web server supplied in opentaps' pre-compiled, downloadable form for Linux.

Then, we will discuss some tips about how to handle the Certificates obtained in various formats from the authorities who sell "signed" and verified certificates. Finally, we will consider other possible opentaps installations and related Certificate issues.

Installing A Self Signed Certificate for the Default Linux Installation

To Use a Self-Signed Certificate You can create your own self signed SSL Certificate and install it for use with opentaps. To do so, you will use the keytool command provided in Linux.

The following five steps are described in detail below:

  • Create a Self-Signed Certificate
  • Modify opentaps
  • Restart opentaps
  • Testing Your Certificate

Create a Self-Signed Certificate

Note: In the following list of questions from the keytool command, the requested "first and last name"
should be the name of your server, not your own name.  
*  For example, if you access your server as  
      http://localhost, or as
   then the answer is localhost.
*  If you use, then put as the
   answer to "first and last name"

Run the following command and answer the questions presented as appropriate for your own company. You are asked for two passwords, the first one is for the keystore (lockbox) that contains your finished certificate, the second one is for the encryption key. You can use the same password for both of these (recommended for simplicity). This keytool command produces a new "opentaps.jks" file which is the keystore with encryption key required for your installation.

Change directory to the opentaps installation directory, so that your opentaps.jks 
will be stored in the correct place on the file system,
$ CD /. . ./opentaps_home
$ keytool -genkey -alias opentaps -keyalg RSA -keystore framework/base/config/opentaps.jks
Enter keystore password:  opentaps
What is your first and last name?
 [Unknown]:  localhost
What is the name of your organizational unit?
 [Unknown]:  Si Chen
What is the name of your organization?
 [Unknown]:  Open Source Strategies, Inc.
What is the name of your City or Locality?
 [Unknown]:  Los Angeles
What is the name of your State or Province?
 [Unknown]:  CA
What is the two-letter country code for this unit?
 [Unknown]:  US
Is CN=localhost, OU=Si Chen, O="Open Source Strategies, Inc.", L=Los Angeles, ST=CA, C=US correct?
 [no]:  yes

Enter key password for <opentaps>

       (Press only RETURN key if same as keystore password):  opentaps

Modify Opentaps File Names as follows

Now you must point opentaps to your new keystore file, opentaps.jks.

Modify the file framework/base/config/ofbiz-containers.xml under <property name="https-connector" value="connector">

From the original installation values which follow:

<property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>

<property name="keystorePass" value="changeit"/>

Enter these new values instead:

<property name="keystoreFile" value="framework/base/config/opentaps.jks"/>

<property name="keystorePass" value="opentaps"/>

Restart Opentaps Server

Stop the opentaps server and then restart it using the commands described in your installation instructions. On the Linux command line and in the opentaps installation directory:

./      then, wait until the stopping process is completed
./     to restart the opentaps server.

Testing your Certificate Installation

Open a connection to your opentaps server using your own URL similar to https://URL:8443. (Do not connect using http://URL:8080 as this is the non-secured connection to the server). You will likely receive a certificate warning message. This is because your browser does not have a client certificate that recognizes your self-signed server certificate. If required by your browser, approve the exception and connect to your server. Regardless of the warning, your connection should be a secure SSL connection and your web browser should display its small "lock" symbol indicating this fact.

To install a client certificate that will recognize your server certificate, visit the documentation provided by your web browser for instructions on this operation.

Note: To facilitate future configuration for your company server, you can put the keystore or 
JKS file (opentaps.jks in this exercise) in the hot-deploy/ component for your own company, 
instead of framework/base/config/ folder.

Installing A Purchased CA-Signed Certificate for the Default Linux Installation

Issues with Certificates and File Formats -- Tips

Installing the Certificate for a Combined httpd (Apache) and Tomcat Installation