Examples of Specific IdP Setups
The following are examples of how you could configure officially supported IdPs. They are based on the above generic step and the IdP’s configuration options as of 10/2021.
Okta
Create an Application
You need to create an application that Okta will be doing authentication on behalf of.
Note:You’ll need to know what the addresses of your Lighthouses before creating the application.
-
In the Okta web console go to Applications - > Applications
-
Click Create App Integration
-
Select SAML 2.0
-
-
Give the application a name: for example, Lighthouse and click Next
-
For the Single sign on URL enter
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/okta
-
Select:
-
Use this for Recipient URL and Destination URL
-
-
Fill out the Other Requestable SSO URLs with the SSO URLs for every lighthouse address you want to be able to sign in with. i.e. IP addresses and DNS address for both your primary and secondary lighthouses.
Example:https://{main lighthouse ip}/api/v3.7/sessions/saml/sso/okta
https://{dependent lighthouse address}/api/v3.7/sessions/saml/sso/okta
https://{dependent lighthouse ip}/api/v3.7/sessions/saml/sso/okta
-
-
For the Audience URI (SP Entity ID) enter
lighthouse-okta
-
Set Name ID format to email.
-
Set to email.
-
There are many ways you could configure Okta to populate the
LH_Groups
attribute, our recommended way is to populate it from and manage it via the user’s Okta groups:-
Add a Group Attribute Statement
-
Name:
LH_Groups
-
Name Format:
Basic
-
Filter:
Matches Regex
.*
-
-
-
Click Next and finish.
IdP Metadata
-
Open your Onelogin application.
-
Go to More Actions > SAML Metadata. This is the metadata xml file that you will need to configure lighthouse.
Configure Lighthouse
-
Copy the Identity Provider metadata XML to your primary lighthouse.
-
Using
saml-idp-metadata
on your primary lighthouse, configure each of your lighthouses to use your IdP
For example:
saml-idp-metadata -p {root password} create -m /path/to/okta_metadata.xml -P okta -n "My Okta display name" -l {LH id number}
Groups 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) i.e. root
-
Create the User groups with the Roles and permission that you desire. See “Creating new user and group templates”.
-
In Okta go to Directory > Groups.
-
Click Add Group.
-
Enter the Group name that matches a Group name on lighthouse.
-
Open your new group.
-
Go to Manage Apps.
-
Search for your lighthouse app and click Assign.
-
Click Done.
-
Go to Manage People
-
Search for and click on the users you wish to add to the group.
The assigned users are now able to login to lighthouse with the permission levels which that group grants them.
Onelogin
Create an Application. You need 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 will need 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 Usergroups setup in lighthouse:
-
Login to Lighthouse as a local user (or any non-SAML user) for example, root.
-
Create the Usergroups with the Roles and permission that you desire. See Creating New Groups and Roles.
-
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.
Azure Active Directory
Lighthouse can be added as an Enterprise application to Azure Active Directory. This example uses “App roles” to grant users permissions.
To create an Application (Enterprise applications)
-
Go to Azure Active Directory.
-
Go to Enterprise applications.
-
Click New Application.
-
Click Create your own application.
-
Select Integrate any other application you don't find in the gallery (Non-gallery).
-
Name your Application, for example, Lighthouse, then click Create.
-
Click Properties
-
Set Assignment required to Yes.
-
Set Enabled for users to sign-in to Yes.
-
Click Save.
-
-
Go to Single sign-on
-
Select SAML
-
Edit Basic Configuration
-
Add an Entity Id lighthouse-azure_ad and set it as default.
-
In Reply URL (Assertion Consumer Service URL) add the SSO URL for each address of each lighthouse that you want to be able to sign in on. i.e. IP addresses and DNS address for both your primary and secondary lighthouses.
https://{primary lighthouse address}/api/v3.7/sessions/saml/sso/azure_ad https://{primary lighthouse IP address}/api/v3.7/sessions/saml/sso/azure_ad https://{secondary lighthouse address}/api/v3.7/sessions/saml/sso/azure_ad https://{secondary lighthouse IP address}/api/v3.7/sessions/saml/sso/azure_ad
-
Set Sign on URL to
https://{main lighthouse address}/api/v3.7/sessions/saml/sp_init/azure_ad
-
Click Save.
-
-
Edit Attributes & Claims
-
Remove the default claims from Additional claims.
-
Click Add new claim and Enter:
-
Name:
LH_Groups
-
Source Attributes:
user.assignedroles
-
-
-
IdP Metadata
-
Go to the Azure Active Directory.
-
Go to Enterprise applications and open your application.
-
Go to Single sign-on.
-
Navigate to 3. SAML Signing Certificate and find and download
Federation Metadata XML
.
Configure Lighthouse
-
Copy the Federation metadata XML to your primary lighthouse.
-
Using
saml-idp-metadata
on your primary lighthouse, configure each of your lighthouses to use your IdP as follows:
For example,saml-idp-metadata -p {root password} create -m /path/to/metadata.xml -P azure_ad -n "My Azure display name" -l {LH id number}
App Roles Setup
After this initial setup, you will be able to login as a SAML user. If you do not already have your own Usergroups setup in Lighthouse, you can set them up as follows:
-
Login to Lighthouse as a local user (or any non-SAML user) i.e. root
-
Create the Usergroups with the Roles and permission required. See Creating New Groups and Roles.
See Add app roles and get them from a token - Microsoft identity platform for up to date documentation on how to create and assign App Roles.
-
Go to Azure Active Directory.
-
Go to App registrations.
-
Open your app (Use the All Applications tab to see Enterprise apps).
-
Go to App Roles.
-
Click Create App Role.
-
Set the value to match your usergroup on Lighthouse.
-
Set Allowed member types to
Both (Users/Groups + Applications)
. -
Set the other fields as required.
-
-
Go to Azure Active Directory.
-
Go to Enterprise applications.
-
Open your App, that is, Lighthouse.
-
Go to Users and groups.
-
Click Add user/group.
-
Select a user and one of your App roles then click Assign.
The assigned users are now able to login to lighthouse with the permission levels which that App Role/Lighthouse group grants them.