This guide walks through installing the Analytics (xDI) SSO bridge on Tomcat 11, from an already-running Analytics instance to a working SSO login screen. It covers the Tomcat-side installation only: your Identity Provider (IdP) — SAML 2.0 or OpenID Connect (OIDC) — is assumed to be already configured, with its client/application for Analytics ready to register.

Applies to: Analytics (xDI) 2026.1.x on Apache Tomcat 11.0.x / Java 21.

1. Tomcat version compatibility

The SSO bridge is made of two parts: a common bridge package (same for every Tomcat 11.0.x) and a valve jar built for one specific Tomcat version. The valve relies on Tomcat's internal authenticator API, which changes between point releases — a valve built for one version can fail at runtime on another.

Tomcat version

Valve jar

Status

11.0.23

com.semarchy.tool.jee.tomcat-11.0.23.jar

Validated

11.0.27

com.semarchy.tool.jee.tomcat-11.0.27.jar

Validated

Any other 11.0.x version

—

Not validated — contact Semarchy support

⚠️ A valve/Tomcat version mismatch (or two valve jars present at once) causes a NoSuchMethodError right after login. Keep only one valve jar in <TOMCAT>/lib/, matching your exact Tomcat version. If you are on an unlisted version, contact Semarchy support before proceeding.

2. Prerequisite: confirm Analytics works without SSO

Before touching anything SSO-related, log in once with a local account (<TOMCAT>/conf/tomcat-users.xml). This confirms Analytics itself is healthy, so any problem you hit afterwards comes from the SSO layer only.

Once the valve is installed, tomcat-users.xml is no longer used for login — this is your last chance to test without SSO.

3. Install the jars

Two sets of jars are required. Both are provided by Semarchy — contact support if you don't already have them, specifying your exact Tomcat version.

  1. Stop Tomcat.
  2. Runtime jars: copy all 47 jars from the bridge package's jars/folder into:
    <TOMCAT>/lib/
    Copy all of them even if you only use one protocol (SAML or OIDC) — they are shared dependencies.
  3. Valve jar:copy the single valve jar matching your Tomcat version (section 1) into the same folder:
    <TOMCAT>/lib/

Double-check only one valve jar is present before restarting Tomcat later.

4. Certificates (SAML only)

OIDC uses a Client ID and Client Secret from your IdP — no certificates involved, skip to section 5. SAML uses two certificates, each with a distinct role. Do not swap them:

Certificate

Owner

Goes to

semarchy-sp.pem

Analytics (Service Provider)

The IdP client configuration only

idp-signing.pem

IdP

trustManager in fediz_config.xml only

Why they're needed. Most IdPs require the Service Provider (Analytics) to sign its authentication requests (AuthnRequest), to prove the request genuinely comes from Analytics. semarchy-sp.pem is the public certificate the IdP uses to verify that signature. In the other direction, Analytics must verify that the SAML response actually comes from your IdP and was not tampered with — idp-signing.pem (the IdP's own signing certificate) is what Analytics uses to check that.

Step 1 — create the SP signing keystore, on the Tomcat server:

keytool -genkeypair -alias semarchy-sp -keyalg RSA -keysize 2048 -validity 3650 \
  -dname "CN=semarchy-xdi-analytics, OU=Analytics, O=YourOrg, C=XX" \
  -keystore <TOMCAT>/conf/sp-signing.jks -storetype PKCS12 \
  -storepass <password> -keypass <password>

⚠️ Use the same value for -storepass and -keypass — PKCS12 does not support two different passwords.

Export the public certificate, which goes to the IdP:

keytool -exportcert -alias semarchy-sp -rfc \
  -keystore <TOMCAT>/conf/sp-signing.jks -storepass <password> \
  -file <TOMCAT>/conf/semarchy-sp.pem

Import semarchy-sp.pem into your IdP's client configuration, wherever it asks for "client signature" / "signing certificate" for this Service Provider. Never let the IdP generate a new key here — it must be the one you just exported.

Step 2 — get the IdP's signing certificate. From your IdP's SAML metadata or admin console, export its signing certificate (not the encryption one, if it offers both) and save it as <TOMCAT>/conf/idp-signing.pem:

-----BEGIN CERTIFICATE-----
<base64 from the IdP>
-----END CERTIFICATE-----

⚠️ If the IdP regenerates its signing key later, you must re-export and replace this file, or SAML logins will start failing with a signature error.

Keystore type matters. The example above creates sp-signing.jks as PKCS12 (-storetype PKCS12). The type attribute you set in fediz_config.xml (section 5) must match exactly what you used here — PKCS12 or JKS — otherwise Tomcat fails to start the context with a Failed to load keystore error.

5. Configuration files

The bridge package ships a config-templates/ folder with ready-to-edit templates. If you don't have it, ask Semarchy support for the files matching your protocol (SAML or OIDC). Each one below is a template: replace every @PLACEHOLDER@, then place the file where indicated.

5.1 roles-mapping.properties (always required)

Destination: <TOMCAT>/conf/roles-mapping.properties

Maps IdP groups/roles (left) to Analytics permissions (right). analyticsConnect is required just to enter Analytics — a user mapped to no listed group is denied access. Keys are case-sensitive, and unlisted IdP groups are silently ignored.

# Maps IdP group/role values (left) to Analytics roles (right).
# Analytics roles: analyticsConnect (required to enter), analyticsAdmin,
#                  analyticsSessionConsult, etc.
# The key is the value delivered in the SAML roleURI attribute / OIDC groups claim.

admin = analyticsConnect,analyticsAdmin
user  = analyticsConnect,analyticsSessionConsult

Adjust the group names (left) to match the group/role names used in your own IdP, and the permission list (right) to the Analytics roles you want each group to receive.

5.2 logging.snippet.properties (always required)

Destination: append to the existing <TOMCAT>/conf/logging.properties (don't replace the file, just add these lines at the end)

# Append these lines to <TOMCAT>/conf/logging.properties to get SSO diagnostics.
# Requires slf4j-jdk14 on the classpath (included in the ship set) so Fediz/WSS4J/OpenSAML
# messages reach java.util.logging. Without the provider, SAML errors are SILENT.

com.semarchy.tool.jee.tomcat.level = ALL
org.apache.cxf.fediz.level = ALL
org.apache.wss4j.level = ALL
org.opensaml.level = ALL

Without this, SAML/OIDC errors fail silently with no trace in the logs — always add it, even outside of troubleshooting.

5.3 fediz_config.xml (SAML only)

Destination: <TOMCAT>/conf/fediz_config.xml

<?xml version="1.0" encoding="UTF-8"?>
<FedizConfig>
    <contextConfig name="/semarchy-xdi-analytics">

        <audienceUris>
            <audienceItem>@SP_AUDIENCE_URI@</audienceItem>
        </audienceUris>

        <signingKey keyAlias="@SP_KEY_ALIAS@" keyPassword="@SP_KEY_PASSWORD@">
            <keyStore file="@ABS_PATH@/sp-signing.jks" password="@SP_STORE_PASSWORD@" type="@KEYSTORE_TYPE@"/>
        </signingKey>

        <certificateStores>
            <trustManager>
                <keyStore file="@ABS_PATH@/idp-signing.pem" type="PEM"/>
            </trustManager>
        </certificateStores>

        <trustedIssuers>
            <issuer certificateValidation="PeerTrust"/>
        </trustedIssuers>

        <protocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:type="samlProtocolType" version="2.0">
            <realm>@SP_AUDIENCE_URI@</realm>
            <issuer>@IDP_SAML_SSO_URL@</issuer>
            <roleDelimiter>,</roleDelimiter>
            <roleURI>@ROLE_ATTRIBUTE_NAME@</roleURI>
            <disableDeflateEncoding>true</disableDeflateEncoding>
            <doNotEnforceKnownIssuer>true</doNotEnforceKnownIssuer>
            <signRequest>true</signRequest>
        </protocol>
    </contextConfig>
</FedizConfig>

Placeholder

Value

@SP_AUDIENCE_URI@

SP entity ID, exactly as registered at the IdP, e.g. https://<host>/semarchy-xdi-analytics/ (mind the trailing slash)

@SP_KEY_ALIAS@, @SP_KEY_PASSWORD@, @SP_STORE_PASSWORD@

The alias and password you used in section 4, step 1

@KEYSTORE_TYPE@

PKCS12 or JKS — must match the -storetype used when the keystore was created

@ABS_PATH@

Absolute path to <TOMCAT>/conf (forward slashes, even on Windows)

@IDP_SAML_SSO_URL@

Your IdP's SAML SSO endpoint URL

@ROLE_ATTRIBUTE_NAME@

The SAML attribute name carrying groups/roles (e.g. member or Role), as configured at your IdP

⚠️ Use absolute paths with forward slashes for the file attributes — Fediz resolves them against the process working directory, not against <TOMCAT>/conf.

5.4 Context file — activates the valve

Destination (both protocols): rename to semarchy-xdi-analytics.xml and place in <TOMCAT>/conf/Catalina/localhost/semarchy-xdi-analytics.xml

Only one context file can be active at a time. Save it as UTF-8 without BOM — <?xml must be the very first characters, or Tomcat will fail to parse it.

For SAML:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Valve className="com.semarchy.tool.jee.tomcat.FederationAuthenticator"
           configFile="conf/fediz_config.xml"
           roleMappingEnabled="true"
           rolesMappingPathName="conf/roles-mapping.properties"/>
</Context>

No placeholders here — use as-is, as long as fediz_config.xml (5.3) is correctly filled in.

For OIDC:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Valve className="com.semarchy.tool.jee.tomcat.OpenIdConnectAuthenticator"
           providers="[{
                 name: 'IdP',
                 issuer: '@OIDC_ISSUER@',
                 clientId: '@OIDC_CLIENT_ID@',
                 clientSecret: '@OIDC_CLIENT_SECRET@'
           }]"
           usernameClaim="@USERNAME_CLAIM@"
           hostBaseURI="@HOST_BASE_URI@"
           noForm="true"
           groupClaim="@GROUP_CLAIM@"
           roleMappingEnabled="true"
           rolesMappingPathName="conf/roles-mapping.properties"/>
    <Realm className="com.semarchy.tool.jee.tomcat.OpenIdConnectRealm"/>
</Context>

Placeholder

Value

@OIDC_ISSUER@

Your IdP's issuer URL, e.g. https://<idp>/realms/<realm>

@OIDC_CLIENT_ID@, @OIDC_CLIENT_SECRET@

From your IdP's OIDC client credentials (confidential client)

@USERNAME_CLAIM@

ID token claim carrying the username, e.g. email or preferred_username

@HOST_BASE_URI@

https://<host> — scheme, host and port of Analytics

@GROUP_CLAIM@

ID token claim carrying groups/roles, e.g. groups or roles

⚠️ The OIDC valve reads your IdP's discovery document at Tomcat startup. If the IdP is unreachable when Tomcat starts, the context fails to deploy — make sure your IdP is up first.

6. Values that must match across files

Most configuration problems come from a value changed in one place but not another. Double-check these before your first test:

Value

Must be identical in

Analytics base URL, with port

Tomcat connector, hostBaseURI (OIDC) / audienceItem + realm (SAML), and your IdP client's URLs

Context path

Context file name, contextConfig name (SAML), and your IdP client's URLs

IdP issuer

OIDC: .../realms/<realm> — SAML: .../realms/<realm>/protocol/saml (or your IdP's equivalent SSO endpoint)

OIDC client

clientId / clientSecret = exactly what the IdP client shows

Groups claim / attribute

groupClaim (OIDC) or roleURI (SAML) = the exact name configured at the IdP

SAML signature

signRequest="true" = "client signature required" enabled at the IdP + semarchy-sp.pem imported there

SAML keystore

Alias, password and type of sp-signing.jks = what's declared in signingKey

Mapping keys

IdP group/role names = the keys in roles-mapping.properties (case-sensitive)

7. Start and verify

  1. Make sure your IdP is reachable, then start Tomcat.
  2. Check <TOMCAT>/logs/catalina.<date>.log:
    • A line Deployment of configuration descriptor [...semarchy-xdi-analytics.xml] is present.
    • No did not find a matching property warning, no NoClassDefFoundError.
    • A SEVERE line mentioning /res/* is expected and harmless.
  3. Open https://<host>/semarchy-xdi-analytics/ in a new private browser window. You should be redirected to your IdP's login page, then land in Analytics with your username shown in the header.
  4. Check permissions: user menu > Authorizations — admin users should see admin features, others should be restricted according to roles-mapping.properties.

Where to look if something's wrong: login exceptions go to localhost.<date>.log, not catalina.log. After any change in conf/: save, restart Tomcat, and retest in a new private window — a reused session can mask the effect of a change.

If your IdP's HTTPS certificate isn't trusted by the JDK (PKIX path building failed), import it, then restart Tomcat:

keytool -importcert -alias idp -keystore <JDK>/lib/security/cacerts -storepass changeit -file idp.crt

8. Troubleshooting

General

Symptom

Likely cause

Fix

NoSuchMethodError … restoreRequest after login

Valve/Tomcat version mismatch, or two valves present

Keep the matching valve only (section 1)

ClassNotFoundException on the valve

Valve jar missing from lib/

Copy the valve jar (section 3)

Error before redirect, NoClassDefFoundError

Dependency jars missing

Copy all 47 jars (section 3)

No SSO lines in catalina.log

Logging snippet or SLF4J missing

Section 5.2, check slf4j-jdk14-*.jar is in lib/

No redirect to the IdP

Context file (name, BOM) or valve

Check sections 5.4 and 1

A change has no effect

Not saved, no restart, session reused

Save, restart, new private window

PKIX path building failed

IdP HTTPS certificate not trusted

Import it into cacerts (section 7)

Analytics shows "Login Failed" after IdP login

No groups claim in the token

Check groups, mapper, groupClaim/roleURI

"Internal Server Error" (HTTP 403) after IdP login

Group not mapped, or case mismatch

Align mapping keys (section 5.1)

SAML

Symptom

Likely cause

Fix

NoSuchFileException … .pem

Relative certificate path

Use an absolute path

Failed to load keystore

Type or password mismatch

Align type, use one password (section 4)

IdP: "Invalid requester"

SP key unknown, or no signature

Import semarchy-sp.pem at the IdP, signRequest="true"

IdP login OK, then response refused

trustManager = SP certificate (wrong one)

Use idp-signing.pem instead

401 / "security failure"

Certificate, audience or clock skew

Check cert, audience, clocks

User shown as a random string

Name ID format not forced to email

Force email Name ID at the IdP

OIDC

Symptom

Likely cause

Fix

Context fails to deploy, Connection refused

IdP down at Tomcat start

Start the IdP first, then Tomcat

IdP: "Invalid parameter: redirect_uri"

hostBaseURI doesn't match the IdP's registered redirect URIs

Align them (section 6)

ByteChunk overflow after login

Known issue

Contact Semarchy support

9. Known limitations

  • Each valve jar is tied to a specific Tomcat release (section 1) — check compatibility before upgrading Tomcat.
  • Validated against Keycloak; other IdPs (ADFS, PingFederate, Entra, Okta, etc.) may need IdP-specific adjustments to the settings above.
  • This is an interim bridge solution; a native SSO integration is planned for a future Analytics release.

For anything not covered here — an unsupported Tomcat version, an IdP-specific quirk, or an error not listed in section 8 — contact Semarchy support with your Tomcat version, protocol (SAML/OIDC), and the relevant catalina.<date>.log / localhost.<date>.log excerpt.