Sidebar On this page

What is SSO?

Single sign-on (SSO) is an authentication process that allows a user to access multiple applications with one set of login credentials.

what_sso

Which Types of SSO We Support?

The user authentication center platform/application is where we store user information like email, staff ID, password and so on. The SSO protocol acts like a bridge that safely and easily guides us to the user authentication center.

SSO-protocol

The Supported SSO Protocols

  • SAML
  • OIDC (OAuth 2.0)
  • Restful (insureMO Standard)

The Supported Platforms and Applications

  • OKTA
  • Microsoft Entra ID
  • ADFS
  • AUTH0
  • Cognito
  • Keycloak
  • GIMO Member
  • Customer User Applications…

Basic UI Operations

Entrance

  • Click Sign in to log in to insureMO Portal with your personal account.

    info

    If you do not have a personal insureMO account, click Sign up to register one.

  • At the top of the home page, click Catalog.

  • On the Catalog page, in the left pane under Utility & AI, click IAM. You will find the SSO Config card. Click it and you will see the API Details and Setting.

sso-card
  • For creation and other actions, you need to click Setting to go to the SSO Config page.
sso-setting
  • This will navigate to the main SSO configuration settings page where you can see the introduction of SSO and manage the service.
sso-page

How to Config SSO

  • Click How to config SSO, you can select the environment and fill in your information in the upper panel and click Generate.
how-config_01
  • You’ll see the SSO configuration method that works for you below.
how-config_02
note

After configuring the IDP side, please provide the App Federation Metadata URL to the insureMO side for configuration.

insureMO tenant admin please go to SSO card-> SSO config to complete the configuration on the Service Provider side.

SSO Configuration

Create

  • Click Create SSO Config on the SSO configuration console.
config-create_01
  • Fill in the basic config information and click Next.
config-create_02
  • In the config details, a config template will be generated for you. Replace the content with your relevant information, and click Submit to complete the creation.
config-create_03
note

Client ID rules (Step 1):

  • Length MUST be less than 20 characters.
  • Must not be one of the reserved names: mo, platform, key, member, limo.
  • Must be unique within the tenant.
  • The value you type here must equal the insuremo_client_id inside the Step 2 JSON, otherwise submission fails.

Config details JSON rules (Step 2):

  • The JSON must have exactly ONE root key equal to the protocol selected in Step 1, for example {"oidc": {...}}.
  • Fill real secrets (client secret, keys) directly in the editor. Never send them to anyone else.

Configuration Field Reference

The config details of Step 2 are a JSON object whose root key is the auth type. The tables below explain the fields of each auth type.

oidc

FieldRequiredDescription
client_idYesApp (client) ID issued by your identity provider application
client_secretYesSecret of that application; fill the real value in the editor only
hostYesBase URL of the identity provider, e.g. https://my-tenant.auth0.com
authorization_api / token_api / userinfo_apiYesStandard OIDC endpoints, usually {host}/authorize, {host}/oauth/token, {host}/userinfo; verify them against the IdP’s /.well-known/openid-configuration
username_paramYesThe claim or profile path that carries the login name, e.g. email, sub, or user_metadata.profile.auth0_user_id
redirect_uriYesLanding domains of your insureMO environments, comma-separated, e.g. https://portal.insuremo.com,https://ptdev.insuremo.com
scopeOptionalDefault openid email profile
sync_user_apiOptionalSync the logged-in user to the platform or an application after SSO login; see the Edit section for the values

saml

FieldRequiredDescription
idp_metadata_urlYes (or paste XML)Federation metadata URL of the identity provider
IdP metadata XMLYes when there is no URLPaste the metadata XML file into the IdP metadata XML editor of the create drawer; SAML creation is blocked when both URL and XML are empty
signature_methodOptionalSignature algorithm; default http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
username_param_nameYesThe SAML claim that carries the login name, e.g. http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress (email claim), the UPN claim, or NameID
name_id_formatOptionalDefault urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
redirect_uriYesLanding domains of your insureMO environments, comma-separated

cognito

FieldRequiredDescription
client_idYesApp client ID of the AWS Cognito user pool
user_pool_idYesUser pool ID, format {region}_{poolId}
regionYesAWS region of the user pool

Optional fields for admin operations exist in the page template; keep them only if you use them.

ldap

FieldRequiredDescription
ldap_serverYesLDAP server address; use the ldaps:// prefix to enable TLS, e.g. ldaps://host:636
ldap_server_backupsOptionalBackup servers, comma-separated; at most 2
ldap_base_dnYesBase DN used to search for users

rest

FieldRequiredDescription
auth_urlYesSign-in API of your user service; the API contract is defined in the SSO Developer Guide below
business_tenant_codeYesBusiness tenant code agreed with insureMO

Optional API fields (notify, check, set_password, unlock) can be configured when your user service provides them.

validate_token

FieldRequiredDescription
jwt_verification_keyYesThe PUBLIC key of the token issuer, in PEM format. Never configure a private key

Security Config and Allowed Landing URLs

After an SSO configuration is created, open Edit → Security Config to manage the sign-in security settings of that client, including the allowed landing URLs.

  • Allowed Landing URLs (domain_white_list): a comma-separated list of domains where users may land after SSO login, e.g. https://my-company.example.com. For SAML and OIDC configurations, if this list is empty, login can still succeed but the browser will not navigate to your page — add your landing domains here after creation.
  • Do not confuse the two URL types:
    • Redirect URI / Reply URL — the technical callback registered on the identity provider side. Use How to config SSO on the page to generate the exact values for your environment.
    • Allowed Landing URLs — where users are allowed to land after login, controlled on the insureMO side.
  • Other Security Config settings include the account lock policy, token expiry time, and the two-factor authentication toggle.

Edit

  • Click Edit next to a particular record to edit the configuration.
config-edit
  • Config the sync_user_api:

after user login via sso, if you want to sync the user to our platform urp or GIMO app urp, you can set the sync user api like this:

  1. Container platform urp :http://urp-v2-service.mo-fo/urpv2/account/sso/sync
  2. GIMO APP urp :http://urp.platform/public/users/v1/sso/sync?role_policy=set_default_role

For Example:

{
"oidc": {
"client_id": "xARRposAjmPEV0TGAbAWvSKzJj0QwVvl",
"client_secret": "5d1-EMH************LAD4p27",
"authorization_api": "https://dev-wxexzn1gvkpz4a1v.us.auth0.com/authorize",
"sync_user_api": "http://urp-v2-service.mo-fo/urpv2/account/sso/sync",
"host": "https://dev-wxexzn1gvkpz4a1v.us.auth0.com/",
"username_param": "user_metadata.profile.auth0_user_id",
"redirect_uri": "https://portal.insuremo.com,https://ptdev.insuremo.com",
"userinfo_api": "https://dev-wxexzn1gvkpz4a1v.us.auth0.com/userinfo",
"token_api": "https://dev-wxexzn1gvkpz4a1v.us.auth0.com/oauth/token",
"scope": "openid email profile",
"insuremo_client_id": "tttdfsa"
}
}

Delete

  • Click Delete next to a particular record to delete the configuration.
config-delete

Test

  • After the SSO configuration is created successfully, you can verify whether the current configuration is available through a test.

  • Click Test next to a particular record to test the configuration.

config-test_01
  • There are different test methods for different auth types:

    1. okta_oauth2 (deprecated — use the generic oidc type for new OKTA integrations)
      This will navigate to OKTA’s login page. If the user logs in successfully, the configuration is available.
    config-test_okta
    1. oidc
      This will navigate to the corresponding identity provider’s login page. If the user logs in successfully, the configuration is available.

    2. cognito
      insureMO allows you to verify whether the token information from cognito is valid.

    • Fill in your token in the pop-up test panel and click Test.
    config-test_cognito_01
    • In the pop-up Online Test page, the information required for the request to validate the token interface is generated based on the previous steps. After clicking the Test, if the token is valid, the user information corresponding to this token will be generated on the right.
    config-test_cognito_02
    1. saml
      This will navigate to the configured identity provider’s login page (the example below shows Microsoft Entra ID). If the user logs in successfully, the configuration is available.
    config-test_saml
    1. rest
      This type is a standard for insureMO, allowing the CAS service to connect to different user sources for the username and password verification.
    • Fill in your personal information in the test panel that pops up and click Test.
    config-test_rest_01
    • In the pop-up Online Test page, the information required for the request to get the token interface is generated based on the previous steps. After clicking the Test, the corresponding token information will be generated on the right.
    config-test_rest_02

Troubleshooting

Common errors when submitting the configuration:

ErrorCauseFix
the client id and authtype in json is not the same as the input parameter (499)The JSON root key does not equal the protocol selected in Step 1, or the insuremo_client_id value does not equal the Client ID typed in Step 1Correct the JSON root key / insuremo_client_id and submit again
Client ID rejectedLength is 20 characters or more, or it is a reserved name (mo, platform, key, member, limo)Choose a shorter, non-reserved Client ID and use the same value in BOTH Step 1 and the JSON
Client ID already existsThe same Client ID is already configured in this tenantUse a different Client ID, or edit the existing record instead of creating a new one

SSO Developer Guide

Case 1: Login via External user service (Rest)

  1. The external user service need to provides API according to CAS requirements. CAS calls the external user service through the Restful API to verify the user password. The parameters that will be passed are as follows:
curl --location --request POST 'http://user-mgmt-service.insuremo/account/signin'
--header 'Content-Type: application/json'
--data-raw
'{"name":"xxxx","password":"132xxxxxxdv!","tenantCode":"insuremo"}'

The format of the data returned after calling the user service is as follows:

accountName,email,tenantCode are required

{
"body":"Check password success",
"data":{
"accountName":"xxxx",
"email":"xxxx@insuremo.com",
"mobile":"+123xxxx123",
"tenantCode":"insuremo",
"tenantLockTimes":0,
"loginStatus":"1",
"autoUnlockTime":1800,
"accountLockNotifyFlg":""
},
"returnCode":"RC-00001"
}

The error is as follows:

{
"data": {
"accountName": "xxxx",
"email": "xxxx@insuremo.com",
"mobile": "+153xxxx092",
"tenantCode": "insuremo",
"tenantLockTimes": 0,
"loginStatus": "",
"autoUnlockTime": 1800,
"accountLockNotifyFlg": ""
},
"errors": "CheckPassword error,password not right",
"returnCode": "RC-00099"
}
  1. Configure in the SSO Card

if you have a new client,please go to SSO Card->SSO Config and config it,follow the web page guide.

  • After the configuration is complete, directly use the interface to obtain the Token. The incoming client ID needs to be changed as follows:

    • It’s a must to add parameter: x-mo-client-id with your own client ID (the example above uses member).

    • You can add any parameter in JSON format to Extend_params, and CAS will store it temporarily for you to facilitate the subsequent use.

curl --location --request POST
'https://portal.insuremo.com/cas/get-token'
--header 'Content-Type: application/json'
--header 'x-mo-client-id: member'
--header 'Authorization: Bearer jqmUVqXlSla6Q4E-rhTZ0w'
--data-raw '{
"username":"REP0003","password":"dfsxxxxxj43","tenant_code":"tsubaddw","extend_params":[{"name":"testkey","value":"testparam"}]}'
  • Authenticate user to identity and obtain additional parameters through the following API:
curl --location --request POST 'https://portal.insuremo.com/cas/validate-token'
--header 'Authorization: Bearer dfsadsafdesfds'
Response:
{
"user_name": "xxxx@insuremo.com",
"tenant_code": "gimo",
"status": "SUCCESS",
"accountExpireDate": "2028-01-31T00:00:00Z",
"extend_params": [
{
"name": "testkey",
"value": "testparam"
}
],
"email": "xxxx@insuremo.com"
}

Case 2: Customer Applications/UIs want to login via SAML or OIDC Identity Providers

The CAS service has integrated Microsoft Entra ID (AZURE AD), ADFS, OKTA, Cognito,Auth0 and other platforms through the SAML/OIDC protocol.
With the help of cas service, the applications could easily integrate with all these IDPs, only need to call CAS by Restful APIs.

SAML integration

40a63ee8158a1723bfa2271935b4902e img.png

OIDC Intergration

img.png
  1. Config the SAML/OIDC IDP in SSO Card
    • Follow the guide before, and remember the auth type and client ID
  2. Develop APIs to redirect cas and the callback APIs after user login (SAML&OIDC the same process)
    1. one API in step 2 redirect to cas
      • OIDC API: https://portal.insuremo.com/cas/sso/auth?tenant_code=mytenantcode&auth_type=oidc&client_id=mytenantcode&redirect_uri=https://myuiapi/gettokenbyexchangecode
      • SAML API: https://portal.insuremo.com/cas/sso/auth?tenant_code=mytenantcode&auth_type=saml&client_id=mytenantcode&redirect_uri=https://myuiapi/gettokenbyexchangecode
    2. one API in step 13 to get token via exchange code
      • The integrator needs to use this exchange code to call CAS in the background to obtain the real user information and token.
      • Please refer to the following API about consume exchange code.
NameDescExample
tenant_codeTenantCode agreed by both partiestesttenant3809
redirect_uriThe URL received by the project party. They get the request and receive the exchange_code parameterhttps://portal.insuremo.com/cas/saml/hello
auth_typesaml,oidcsaml
client_idIf a tenant has multiple ADFS, use client_id to distinguish themclientid1
SAML login initiated from IDP. The whole process is as follows:
cd63917bdf28e59bbb09b535c532e1e2

There are two supported ways for an IDP-initiated login, depending on what the IDP sends together with the SAML Response to the insureMO Assertion Consumer Service (/cas/saml/acs):

Way 1 — Browser redirect (RelayState = insuremo_<tenant_code>). Configure the IDP application to send the Relay State insuremo_<tenant_code> (for example insuremo_mo-fo for the mo-fo tenant; this is the same Relay State value described in the SP configuration sections). After the user authenticates, insureMO validates the assertion, issues the token, and redirects the browser (HTTP 302) to the redirect_uri configured in the tenant’s SAML configuration, appending a one-time exchange_code query parameter (the landing page exchanges it for the real token). Notes:

  • The landing address is purely the tenant-level configuration value — an end user cannot choose a custom redirect at login time in this flow.
  • Configure a single URL in redirect_uri for this flow: the whole configured value is used as the redirect target, so a comma-separated list would produce an invalid URL.
  • (For comparison: when the login is initiated from insureMO itself — SP-initiated — the browser returns to the page that started the login, and a caller-supplied redirect must pass the redirect_uri whitelist check.)

Way 2 — API style (no RelayState; tenant_code in the form data). The integrator (usually the front end) posts the SAML Response directly to insureMO and reads the token from the JSON response; no browser redirect happens. Steps:

1: Customer login.

Select the current site on the customer’s ADFS page.

11fd4921398349d8858b40a8cb21834d
2: The login interface of the current client’s IDP configuration is provided by the integrator, as follows:

curl —location —request POST ’https://myloginpage/saml/acs’\\

form SAMLResponse="PHNhbWxwOlJlc3BvbnNlIElEPSYXNpcz....0aW9uPjwvc2FtbHA6UmVzcG9uc2U+

3: After receiving the login request from IDP, the integrator (usually the front end) calls the following interface of Container and sends SAMLResponse and tenant_code through formdata.
curl --location --request POST 'https://dev.insuremo.com/cas/saml/acs'

--form 'SAMLResponse="PHNhbWxwOlJlc3BvbnNlIElEPSYXNpcz....0aW9uPjwvc2FtbHA6UmVzcG9uc2U+"'

--form 'tenant_code="testchen3809"'

Container returns the token of the current user, where there is no username. When required by the integrator, the username needs to be replaced with the token.

Response:
{
"access_token": "bbmkLEg7TmmeKuMgDv5Q_A",
"exchange_code": "5b04c5f9f1a34f67bb4c20fa8cd7d90e",
"expire_in": 7216,
"message": "",
"retry_times": 0
}

The interfaces for exchanging Token for user information are as follows:

curl --location --request POST 'https://portal.insuremo.com/cas/validate-token'
--header 'Authorization: Bearer JbiSwyWaSNWUEI85eTmH0w'
Response:
{
"user_name": "xxxx",
"tenant_code": "insuremo",
"status": "SUCCESS"
}

Customer configures ADFS/AZURE AD

To configure the ADFS server, follow the following process:
A. Configure Relying party trusts.

Import the Metadata file on the SP side provided by InsureMo, the address is: <https://dev.insuremo.com/cas/saml/metadata>. Download it directly with the browser, or configure the URL directly. Each environment is different, adjust <https://dev.insuremo.com> according to the actual domain address.

Import metadata file for application

6b48b3f1d40cf3650f5f5bdf21cd4a19

Finish it in the next step

B. Configure claim rule

Right-click on the trusts to edit rule

81e976f1926aef3bccae9a679b09e35e

Add send claim rule

554bc00078d44de92ae9208cb319c1f7 25b06d32a3f6549f068a24fba0cf9824

Add incoming rule

f8ac86254ac5af4a1c4a29c2d5d5015e fd80035b726b2e7a7c25881f93418456
C. Export the ADFS metadata file

This metadata is the ADFS IDP metadata.

Follow the following process to configure the AZURE AD

How to Config the SAML SSO in AZURE AD

Add a new application:
ccfd7f6932b47dcd58c23e4d8f7aa745 0374c63620db79d619aadc899c4eb758
Set up the single sign on for the application
009758843ca5a01662eb166e4a7eea39

The identifier id (Entity ID) should be: <https://sandbox.sg.insuremo.com/cas/saml/metadata>

Reply URL should be: <https://sandbox.sg.insuremo.com/cas/saml/acs>

Relay State should be: valpas

note

The URLs and the Relay State above are examples from a sandbox environment. Replace the domain with your own insureMO environment domain and use your own values.

After config, please provide the Federation Metadata XML to the insureMO team to complete the configuration.

b5d0afd422f504f4e261f8c0eb21384a 69956748af46fbc2bd8b84fc3088d2ee
C.give the metadata file URL to insureMO team, insureMO team do the SSO Configuration in SSO Configuration card

Test

AZURE AD Test the sso
  1. IDP int test
b18f51cc2e21fcb206dab2e7b905e0db
  1. Sp init test, go to page: <https://sandbox-s-auth.insuremo.com/cas/login?client_id=key&response_type=code&redirect_uri=https://sandbox.sg.insuremo.com/> ,input the tenant code valpas, click AZURE AD

    1. The redirect_url should be change to your homepage.

Post-maintenance of SAML

Change the default public key and private key: (Please arrange a suitable time,for SSO will be interrupted during this process)

If the public and private keys need to be replaced next time, the steps are as follows, and it is recommended to supplement the subsequent documentation on the project to prevent trouble caused by personnel replacement.

  1. Generate RSA private key file
f2a7488c35d50103bafcd81f938af5cc
  1. Use the private key to generate a certificate, and specify the period here, then you can see the content of the public key when you open the certificate.
ff1830ac37f7f09045398329ff259118
  1. Assign the private key and public key content to the configuration center
6dfd31d497aaf41a12d873b3bcc74ae2
  1. Restart CAS to get new metadata (the metadata contains public key information)

  2. After modifying the metadata according to the requirements of the project team, provide it to the customer.

note

Links to external websites and third-party features contained in this document are for demonstration purposes only. Such links and features do not constitute our endorsement or recommendation. We neither control nor assume responsibility for the content, services, or privacy practices of these third parties. Users are advised to independently review the respective terms and privacy policies.

  • Q: If I want to let the user login insureMO via my user service, how could I connect to the CAS service ?
  • A: External user services that support Restful interfaces can be added to CAS,please go to External user service provides API according to CAS requirements.

Feedback
Was this page helpful?
|
Provide feedback