Onelogin Example - Create an Application
You are required to create an application that Onelogin will be doing authentication on behalf of.
-
Go to Applications > Add App > Search for and choose
SAML Custom Connector (Advanced)
. -
Name your connector, that is, Lighthouse.
-
In the Configuration tab for your new app:
-
Set Audience (EntityID) to
lighthouse-onelogin
. -
Set Recipient to
lighthouse-onelogin
. - Set ACS (Consumer) URL to:
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/onelogin
. -
Set ACS (Consumer) URL Validator to a regex expression that matches only all your Lighthouses' SSO addresses (IP & DNS for Primary & Secondary Lighthouses).
-
Ensure it begins with ^ and ends with $ to match the whole URL.
-
Recommended pattern:
^https:\/\/
{lighthouse addresses}\/api\/v3\.7\/sessions\/saml\/sso\/onelogin$
. -
For example to allow Onelogin login for Lighthouse addresses
192.168.1.10
andlighthouse.example.com
, you could use the following: (note the additional () around your hostnames and the | separating them:
.
^https:\/\/(192\.168\.1\.10|lighthouse\.example\.com)\/api\/v3\.7\/sessions\/saml\/sso\/onelogin$
-
-
Set Login URL to
https://{main lighthouse address}/api/v3.7/sessions/saml/sp_init/onelogin
. -
Set SAML initiator to
Service Provider
. -
Set SAML signature element to
Assertion
.
-
-
The recommended method to populate LH_Groups is with Onelogin Roles.
-
Go to Parameters then click Add.
-
Set Field Name to
LH_Groups
. -
Check
Include in SAML assertion
. -
Check
Multi-value parameter
. -
Click Save.
-
Set Default value to
User Roles
. -
If you intend on filtering the Roles that are sent to lighthouse (using a Rule) set
no transform
otherwise setsemicolon delimited
. -
An example Rule to filter roles:
-
“Set LH_Groups in” for each
role
with a value that matches LH_.*. -
Save the parameter.
-
-
Save the connector.
IdP Metadata
-
Open your Onelogin application.
-
Go to More Actions > SAML Metadata. This is the metadata xml file that you require to configure lighthouse.
Configure Lighthouse
-
Copy the metadata xml to your primary lighthouse.
-
Using
saml-idp-metadata
on your primary lighthouse, configure each of your lighthouses to use your IdP., For examplesaml-idp-metadata -p {root password} create -m /path/to/metadata.xml -P onelogin -n "My Onelogin display name" -l {LH id number}
.
Roles Setup
After this initial setup, you will be able to login as a SAML user.
If you do not already have your own User Groups setup in Lighthouse:
-
Login to Lighthouse as a local user (or any non-SAML user) for example, root.
-
Create the User Groups with the Roles and Permissions that you require.
-
In Onelogin Go to Users > Roles.
-
Click New Role.
-
Set the Role’s name to match the lighthouse group you want it to map to.
-
Select your Lighthouse app to associate the role with.
-
Click Save.
-
-
Open the newly created role.
-
Go to the Users tab on the left.
-
Search for and add your users or create a mapping to automatically add multiple users.
-
Click Save.
-
If you used a mapping then go to Users > Mappings and run Reapply All Mappings.
-
-
Click Done
The assigned users are now able to login to Lighthouse with the permission levels that the Onelogin Role/Lighthouse group grants them.