SSO Configuration
Last updated
Was this helpful?
Last updated
Was this helpful?
Introduction
Lucy supports single sign-on for both Administrative and End-users through SSO/SAML. SAML (Security Assertion Markup Language) and OAuth 2.0 (Open Authorization) are widely recognized standards for authentication and authorization, each facilitating the implementation of SSO.
These technologies allow administrators/users to access Lucy using a single set of credentials, enhancing both user convenience and security. Although SAML and OAuth 2.0 aim to streamline authentication processes, they differ in their specific purposes and operational approaches:
Purpose: OAuth 2.0 is a framework for authorization. It enables applications to obtain limited access to user accounts on an HTTP service. While OAuth can be used for authentication (and often is, with extensions like OpenID Connect), its primary role is to authorize third-party applications to access a user's account without exposing their password.
How it works: OAuth 2.0 uses access tokens rather than user credentials to authorize requests. When a user logs into an application and consents to give it access to another service, the application receives an access token. This token is then used for subsequent requests to the service on behalf of the user.
Use Case: OAuth 2.0 is used in scenarios where an application needs to perform actions on behalf of a user without knowing their password.
Before connecting to the Identity Provider, the following preparations are necessary:
SSL Certificate: Upload or create an for the Lucy Admin console. This step is crucial for ensuring that the connection and data exchanged between Lucy and Azure AD are secure.
Administrator Account Matching: Verify that you have an Administrator account in Lucy, which you can find under Settings -> Users -> Administrative Users. The email address associated with this account must match the email address of your account in the Identity Provider.
Please ensure to test the authentication via SSO before enabling the Auto Login feature. If Auto Login was activated and you are locked out of your Lucy server, please reach out to our for assistance with disabling the Auto Login feature.
Ensure you have created the App Registration in Entra ID as outlined .
Add your Client ID, Client Secret, and Tenant ID from your Azure Entra ID application.
To integrate Lucy with your App Registration, it's essential to have global administrative consent for your organization. If the administrator account in Lucy lacks the necessary privileges to grant consent on behalf of the organization, refer to the guide provided below to establish a consent flow in Azure.
User.read
Delegated
Sign in and read user profile
No
Directory.Read.All
Delegated
Read directory data
Yes
Delegated
View users' email address
No
offline_access
Delegated
Maintain access to data you have given it access to
No
OpenID
Delegated
Sign users in
No
User.Read.All
Delegated
Read all users' full profiles
Yes
The exact method of deploying a SAML application for SSO will vary depending on the application your organization uses. These are the general steps for deploying a SAML app and connecting with Lucy.
Define Lucy as a SP within the IdP, specifying its endpoint and required SAML attributes.
In Lucy, navigate to Settings -> Common System Settings -> SSO Settings.
Enter your administrative domain and IdP endpoint.
Lucy requires a SHA1 thumbprint. SHA256 or other algorithms will not work.
Map user attributes from the IdP to fields in Lucy (e.g., email, full name) as required.
Verify the SSO connection with the IdP by clicking Test Connection. Testing should be completed before enabling Auto Login to avoid login issues.
Microsoft Entra ID also supports SSO using SAML 2.0.
To begin, log in to your Entra ID portal and go to Manage -> Enterprise Applications. Select + New Application and then select the option for a Non-gallery application:
Click Create to create the new application.
Go to Manage -> Single Sign-On and select SAML for the SSO method.
Click the Edit button and enter these values, then Save.
Identifier (Entity ID)
Click the Edit button and then + Add new claim. Create a new claim called mail using the attribute user.mail, then click Save:
Next go to Manage -> Users and Groups and select + Add user/group.
Search for and add your desired Users/Groups so they can use the application to log in to Lucy.
In the SAML Certificates section download the Federation Metadata XML. In the Set up <Application Name> section, copy the Microsoft Entra Identifier.
In Lucy, go to Settings -> Common System Settings -> SSO Settings.
Select SAML 2.0 for the method.
Enter your Lucy admin domain in the Domain Name field.
Enter the Microsoft Entra Identifier in the Identity Provider Endpoint field.
Upload the Federation Metadata file in the Identity Provider Server XML metadata field.
The Thumbprint in Entra ID is created using SHA256. Lucy requires that the thumbprint be SHA1.
To get the SHA1 thumbprint open the metadata XML file and look for the field labeled X509Certificate
:
Copy only the text of the certificate and create a new file with this format (you can copy this text):
Finally, paste the thumbprint in the Identity Provider Certificate Thumbprint field.
Click Save to apply the settings, then click Test Connection. You should be redirected to your SSO login page where you can test that your connection is working.
This guide is intended for Lucy Administrators who lack Azure Administrative privileges to grant organizational consent, as well as situations where Lucy servers operate without an Azure Administrator to facilitate the saving of Azure application configurations within Lucy. Lack of Administrative consent is evident if the following message is displayed after saving your application in Lucy:
Log into the Azure Portal: Start by visiting and logging in with your credentials.
Then, upload your IdP metadata file and paste in the thumbprint. Your IdP should provide a thumbprint for your X.509 certificate, but you can also use an online tool like .
This setting allows seamless login but should be used carefully, as enabling it can restrict alternative access methods. if auto login prevents access.
Save this as a .pem
file, then use an or the openssl
command to get the SHA1 thumbprint: