Single Sign On(3.1)

Usage Engine can act as a Relaying Party in the OpenID Connect 1.0 flow.

Once you connect with an ID provider and start the desktop launcher, you will see the Log in with SSO option.

Login with SSO option

Usage Engine supports SSO using an OpenID Connect (OIDC) compliant Identity Provider. Microsoft Active Directory can be configured to act as such an Identity Provider. If this for some reason is not applicable, it is also possible to add an OIDC Proxy in front of the Active Directory to enable the OIDC protocol.

Usage Engine can act as a Relaying Party in the OIDC 1.0 flow. Refer for more details:

The conceptual diagram below describe the details of the OIDC SSO authentication flow towards Active Directory.

OIDC SSO Authentication Diagram

Azure as Identity Provider

When Azure is used as an ID provider, ensure to set the property to Azure to be able to fetch the groups. The reason for this is that Azure is sending a list of group ids, but Usage Engine  needs the Access group name. When ID Provider is Azure it uses the group id to fetch the group name from Azure Graph API endpoint, currently using v1.


To turn on the feature a number of properties are added to the values.yaml file. The properties of the file are described below.

      # Activate/deactivate Usage Engine Private Edition as OIDC Relay Party
      enabled: false
        # Available auth methods is CLIENT_SECRET_BASIC and PRIVATE_KEY_JWT
        method: "CLIENT_SECRET_BASIC"
          # Client id
          id: ""
          # Client secret is only used when the method is CLIENT_SECRET_BASIC
          # Uncomment if credentials are not already provided through secret "oidc-rp-secret"
          #secret: ""
        # JWT section only used when method is PRIVATE_KEY_JWT
          #Opional ID Provider KeyId
              #Name of secret to store jks
            #Key Alias

            #Key password
            # Uncomment if credentials are not already provided through secret "oidc-rp-secret"

            #Keystore password
            # Uncomment if credentials are not already provided through secret "oidc-rp-secret"

        # Base URL for Identity Provider
        # URL before /.well-known/openid-configuration
        # Eg.<tenant_ID>/v2.0
        # Name of Provider, eg. Azure
        name: ""
      # Path in UserInfo or ID Token to find access groups mapping, separated by dot (.)
      # The groups should be a array of Strings.
      # *** Example ***
      # Here is the groups array inside a object.
      # { myObject : { myGroups : [ "myGroup1", "mygroup2" ] } }
      # The path should then be:
      # groupPath: myObject.myGroups
      # When the groups array is direct under UserInfo then groupPath is just the 
      # name of the groups array.

      # Claim to use for Username

      # Additional scopes

Kubernetes Secret

Credentials can be written into a Secret object named env-secrets prior to installation.

Example - Secret object

$ kubectl create secret generic oidc-rp-secrets -n <namespace> \ 
--from-literal=keystorePassword="<password>" \
--from-literal=keyPassword="<password>" \

Helm Values

Credentials can also be provided through values to Helm, by providing them in values.yaml or by passing them on the command line.

Example - Helm credentials

$ helm install <release_name> ./usage-engine-private-edition --wait --timeout=5m --namespace <namespace> \
--set auth.oidc.rp.auth.jwt.jks.storePassword="<password>" \
--set auth.oidc.rp.auth.jwt.jks.password="<password>" \
--set auth.oidc.rp.auth.client.secret="<secret>"  

Private Key Authentication

When method: "PRIVATE_KEY_JWT" is used the section jwt needs to be defined.

In addition to the values in the helm values file, a Java Keystore in JKS format also needs to be created and put into a Kubernetes Secret. The name of the keystore needs to be ssokeystore.jks. The key algorithm needs to be RSA or EC. The signing algorithm of the JWT used to authenticate to the Token Endpoint will be RS256 for RSA keys and ES256 for EC keys.

The script below shows how these can be generated and stored in the Secret. Note that this will generate a self-signed certificate, which is not suitable for use in publicly exposed interfaces. Make sure to set the parameters in the beginning of the script before using. This script produces the ssokeystore.jks and create a secret of it. It also produces the file publicCert.pem, this file should be uploaded to the ID provider in advance.

Example - How to generate a self-signed certificate
rm -f ssokeystore.jks publicCert.pem
keytool -genkey -keystore ssokeystore.jks -storepass $STORE_PASSWORD -keypass $KEY_PASSWORD -alias certificate -keyalg RSA -keysize 2048 -dname $DNAME 
keytool -keystore ssokeystore.jks -exportcert -alias certificate -rfc -file publicCert.pem -deststorepass $STORE_PASSWORD
kubectl create secret generic oidc-cert --namespace $K8S_NAMESPACE --from-file=ssokeystore.jks