This document describes how to achieve the simplest form of integration of an Application with Chemaxon Cloud: single sign-on (SSO).
A successful integration consists of 2 main parts:
{info} Chemaxon Cloud uses Okta for IAM (Identity and Access Management).
{info} Chemaxon Cloud uses the OpenID Connect (OIDC) protocol to handle both authentication and authorization.
app-info
metadata endpoint to be consumed by Chemaxon Cloudapp-info
metadata provided by Application to be accessibleTo better understand what we want to achieve, we should expand the above steps a bit more:
client_id
and client_secret
to application development teamapp-info
endpointapp-info
endpointapp-info
endpoint to Chemaxon Cloud System Administratorapp-info
endpoint URI received from application development teamapp-info
endpointapp-info
Name | URI |
---|---|
Chemaxon Cloud base URI | https://cloud.chemaxon.com/ |
Okta OAuth Authorization Server URI | https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417 |
Okta OAuth Authorization Server Metadata URI | https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/.well-known/oauth-authorization-server |
To provide a consistent login User Experience and SSO capability, Chemaxon Cloud relies on the "Okta redirect authentication model".
{warning} Chemaxon Cloud only supports integrating: server-side web applications; SPAs that rely on their own backend for handling authentication.
{warning} Chemaxon Cloud currently does NOT support integrating: SPAs where authentication would be handled by client side code directly interacting with Okta.
Exact implementation depends on the technologies used by the Application. Please refer to the appropriate documentation in Okta:
Example of Oauth Client configuration - token, authorization, and JWKS URI:
security.oauth2:
client:
clientId: <yourClientID - obtain from Chemaxon>
clientSecret: <yourClientSecret - obtain from Chemaxon>
accessTokenUri: https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/v1/token
userAuthorizationUri: https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/v1/authorize
scope:
- openid
- profile
- email
- offline_access
resource:
jwk.key-set-uri: https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/v1/keys
Example of passport-openidconnect
configuration:
{
"issuer": "https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417",
"authorizationURL": "https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/v1/authorize",
"tokenURL": "https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/v1/token",
"userInfoURL": "https://auth.cloud.chemaxon.com/oauth2/aus3qkblpwzIDQBJF417/v1/userinfo",
"clientID": "${yourClientID - obtain from Chemaxon}",
"clientSecret": "${yourClientSecret - obtain from Chemaxon}",
"callbackURL": "http://localhost:3000/authorization-code/callback",
"scope": "openid profile email offline_access"
}
{info} The
offline_access
scope is optional, and results in a refresh token being issued by Okta.
For details about custom claims included in Okta tokens, and about the scopes required for them to be included, please refer to Custom Claims in Okta tokens.
{warning} Certain scopes are required for these custom claims to be included in the tokens, please make sure to request the appropriate scopes.
Based on these custom claims, your application should be able to make access control and authorization decisions, as needed.
app-info
endpointThe response of the endpoint should adhere to the specification according to sf-001-application-info.
{warning} Two features are especially important to include in the response:
synergy/login
andsynergy/logout
.
synergy/login
- Callback URL to add to the "Sign-in redirect URIs" allowlist in Oktasynergy/logout
- Callback URL to add to the "Sign-out redirect URIs" allowlist in OktaThese are necessary to ensure that the required configuration changes in Okta can be made by Chemaxon Cloud, so that Login/Logout initiated in the Application works.
{info} Sign-in redirect URI: The sign-in redirect URI is where Okta sends the authentication response and ID token for the sign-in request. (The URI must be absolute URI.)
{info} Sign-out redirect URI: After your application contacts Okta to close the user session, Okta redirects the user to this URI. (The URI must be absolute URI.)
{info} Source: Okta Help Center / Create OIDC app integrations / Task 2: Configure initial settings
GET https://example-application.com/api/app-info
{
"displayName": "Example Chemaxon Cloud app",
"address": "https://example-application.com/",
"identities": [{ "category": "application", "type": "web" }],
"features": [
{
"namespace": "synergy/health",
"attributes": {
"url": "https://example-application.com/api/health"
}
},
{
"namespace": "synergy/icon",
"attributes": {
"url": "https://example-application.com/app-icon.svg"
}
},
{
"namespace": "synergy/login",
"attributes": {
"url": "https://example-application.com/authorization-code/callback"
}
},
{
"namespace": "synergy/logout",
"attributes": {
"url": "https://example-application.com/logout"
}
}
]
}
app-info
endpoint URI to Chemaxon Cloud System Administrator.Please refer to System Administrator guide on Registering Applications.