How to create a self signed server and client certificate using Java keytool, which is included in the Java JDK in the Spotfire server installation.
book
Article ID: KB0083248
calendar_today
Updated On:
Products
Versions
Spotfire Server
7.5, 7.6, 7.7, 7.8
Description
Description: You can create self signed certificates to use for setting up the Spotfire server to use HTTPS and to use it when using the authentication method "X.509 client Certificates Over SSL/TLS)".
While this guide works for both Linux and Windows, it is written for Windows. To make it work on Linux, you need to change the path names to be in the Linux format. Instead of "c:\ssl" it'll be "/tmp/ssl", and you do not need to open a command prompt, you just CD directly to the JDK folder. We are using the paths "C:\ssl\Server" and "C:\ssl\Client" to store the certificates and the certificate stores, but they can be stored anywhere as long as the Spotfire server has access to them.
The guide is split into two parts. Part one will show how to create a server certificate and enable HTTPS on the Spotfire server. It is a requirement to setup the Spotfire server to use HTTPS before enabling Client certificate authentication. Part two will show how to create client certificates and store and how to enable Client certificate authentication.
Part One - Enabling HTTPS on the Spotfire server
Log in to the Windows server where Spotfire server is installed.
Open a command prompt and CD into "<server install dir>\jdk\jre\bin"(default C:\tibco\tss\x.x.x\jdk\jre\bin).
Create the server store and certificate by running this command:
Change serverkey to what ever alias you'd like you certificate to have.
Note to only use lowercase in the alias. Due to an error in Tomcat <v7.0.62 you cannot use uppercase or a mix of lower and uppercase in the alias.
Change the FQDN to the fully qualified domain name of the Windows server, e.g. "CN=myserver.domain.local".
Change KEYPASSWORDto a desired keypassword (keypass is used to access the particular key pair's private key).
Change STOREPASSWORDto a desired store password (storepass is used to access the key store).
Important!If STOREPASSWORDand KEYPASSWORDare not the same, then you need to add "keyPass=KEYPASSWORD" to the server.xml configuration.
Change c:\ssl\server\server.jks tothe path where you would like to save your certificate store.
Open the file "<server install dir>\tomcat\conf\server.xml" in a text editor and locate the section containing the configuration template for an HTTPS connector.
If you do not want the Spotfire server to listen on HTTP, then comment out the lines below by adding <!-- in front of the first line and --> after the last line:
Change truststoreFileto match what path you entered in step 2.
Change truststorePassto match the STOREPASSWORDentered in step 2.
Set clientAuthto true.
Save the file.
Copy the resulting .p12 file to your client and import it into your browser by double clicking on it.
Change the configuration of the Spotfire server and set the authentication method to "X.509 client Certificates Over SSL/TLS)". You can do this in two ways, either via the configuration GUI or via the command line.
To change the authentication method using the configuration tool GUI.
Run the file "<server install dir>\tomcat\bin\uiconfig.bat"(default C:\tibco\tss\x.x.x\tomcat\bin\uiconfig.bat).
Go to the "Configuration" tab and click on "Configuration Start" in the menu.
Set "Authentication" to "X.509 client Certificates Over SSL/TLS)".
Save the configuration the database.
Restart the Spotfire server.
You can now log into Spotfire using the certificate.
To change the authentication method using the command line.
Open a command prompt and CD into "<server install dir>\tomcat\bin"(default C:\tibco\tss\x.x.x\tomcat\bin).
Export the current configuration from the database by running this command:
config.bat export-config --force
Set the configuration method by running the following command.
config.bat config-auth -a CLIENT_CERT
Import the configuration to the database by running the following command.
config.bat import-config -c "Some comment"
Restart the Spotfire server.
You can now log into Spotfire using the certificate.
Issue/Introduction
How to create a self signed server and client certificate using Java keytool, which is included in the Java JDK in the Spotfire server installation.