OpenID Connect authentication

Last modified by jhurst on 2021/04/21 10:01


Installation of an OpenID Connect authentication valve for DigDash



  • The acronyms used later are referenced in the glossary at the end of this document.
  • Having configured the DigDash server with an SSL / TLS (HTTPS) connector (this authentication method requires secure exchanges)
  • Have the <digdash_installation> / add-ons / valve_openidconnect folder containing all the files necessary for setting up the OpenID Connect authentication valve in the DigDash Tomcat server. The placement of these files is described in this document.
    • The apache-tomcat folder: transposed to <digdash_install>/apache-tomcat
      • The lib sub-folder: libraries and log configuration file to be placed in <digdash_install>/apache-tomcat/lib
      • The webapps sub-folder: the DigDash entry point (endpoint) in a .war to place in <digdash_install>/apache-tomcat/webapps
  • The following operations are to be performed on the stopped DigDash server .
  • The user to be authenticated must exist at both the OP and in the LDAP DigDash.
    • It is therefore advisable to have at least one user having the rights to add DigDash users in the LDAP DigDash before installing the OpenID Connect valve, this in order to avoid SSO authentication failures from the first connections for cause of absence of such user in LDAP.

Configuration of the DigDash server

Copy of libraries

Add the libraries and the log configuration file from the apache-tomcat / lib folder to the folder

<digdash_installation> / apache / lib :


Libraries in the apache-tomcat/lib folder

Addition of the OpenID Connect authentication valve

Add the OpenID Connect authentication valve in the server.xml file located in the folder


To do this, add the following Valve element in the Host element .

<Server ... >
     <Host ... >
         <Valve className="org.bsworks.catalina.authenticator.oidc.OpenIDConnectSSOValve"
                allowAddr="localhost, 127.0.0.*,0:0:0:0:0:0:0:1"
                       name: OpenID Provider name,
                       issuer: issuer,
                       clientId: clientId,
                       clientSecret: clientSecret


Extract from the server.xml file

Value for parameter className is invariable.
Values for parameters allowAddr, sharedPasswd, redirect_url, providers, usernameClaim, additionalScopes are variable according to the installation.

className (required)     Name of the Java class, implementing the org.apache.catalina.Valve interface, to use as Valve here. This attribute is mandatory because it allows you to select the Valve to use. There are indeed several implementations provided by Tomcat.
allowAddr (required)     Server IP address.
allowedCtxPath (optional)     Optional, is "/ adminconsole" by default; it is the path of the context whose resources are authorized to pass the valve, useful when the adminconsole is named differently. Example: allowedCtxPath = "/ customadminconsole"
sharedPasswd (required)     The shared password and verified at authentication (see point II.5)
redirect_url (required)     This is the path of the application to which users will be redirected after authenticating with the OP. For DigDash, the URL will always be https: // <IPaddress>: <port> / digdash_oidc_endpoint / oidcendpoint
cookieTimeOut (optional)     

Optional, this is the time (in seconds) after which the SSO cookie will expire. Worth 1800 seconds (30 minutes) by default.
 Otherwise, the cookie will expire after the number of seconds mentioned.

Example: cookieTimeOut = "3600" (1 hour)

print_debug (optional)     Optional, is false by default, otherwise add print_debug = "true" for more verbose traces.
providers (required)     

Array form value of objects in JSON. Each element corresponds to an OpenID Provider used by the application.

The syntax differs from the standard JSON format in that double quotes are not used for the names of properties and their values ​​(so as to make the format more XMLian). A value can be surrounded by single quotes if it contains separators such as a comma, braces, or spaces. Each object representing a PO has the following properties:

issuer (mandatory)  : This is the only one with a unique URL to identify the OP.     

name (optional)  : A name associated with the PO; if not by default.

clientId (mandatory):  The client ID associated with the application at the PO.

clientSecret (optional)  : The Secret client. Note that most POs require a Secret client, especially for calls to PO entry points. However, some OPs support public clients, hence the absence of a Secret client.

usernameClaim (optional):  The user Identifier attribute requested by the RP and returned by the OP to identify the user who authenticates.

additionalScopes (optional)  : Additional scopes with an 'openid' scope separated by spaces.

usernameClaim (optional)     The default User Identifier used by all OPs which do not specify one in the proper properties of the OP.
additionalScopes (optional)     The default additional scopes used by all OPs which do not specify one in the proper properties of the OP.
httpConnectTimeout (optional)     Timeout in milliseconds for establishing the connection to the OP. 5000 ms (5 seconds) by default.
httpReadTimeout (optional)     Timeout in milliseconds for reading data received from the OP. 5000 ms (5 seconds) by default.

Table describing the attributes of the Vavle element

Addition of the .war corresponding to the entry point of the Relying Party

Add the digdash_oidc_endpoint.war archive from the apache-tomcat/webapps folder to the folder


It is the entry point (endpoint) of the RP accessed by the PO.

Addition of security constraints

Add the security constraints to the web.xml file located in the folder

<digdash_installation>/apache-tomcat/conf .

<web-app ... >

         <display-name>CUSTOM Security Constraint</display-name>
             <web-resource-name>Protected Area</web-resource-name>

             <web-resource-name>Non-Protected Area</web-resource-name>

Extract from web.xml file

Server URL and domain for the Dashboard and Web Studio

It may be necessary, and it is advisable to specify on which server / domain the Dashboard will rely.

To do this, modify in the web.xml file in <digdash_installation>/apache-tomcat/webapps/digdash_dashboard /WEB-INF.

Do the same for the web.xml file in <digdash_installation>/apache-tomcat/webapps/studio/WEB-INF

To force the domain, change the value of the FORCEDOMAIN parameter to true .
 Mention the domain name by changing the DOMAIN parameter .

To force the server address, change the value of the  FORCEURLSERVER  parameter to true .  Mention the server address by changing the SERVERURL parameter .

<web-app ... >
             < param-value>true</param-value>
             <param-name>SERVERURL</ param-name>

Extract from web.xml file

Values for parameters DOMAIN, FORCEDOAMIN, SERVERUEL, FORCESERVERURL are variable according to the installation.

  • config_auth_oidc_fr_html_829eaa34e529ef0c.png

The example value for the SERVERURL parameter will almost always refer to localhost, when the dashboard and the server are placed in the same Tomcat server, which represents almost 99% of the uses. It will naturally be necessary to refer to the address of the external server if these two elements are placed on different servers.


This parameter can be edited via the web.xml file as indicated above. This file is specific to each installation of DigDash. You can enter this parameter more generally in the file

<user> / Application Data / Enterprise Server / dashboard_system.xml 

For more information, you can refer to the DigDash documentation “guide_avance_systeme_fr.pdf”.

Changing the value of the sharedPasswd parameter

Change the value of the sharedPasswd parameter (secret value below to change) in the web.xml file of Dashboard in the folders




The value must correspond to that mentioned in the sharedPasswd attribute in the valve of the file

<digdash_installation>/apache-tomcat/conf/server.xml (see part II.2).

<web-app ... >

Extract from the server.xml file

Value for parameter sharedPasswd is variable according to the installation.

Modification of the authentication method

Modify the authentication method (LDAP is the default method) in the web.xml file located in the folder

<digdash_installation>/apache-tomcat/webapps/ddenterpriseapi/WEB-INF .

"External" means that safety is managed by the valve configured above.

<web-app ... >
         <servlet-class> com.digdash.server.DDEnterpriseAuthServlet</servlet-class>

Extract from web.xml file

OpenID Provider configuration

The OP must register DigDash as a RP in its list of RPs for DigDash to be able to take advantage of Single Sign-On.

Also, the OP will have to enter the callback URL to identify the entry point of the DigDash application. The URL will be of the form

https://<IP address>:<port>/digdash_oidc_endpoint/oidcendpoint

Log level

You can customize the log level for the authentication valve.

By default, only errors are logged. If however you want to have more details on the course of actions and exchanges between the different entities, you can assign the value 'DEBUG' instead of 'ERROR' in the file which was imported into the lib folder of Tomcat . = ERROR , stdout = DEBUG , stdout

OpenID Connect authentication on the Enterprise Studio side

To authenticate with OpenID Connect on the Enterprise Studio side, please ensure that you have performed the following actions:

Server and domain definitions in the .jnlp file

You can, like the Dashboard, define the server and the domain on which DigDash will rely.

To do this, modify the end of the digdash.jnlp file in the DigDash installation folder <digdash_installation> / apache-tomcat / webapps / adminconsole

<jnlp ...>
     <application-desc main-class="commandline.CommandLineMain">
         <argument>https://localhost:8443</argument> (1)
         <argument>ddenterpriseapi</argument> (2)
         <argument><%=lang%></argument> (3)
         <argument><%=dashboard%></argument> (4)
         <argument>-AuthMode=External</argument> (5)
         <argument>-SSLNoPathCheck</argument> (A)

Extract from the digdash.jnlp file

Warning : the arguments noted (1), (2), (3), (4), (5) must not change order.

Argument (1): the address of the DigDash server; variable depending on your installation

Argument (2): the name of the DigDash domain; variable depending on your installation

Argument (5): The authentication method; External, mandatory

Argument (A): optional argument, sometimes necessary in the case of SSL, HTTPS connections.

Connection to DigDash Enterprise Studio

Download and run the .jnlp by going to the DigDash home page in the Enterprise Studio section.


An authentication window should appear with the IdP authentication target.

In this document, Google is the OP that we have chosen to illustrate our examples.



Capture: test pattern with Google OP authentication form

The user will have to enter his connection data and if he has been authenticated with the OP and that he corresponds to an existing user in the LDAP DigDash, the authentication will have succeeded and the window will attest to the success of the authentication.



Capture: window of successful authentication

The window will close automatically, then Enterprise Studio will start loading to launch.


We will call in this document:

  • SSO: Single Sign On or Single Authentication; OpenIDConnect is an SSO method
  • OP: OpenID Provider or the Identity Provider
  • PR: the Relying Party or the Service Provider (DigDash)
  • Endpoint: Entry point


DigDash uses the OpenSource tomcat8-oidcauth library from Boyle Software, Inc. to support the OpenID Connect authentication method.