SSO
Single-Sign-On (via SAML2) is available on OpenReplay Enterprise Edition only.
Identity Provider (IDP) configuration
Section titled Identity Provider (IDP) configurationIn you Identity Provider’s dashboard, create a new app called openreplay
(you can use this icon), In the configuration page, make sure to set the following value (please make sure to replace YOUR_DOMAIN
with the correct value, example https://openreplay.mycompany.com
):
Variable | Value |
---|---|
ACS URL (also called Single Sign On URL or Consumer URL) |
|
Entity ID (also called Audience) |
|
Single Logout URL (also called SLO URL) | (optional) |
Name ID (sometimes it is configurable in the ‘Attribute Statements’ or the ‘Parameters’ section) | Email or EmailAddress or urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress , depending on your Identity Provider |
SAML initiator | Set it to Service Provider (optional) |
In the ‘Attribute Statements’, or the ‘Parameters’ section, please make sure to define the following fields:
Field | Value |
---|---|
tenantKey | its value can be found in the Dashboard, under ‘Preferences’ > ‘Account’ |
firstName | user.firstName |
lastName | user.lastName |
internalId | Internal ID or user.email (the user’s ID in your identity management system) (optional) |
role | The user’s role, depending on you Identity Provider it can be user.role or group , etc. (optional, default = member ) |
adminPrivileges | If the user have admin privileges or not, if this field contains any value different from false , it will be considered as true . (optional, default = false ) |
You should now have all the required values for the next step/section.
SSO (SAML2) configuration
Section titled SSO (SAML2) configurationTo enable SSO, run openreplay -e
and uncomment then update the below env variables in chalice
section:
Variable | Description |
---|---|
idp_entityId | The entityId of your identity provider, also referred to as Issuer URL |
idp_sso_url | The singleSignOnService of your identity provider, also referred to as SAML 2.0 Endpoint (HTTP) |
idp_x509cert | The x509cert , must be a one-line string, without line breaks. You can use this tool to format your value |
idp_name | The identity provider’s name (optional) |
idp_sls_url | The singleLogoutService of your identity provider, also referred to as SLO Endpoint (HTTP) (optional) |
enforce_SSO | If set to true , all connexions with username and password will be blocked (optional, default=false ) |
Then, save and quit using :wq
for the changes to take effect:
OpenReplay certificate
Section titled OpenReplay certificateThis is optional, you can add a x509 certificate for extra SSO security:
- run this command in your server or your secure machine (you can change the validity time of your certificate according to your needs):
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout openreplay-sso.key -out openreplay-sso.crt
- In your server, run
openreplay -e
- Under the
chalice
section, add the following env variables:
- sp_crt: must be a one-line string, without line breaks of the generated ‘openreplay-sso.crt’ file (you can use this tool to format your value)
- sp_key: must be a one-line string, without line breaks of the generated ‘openreplay-sso.key’ file
- Save and quit using
:wq
for the changes to take effect - Add the generated ‘openreplay-sso.crt’ file to your Identity Provider’s application configuration
Example using Okta
Section titled Example using Okta- Login to your Okta administration dashboard and go to ‘Applications’ > ‘Applications’
- Press ‘Create new app integration’, then select SAML 2.0 and press ‘Next’
- Set the ‘App Name’ to OpenReplay (you can upload this icon) for your application) then press ‘Next’
- Set:
- Single sign on URL to
/api/sso/saml2/acs/YOUR_DOMAIN
- Audience URI (SP Entity ID) to
/api/sso/saml2/metadata/YOUR_DOMAIN
- Name ID format to
EmailAddress
- Define the below fields in ‘Attribute Statements’:
- tenantKey: format
Basic
and set the value to
, found in OpenReplay dashboard under ‘Preferences’ > ‘Account’TENANT_KEY
- firstName: format
Basic
and set the value touser.firstName
- lastName: format
Basic
and set the value touser.lastName
- internalId: format
Basic
and set the value touser.email
- Define the below field in ‘Group Attribute Statements’:
- role: format
Basic
filterMatch Regex
value.*
(or you can specify a different filter and regex according to your needs) - adminPrivileges: format
Basic
filterMatch Regex
valueadmin
(the current user will haveadmin privileges
if he is part of the admin group)
- Press Next, Select ‘I’m an Okta customer adding an internal app’ and ‘This is an internal app that we have created’ then press ‘Finish’
- In the Sign On tab, scroll down and press ‘View Setup Instructions’ to see you SAML2 configuration
- In your server, run
openreplay -e
- Under the
chalice
section, uncomment then set the following env variables:
- idp_entityId: Identity Provider Issuer
- idp_sso_url: Identity Provider Single Sign-On URL
- idp_x509cert: X.509 Certificate, must be a one-line string, without line breaks (you can use this tool to format your value)
- idp_name: Okta
- Finally, save and quit using
:wq
for the changes to take effect.
Example using Azure Active Directory
Section titled Example using Azure Active Directory- Login to your Azure portal and go to ‘Azure Active Directory’
- Press ’+ Add’, select ‘Enterprise application’ then click ‘Create your own application’
- Set the ‘App Name’ to OpenReplay then select ‘Integrate any other application you don’t find in the gallery (Non-gallery)’ and press ‘Create’
- Navigate to ‘Single sign-on’ in the left-side menu and set the below values in the ‘Basic SAML Configuration’ block:
- Identifier (Entity ID) to
/api/sso/saml2/metadata/YOUR_DOMAIN
- Reply URL (Assertion Consumer Service URL) to
/api/sso/saml2/acs/YOUR_DOMAIN
- Logout URL to
/api/sso/saml2/sls/YOUR_DOMAIN
- Add the below claims in ‘Attribute & Claims’ block and ensure the ‘Namespace’ field is left empty for each of them:
- tenantKey: set the value to
, found in OpenReplay dashboard under ‘Preferences’ > ‘Account’TENANT_KEY
- firstName: set the value to
user.givenname
- lastName: set the value to
user.surname
- internalId: set the value to
user.mail
- Navigate to ‘Users and groups’ and assign your select users to the application
- Now SSH into your OpenReplay installation and run
openreplay -e
- Under the
chalice
section, uncomment then set the following env variables (values are found in ‘Azure Active Directory’ > ‘OpenReplay’ > ‘Single sign-on’):- idp_entityId: Azure AD Identifier
- idp_sso_url: Login URL
- idp_sls_url: Logout URL
- idp_x509cert: X.509 Certificate, must be a one-line string, without line breaks (you can use this tool to format your value)
- idp_name: Active Directory
- Finally, save and quit using
:wq
for the changes to take effect
Example using Google Workspace (formerly G Suite)
Section titled Example using Google Workspace (formerly G Suite)Add Custom Attributes:
Section titled Add Custom Attributes:- In the Google Admin console, go to ‘Directory’ > ‘Users’ > ‘More options’ > ‘Manage custom attributes’.
- Click ‘Add Custom Attribute’.
- Set the following fields:
- Category: ‘OpenReplay’
- Custom fields:
- Name: ‘role’
- Info type: ‘Text’
- Visibility: ‘Visible to user and admin’
- No. of values: ‘Single-value’
- Custom fields:
- Name: ‘adminPrivileges’
- Info type: ‘Yes or No’
- Visibility: ‘Visible to user and admin’
- No. of values: ‘Single-value’
- Click ‘Add’
- To add values to the new custom attributes, go to ‘Users’
- Select the desired user(s)
- Click on ‘User information’ then edit the ‘OpenReplay’ section
- Change the value of role to the desired role in ‘OpenReplay’ (the role should match the one created in OpenReplay dashboard under ‘Preferences’ > ‘Roles’)
- Change the value of adminPrivileges to ‘Yes’ if the user is allowed to have Admin Privileges in OpenReplay
- Click ‘Save’
Configuration:
Section titled Configuration:- Login to your Google Admin Console and go to ‘Apps’
- Press ‘Web and mobile apps’ then click ‘Add app’ > ‘Add custom SAML app’
- Set the ‘App name’ to OpenReplay (you can upload this icon for ‘App icon”) then press ‘Continue’
- Copy ‘SSO URL’, ‘Entity ID’ and ‘Certificate’ then click ‘Continue’ (we will use these values in step 11)
- Set:
- ACS URL to
( /api/sso/saml2/acs/YOUR_DOMAIN
/TENANT_KEY
TENANT_KEY
is found in OpenReplay dashboard under ‘Preferences’ > ‘Account’) - Entity ID to
/api/sso/saml2/metadata/YOUR_DOMAIN
- Name ID format to
Email
- Name ID to
Basic information > Primary Email
- Click ‘Continue’ then hit ‘Add Mapping’ to add the below attributes:
Basic information > First Name
-> firstNameBasic information > Last Name
-> lastNameBasic information > Primary Email
-> internalIdOpenReplay > role
-> roleOpenReplay > adminPrivileges
-> adminPrivileges
- Click ‘Finish’
- In the Google Admin Console, go to ‘Apps’ > ‘Web and mobile apps’ and select ‘OpenReplay’
- Click ‘User access’, select ‘ON for everyone’ then hit ‘Save’
- In your server, run
openreplay -e
- Under the
chalice > env
section, uncomment and set the following attributes using the values from step 4:
- idp_sso_url: paste the value of ‘SSO URL’
- idp_entityId: paste the value of ‘Entity ID’
- idp_x509cert: use this tool to format the copied/downloaded certificate
- idp_name: set the value to
G-Suite
- idp_tenantKey:
found in OpenReplay dashboard under ‘Preferences’ > ‘Account’TENANT_KEY
- Finally, save and quit using
:wq
for the changes to take effect.
Example using JumpCloud
Section titled Example using JumpCloud- Login to your JumpCloud administration dashboard and in the left menu, go to ‘SSO’
- Press ’+ Add New Application’, then select ‘Custom SAML App’
- Set the ‘Display Label’ to OpenReplay (you can upload this icon for your application) then move to ‘SSO’ tab
- Set:
- IdP Entity ID to
openreplay/
TENANT_KEY
- SP Entity ID to
/api/sso/saml2/metadata/YOUR_DOMAIN
- ACS URL to
/api/sso/saml2/acs/YOUR_DOMAIN
- SAMLSubject NameID to
email
- SAMLSubject NameID Format: to
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
- Signature Algorithm to
RSA-SHA256
- Check Sign Assertion
- IDP URL to end with
openreplay-
(this value cannot be changed later)TENANT_KEY
- If you followed the OpenReplay-Certificate instructions, you can upload the generated ‘openreplay-sso.crt’ file by pressing the ‘Upload SP Certificate’, otherwise ignore this step
- Define the below fields in ‘USER ATTRIBUTE MAPPING’ by pressing the ‘add attribute’ button:
- firstName: set the value to
firstname
- lastName: set the value to
lastname
- internalId: set the value to
email
- role: optional, the user’s role in OpenReplay, if it is a constant value for all users, you should define it in the next step,
otherwise you have to add a new string-attribute to the JumpCloud’s group, call it
OpenReplayRole
and set the value to the role’s name, and then in the SSO configuration, select ‘Custom User or Group Attribute’ and set the value toOpenReplayRole
. - adminPrivileges: optional, if it is a constant value for all users, you should define it in the next step, otherwise you have to add a new boolean-attribute to the JumpCloud’s group, call it
OpenReplayAdminPrivileges
and set the value to the role’s name, and then in the SSO configuration, select ‘Custom User or Group Attribute’ and set the value toOpenReplayAdminPrivileges
.
- Define the below fields in ‘CONSTANT ATTRIBUTES’ by pressing the ‘add attribute’ button:
- tenantKey: set the value to
, found in OpenReplay dashboard under ‘Preferences’ > ‘Account’TENANT_KEY
- role: optional, ignore if defined in the previous step, the user’s role in OpenReplay, should match role name already defined in OpenReplay (default =
member
) - adminPrivileges: optional, ignore if defined in the previous step, set the value to
true
if you want to give new users admin privilege,false
if not (default =false
)
- At this stage, you can move to the ‘User Groups’ tab, and select the group of users that will have access to OpenReplay, or you can do it later
- Press ‘activate’ and ‘continue’ in the confirmation popup
- Press the new OpenReplay application icon, then on the left dropdown ‘IDP Certificate Valid’ choose ‘Download certificate’
- In your server, run
openreplay -e
- Under the
chalice
section, uncomment then set the following env variables:
- idp_entityId:
openreplay/
TENANT_KEY
- idp_sso_url:
https://sso.jumpcloud.com/saml2/openreplay-
TENANT_KEY
- idp_x509cert: the downloaded certificate, must be a one-line string, without line breaks (you can use this tool to format your value)
- idp_name: JumpCloud
- Finally, save and quit using
:wq
for the changes to take effect.
Errors
Section titled ErrorsThe response was received at http instead of http
Section titled The response was received at http instead of httpThis is very common, and is due to the ‘X-Forwarded-Proto’ header not being present in th request. In order to resolve that, make sure the Load Balancer is correctly forwarding the header to the OpenReplay backend.