IOPLEX

Jespa Technical Documentation

Learn / SPNEGO Silent SSO with Apache Tomcat and a Self-Signed Certificate
Install the HttpSecurityService for Windows Silent SSO with SPNEGO Install the Jespa Example Webapp Diagnosing and Fixing Issues with Kerberos Possible Issues using the HttpSecurityService The HssSetup Console Menu Program How Silent SSO with SPNEGO Over HTTP Works Manually Create the Computer Account for the HttpSecurityService Upgrading a Pre-Jespa 2.1 Installation for Windows Silent SSO with SPNEGO Increasing Request Header Size for Users in Many Groups

SPNEGO Silent SSO with Apache Tomcat and a Self-Signed Certificate

This document describes how to create a minimal test site using Apache Tomcat and a self-signed certificate that satisifies the requirements of the Jespa HttpSecurityService (HSS). Commands are formatted for Windows but should work equally well on Linux or macOS.

Requirements

The website must use a DNS resolvable hostname. If a non-DNS hostname (like localhost or an IP address) is used in the URL of the address bar, the client will not initiate Kerberos. Although Silent SSO will still occur by falling back to NTLM.

A Java application server with a valid TLS/SSL certificate is required. The HssSetup program will greatly simplify installation of the HSS if it can query the certificate of the active site. Ideally the site should have a certificate from a trusted certificate authority (such as your local AD Certificate Authority).

However, the HSS will also work with a self-signed certificate (after the user accepts it through the browser invalid certificate authority warning dialog).

Make up a simple name of no more than 15 ASCII alphanumeric characters (although hyphen and underscore are permitted). In this example we use the name jespa15. This name will be used for:

Generating a Self-Signed Certificate with keytool

Consider the following keytool command which generates a self-signed RSA key pair rolled into a Java keystore:

..omcat\conf>keytool -genkeypair -storetype PKCS12 -keystore jespa15.p12 -storepass jespa15 -alias jespa15 -keyalg RSA -dname "CN=hrt.sebank.corp" -keysize 2048 -sigalg SHA256withRSA -validity 3650 -ext "san=dns:hrt.sebank.corp,dns:xapi.sebank.corp,ip:10.20.30.40"
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 3,650 days
    for: CN=hrt.sebank.corp
A keytool command for creating a .p12 keystore with a self-signed certificate

Enter jespa15 as the keystore password.

This particular command simplifies a few things:

The -ext san=dns:.. argument adds SubjectAltName (SAN) entries to the Certificate. There must be dns:<dnshostname> entries for each hostname in any URL used with the server.

Note: While SAN entries are frequently excluded from self-signed certificates and are not required, for various reasons, they should be included.

Modifying the Tomcat conf\server.xml

Open conf\server.xml with a text editor and uncomment / create the Connector section:

<Connector
    port="8443"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    SSLEnabled="true">
    <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
    <SSLHostConfig>
        <Certificate certificateKeystoreFile="conf/jespa15.p12"
                     certificateKeystorePassword="jespa15" type="RSA"/>
    </SSLHostConfig>
</Connector>
Uncommented and modified Connector section in the Tomact conf\server.xml

Change the certificateKeystoreFile and certificateKeystorePassword attributes to reference the keystore file and password.

Restart Tomcat and visit the site to confirm that HTTPS is working.

Download and Install Jespa

Go to https://www.ioplex.com, download the latest Jespa package and unzip it (directly into %CATALINA_BASE% in this example):

..omcat>tar -xf jespa-2.1.0.zip
Unzipping the Jespa package with the Windows tar command (Windows 10 or later)

Or just $ unzip jespa-2.1.0.zip for Linux or macOS.

Run HssSetup to create the Computer account and HSS properties file (directly into %CATALINA_BASE%\conf in this example):

..omcat>jespa-2.1.0\bin\HssSetup.bat conf\jespa15.prp
HttpSecurityService Setup / Jespa 2.1.0
...
Running HssSetup to create the HSS properties file and Computer account

Now either Install the Jespa Example Webapp or follow the more general installation as described in Install the HttpSecurityService for Windows Silent SSO with SPNEGO.