Configuring Single Sign-On for WSO2 SP
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Configuring Single Sign-On for WSO2 SP

 

SSO (Single Sign-On) allows you to be authenticated to access one application, and gain access to multiple other applications without having to repeatedly provide your credentials for authentication purposes. This section explains how you can configure single sign-on for the WSO2 Dashboard Portal, Status Dashboard and the Business Rules Manager.

Before you begin:

Configure the external identity provider (IdP) that you are using for SSO. By default, WSO2 SP uses WSO2 IS (versions 5.4.0 and later) as the Identity Provider. For detailed instructions to configure WSO2 IS for this scenario, see OAuth2 Token Validation and Introspection.

If you want to use any other identity provider, make sure that it supports OAuth 2 Dynamic Client Registration, and do the required configurations (which differ based on the IdP).

Enabling SSO

To configure SSO for the WSO2 SP, open the <SP_HOME>/conf/dashboard/deployment.yaml file and update it as follows:

  1. In the auth.configs section, start creating a new entry with a new client type. You need an external IdP client for SSO. Therefore, enter external as the type.

    auth.configs:
    type: external

  2. To enable SSO, set the ssoEnabled property as shown below.

    auth.configs:
    type: external
    ssoEnabled: true

  3. Create the WSO2_OAUTH_APP_DB database and add the datasource.
    Add the following configuration in the <SP_HOME>/conf/dashboard/deployment.yaml file.

    wso2.datasources: dataSources: - name: WSO2_OAUTH_APP_DB description: The datasource used to store the details, client name, client ID and client secret. name: jdbc/WSO2_OAUTH_APP_DB definition: type: RDBMS configuration: jdbcUrl: jdbc:mysql://<hostname>:<port>/<database_name> username: <username> password: <password> driverClassName: com.mysql.jdbc.Driver minIdle: 5 maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false

  4. In order to allow SSO to function in your SP setup, you need to set the following properties under the ssoEnabled property.

    auth.configs:
    type: external
    ssoEnabled: true
    properties:
     kmDcrUrl: https://localhost:9443/identity/connect/register
     kmTokenUrl: https://localhost:9443/oauth2
     kmUsername: admin
     kmPassword: admin
     idpBaseUrl: https://localhost:9443/scim2
     idpUsername: admin
     idpPassword: admin
     portalAppContext: portal
     statusDashboardAppContext: monitoring
     businessRulesAppContext : business-rules
     databaseName: WSO2_OAUTH_APP_DB
     cacheTimeout: 900
     baseUrl: https://localhost:9643
     grantType: authorization_code

    The purposes of these properties are explained in the table below.

    Property

    Default Value

    Description

    Property

    Default Value

    Description

    kmDcrUrl

    https://localhost:9443/identity/connect/register

    The Dynamic Client Registration (DCR) endpoint of the key manager in the IdP.

    kmTokenUrl

    https://localhost:9443/oauth2

    The token endpoint of the key manager in the IdP.

    kmUsername

    admin

    The username for the key manager in the IdP.

    kmPassword

    admin

    The password for the key manager in the IdP.

    idpBaseUrl

    https://localhost:9443/scim2

    The SCIM2 endpoint of the IdP.

    idpUsername

    admin

    The username for the IdP.

    idpPassword

    admin

    The password for the IdP.

    portalAppContext

    portal

    The application context of the Dashboard Portal application in WSO2 SP.

    statusDashboardAppContext

    monitoring

    The application context of the Status Dashboard application in WSO2 SP.

    businessRulesAppContext

    business-rules

    The application context of the Business Rules application in WSO2 SP.

    databaseName

    WSO2_OAUTH_APP_DB

    The application context of the Business Rules application in WSO2 SP.

    cacheTimeout

    900

    The cache timeout for the validity period of the token in seconds.

    baseUrl

    https://localhost:9643

    The base URL to which the token should be redirected after the code returned

    from the Authorization Code grant type is used to get the token.

    grantType

    authorization_code

    The grant type used in the OAuth application token request.

    externalLogoutUrl

    https://localhost:9443/samlsso

    The URL via which you can llog out from the external IDP provider side in the SSO.

  5. Save your changes.

Testing the SSO configuration

Once the above changes are made, you can start the dashboard server of WSO2 SP and access all the UIs in it with a single sign-on. To try this out, follow the steps below:

  1. Start the dashbaord server by issuing one of the following commands:

    • On Windows:  dashboard.bat --run

    • On Linux/Mac OS:  sh dashboard.sh

  2. Access the Dashboard Portal via the following URL. 

    https://localhost:9643/portal

  3. In the dialog box that appears to sign in, enter admin as both the user name and the password, and then click LOG IN.

  4. Now access the Business Rules Manager via the following URL.
    https://localhost:9643/business-rules

    No dialog box appears for the Business Rules Manager. This because you provided your credentials to access the Dashboard Portal, and the activation of SSO makes that sign-in valid for all the UIs accessible via the dashboard profile.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.