Question
Is it possible to set up Single Sign On when Digital Hive is on Linux?
Answer
Yes, it is possible using OAUTH2, OpenID Connect (OIDC), and OKTA with Azure.
- First you will need to create a Digital hive Azure App Registration, you can refer to the following Knowledge Base for assistance: Create a Digital Hive Azure App Registration. Ensure the Redirect URI is populated, the value for this parameter should be https://digitalhive_servername:9443/Theia/oauth/authFinish (example).
Browse to <digitalhive install director>/app/node1/tomcat/conf/theia.properties and edit the file.
OAuth2
- Append the following -Dspring.profiles.active=oauth_auth to the end of motio.theia.tomcat.jvm.opts=
The line should read motio.theia.tomcat.jvm.opts=-Xms4096m -Xmx4096m -Djava.util.concurrent.ForkJoinPool.common.threadFactory=com.motio.theia.TheiaForkJoinWorkerThreadFactory -Dorg.jboss.logging.provider=slf4j -Dspring.profiles.active=oauth_auth
- At the end of the file add the following two properties:
spring.security.oauth2.client.registration.azure.client-id= <client id from azure>
spring.security.oauth2.client.registration.azure.client-secret=<secret from azure>
azure.activedirectory.tenant-id=<azure tenant id>
OIDC
- Append the following -Dspring.profiles.active=oidc_auth to the end of motio.theia.tomcat.jvm.opts=
The line should read motio.theia.tomcat.jvm.opts=-Xms4096m -Xmx4096m -Djava.util.concurrent.ForkJoinPool.common.threadFactory=com.motio.theia.TheiaForkJoinWorkerThreadFactory -Dorg.jboss.logging.provider=slf4j -Dspring.profiles.active=oidc_auth
- Modify the following properties at the end of the file:
spring.security.oidc.client.registration.provider=azure
spring.security.oidc.client.registration.azure.client-id=<client id>
spring.security.oidc.client.registration.azure.client-secret=<secret from azure>
spring.security.oidc.client.registration.azure.redirect-uri-template=https://<servername>:9443/theia/login/oauth2/code/azure
azure.activedirectory.tenant-id=<azure tenant id>
OKTA
- Ensure the Redirect URI is added in the Applications in OKTA
- Append the following -Dspring.profiles.active=oidc_auth to the end of motio.theia.tomcat.jvm.opts=
The line should read motio.theia.tomcat.jvm.opts=-Xms4096m -Xmx4096m -Djava.util.concurrent.ForkJoinPool.common.threadFactory=com.motio.theia.TheiaForkJoinWorkerThreadFactory -Dorg.jboss.logging.provider=slf4j -Dspring.profiles.active=oidc_auth
- Modify the following properties at the end of the file:
spring.security.oidc.client.registration.provider=okta
spring.security.oidc.client.registration.okta.client-id=<client id>
spring.security.oidc.client.registration.okta.client-secret=<secret from okta>
spring.security.oidc.client.registration.okta.redirect-uri-template=https://<servername>:9443/theia/login/oauth2/code/okta
spring.security.oidc.client.registration.okta.issuerUri=https://<okta issuer>.okta.com
Restart Digital Hive services using ./stopAll.sh and ./startAll.sh at the root of Digital Hive directory.
Access Digital Hive and it should automatically redirect to logon using Single Sign On.