Embedding Auth-Only Connections
How Do Auth-Only Connections Work?
Pandium offers an Auth-Only Connection offering that allows you to build out a custom, configure-less (to the user), embedded page into your system that allows users to login directly to different systems, and automates the integration installation process for users, without them ever seeing Pandium. This page is displayed in an iframe within a web app that sits behind your company login.
This can be useful to create your own area in your site where you dictate certain connectors/integrations that users can connect to, and providing them with a simple path to authenticate into a system and have integrations installed without further work.
In order to maintain the security of your user's data, you must stand up a backend service that redirects to the Auth-Only Connection page with user information encoded in a JSON Web Token (JWT).
Difference Between In-App Marketplace and Auth-Only Connections
While similar to Pandium's In-App Marketplace, there are key differences between the two features:
The In-App Marketplace provides a more holistic marketplace experience, where you can show various integration options and app detail data to both potential and existing users, and provide them directed workflows to set configurations, schedules, and install apps manually.
With Auth-Only Connections, you can simplify this process through background connect, i.e. users are automatically authenticated to your system when connecting apps, and immediately directed to authenticate into the external system with no configuration requirements needed by the user.
This is accomplished by first, defining what systems you even want to display to users on this page through the JWT, and second, setting specific configuration fields in the JWT.
Learn more about the process for setting up Auth-Only Connections below.
Embedding Auth-Only Connection Page
Before your site can be enabled for SSO via JWT with Pandium, you will need to reach out to the Pandium support and exchange the below:
A shared secret supplied by Pandium. This is used to sign the JWT, and helps Pandium ensure the requests come from you and you alone.
If embedding a Pandium Marketplace in your application, we'll also need the domain of the application that will serve as the iframe's parent. Pandium needs this for CORS purposes.
Note: If you are using a Sandbox or PoC environment, we will not need the domain.
Configuring the Auth-Only Experience
Each system that you are surfacing to your users will need to direct to a specific URL where your users can authenticate. The URLs will look like the below:
If using a Sandbox account, the URL will be: https://emp.sandbox.pandium.com/{orgname}/connector/auth?tenant={jwt}
If using a production account, the URL will be:
https://emp.pandium.io/{orgname}/connector/auth?tenant={jwt}
In these URLs, the organization name is your unique company name, which can be found in the URL while logged into the Integration Hub URL, e.g. https:/imp.sandbox.pandium.com/yourcompanyname?tenant=
, and the specific Connector name being used, which can be found in integration the object via our API.
Additionally, within the JWT, each connection will need to have fields defined in the 'xti
' field in your JWT. as seen below in the example with a connector named 'gwt' and integration named 'gwt2hs':
For Auth Dialog to function, the JWT will require a token parameter on your side for your organization's connector, so that when users connect, they are able to authenticate into your system.
For information on setting the backend service that enables JWT functionality, check out the below example:
Setting up the JWT and Backend Service
To setup the JWT and backend services needed to enable your marketplace or auth-only features, take a look at the below:
Framework of a Sample Backend Service in Python
This is an example of setting up the service you'll need to enable this in Python:
Creating the Signed JSON Web token
You will need to build a JWT containing the users’ data in a backend service.
JWTs are made of 3 parts separated by a period (.
). Each piece is base64Url encoded which then gets assembled to look like below:
<base64url-encoded header>.<base64url-encoded payload>.<baseurl-encoded signature>
Header:
Pandium currently supports the following header:
The base64url-encoded version of the above is below:
Signature:
The JWT signature is produced by concatenating the Base64url encoded header with the Base64url encoded claims, and then signing using the shared secret using HMAC with SHA-256.
A Complete Example.
iFrame Post Message
Once the user successfully connects via the auth dialog we will send a postMessage from the iframe window which your application can then use to track the user's state. The event will have tenant data as well as a webhook url you can use to register webhooks for the tenant in your system. This can be used if you don't have a backend endpoint we can register webhooks with during connect.
Example MessageEvent:
Last updated