Skip to main content

SSO Integration


As an enterpise practice, it's common to apply Single sign-on (SSO) across all applications, so that user credential can be managed in a centralised and secure manner.

Based on the fact that Streampark use Apache Shiro for authetication and authorization purpose, and we are going to use Pac4j framework to achive the Single Sign-On (SSO) support feature. Pac4j is recommented by Shiro community as SSO integration solution, and it's also applied by other Apache project, like Knox, Durid, Zeppelin, etc.

SSO login workflow

We come up three main use cases with the workflow shown below:

a) New user login when SSO is enabled

b) Existing user login when SSO is enabled

c) User login when when SSO is not enabled

How to enable SSO login

  • Enable the SSO from the application.yml:
active: mysql #[h2,pgsql,mysql]
include: sso
# If turn to true, please provide the sso properties the application-sso.yml
enable: true
  • Select preferred 3rd party login approch, such as Github or Google auth, refer to the pac4j configuration guide for more parameter setting details, and fill in the application-sso.yml config as below:
callbackUrl: http://localhost:10000/callback
# Put all parameters under `properties`
# Check supported sso config parameters for different authentication clients from the below link
# principalNameAttribute:
# Optional, change by authentication client
# Please replace and fill in your client config below when enabled SSO
principalNameAttribute: email
type: google
id: xxx
secret: xxx
useNonce: true
# github:
# id: xxx
# secret: xxx
  • Start the Streampark, and see whether it will redirect to external login page correctly and comple the authentication process:


  • After new users loggining via SSO, their account will be added into streampark automatically at the backend. But admin still need to add the user under proper group manually, otherwise new user still cannot direct to the landing page after successful login.

  • Currently we only support OAuth and OpenID Connect (OIDC) as normal supported login approch, if you need to support Saml, or CAS, please go to the streampark-console/streampark-console-service/pom.xml, change to include them in the below dependency:

        <!-- Include pac4j-config/core/oauth/oidc-->
<!-- cas & opensaml is not supported-->