Configuring the Connector for Single Sign-On
Introduction
This page explains how to configure OAuth single sign-on (SSO) so your Mendix app can access Designcenter X Cloud Services without requiring users to sign in separately. After importing the Designcenter X Cloud Services Connector into your app, follow the steps in this document to complete the SSO configuration.
Creating a Server User
To create a server user and obtain client credentials, follow these steps:
- Sign in to the Siemens Admin Console and navigate to Designcenter X under Products.
- Open Server Users and click Create server user.
- Fill in the Name, Tier, and Role fields. Enter Application Owner as the Role and click Create.
- Click Download Credentials and save the file securely. The file contains the Client ID and Client Secret.
Configuring the Mendix Application
Configuring Security
- Open Security from the App Explorer.
- Set the Security level to Production.
- In the User roles tab, edit the Administrator role and assign the OIDC, UserCommons, and Designcenter X Cloud Services Connector Administrator module roles.
- Edit the User role and assign the OIDC and Designcenter X Cloud Services Connector User module roles.
Configuring Navigation
- In Navigation, add a New Menu Item named Designcenter Admin and set the On-click action to Show a page.
- Search for and select the
ServerUserConfigurationpage under Designcenter_Connector > USE_ME > OIDC. - Set the Atlas ‘cog’ icon for the menu item.
- Add a Sign out menu item for the sign-out action, set the Atlas ‘logout’ icon, and click OK.
Configuring Constants
- Open Settings from the App Explorer and click Edit on the default configuration.
- Go to the Constants tab and set the
OIDC.EncryptionKeyconstant to a 32-character encryption key. For more information, see Setting the Encryption Key.
Configuring OIDC SSO
-
Run the app locally and sign in as an administrator. For more information, see Administrator.
-
Navigate to the Designcenter Admin page and create a new server configuration using the following values:
- Client ID – the application identifier downloaded from the Siemens Admin Console.
- Client Secret – the authentication key generated from the Siemens Admin Console. For more information, see the Creating a Server User section above.
- ECA ID – your Enterprise Cloud Account identifier.
- Region – the region where your Designcenter X product was provisioned in the Siemens Admin Console.
-
Save the configuration. The primary and secondary fields are now populated. Sign out of the app.
Validating the Configuration
- Run the app locally or open
http://localhost:8080/oauth/v2/loginin a browser. The sign-in page appears. Alternatively, if you want to login directly when opening thelogin.htmlpage, follow the Configuring Login Redirection section of the OIDC SSO. - Sign in via SSO to verify that the app loads successfully and connector operations can establish a Teamcenter session.
Rotating the Credentials
Rotate credentials every six months for better security. During initial setup, the server user is provisioned with two client credentials: Primary and Secondary. By default, the Primary credential is active. To rotate credentials, follow these steps:
- Sign in as the Mendix administrator.
- Navigate to the Designcenter Admin page. The page displays the Primary and Secondary client credentials.
- Click Rotate Credentials and enter the server user details from the Siemens Admin Console.
- Click Rotate. The Secondary credential becomes active and a new Primary credential is generated.
- To rotate the Secondary credential, repeat the same steps.
Troubleshooting
If you encounter issues with the Designcenter X Cloud Services Connector, the following sections describe common errors and how to resolve them.
Application Runtime Errors
Widgets or Grid Errors
If Studio Pro reports widget or grid errors after importing the connector, do the following:
- Right-click the error and update all widgets.
- Convert the grid to Data Grid 2 to eliminate grid errors.
Invalid Client Error During SSO
If you receive an "Invalid client" error during SSO, the cause is one of the following:
- The client ID and secret pair is invalid.
- The server user has been deleted in the Admin Console.
To resolve this, recreate the server user and update the server configuration in your Mendix app.
No Roles from Token
The browser may be caching a session from another Enterprise Cloud Application (ECA). To resolve this, sign in using incognito mode or clear your browser cache and try again.
Authentication Failed
If you see "Authentication failed! Please check with your System Administrator," the authentication credentials are not properly configured.
To resolve this, go to the Designcenter Admin page, click Delete Client Credentials to remove the existing credentials, then reconfigure the server user to generate new credentials.
Mendix Studio Console Errors
Server User Is Already Configured
This error occurs when the same server user is already configured by another user in the same app. To resolve this, go to the Designcenter Admin page, click Delete Client Credentials to remove the existing credentials, then reconfigure the server user.