SAML is the framework used to integrate applications with identity providers (IdP) for single sign-on (SSO). This is mostly (if not completely) reflected when a user logs in and authenticates with their IdP or is already logged in (if they have already authenticated with their identity provider prior to accessing Lighthouse).
Lighthouse supports the independent, concurrent use of both SAML and AAA authentication. SAML authentication is independent of, and does not interact with, other authentication methods.
Note: For release 21.Q4 SAML is only supported for authentication to the lighthouse Web GUI.
When SAML is configured and enabled, users can authenticate to the Lighthouse Web GUI either through SAML or another configured authentication mechanism such as Local or AAA. Users can SSH only via the other configured authentication mechanism (Local or AAA) if Remote Authentication is configured.
The default authentication is Local, with Lighthouse using locally defined users and groups. If AAA (TACACS, RADIUS or LDAP) Remote Authentication is configured, this will be used for Web GUI and SSH login authentication to Lighthouse (except for root which is always locally authenticated). Users are authenticated against AAA server(s) with group membership returned to Lighthouse, which is used to determine user roles and permissions. AAA Remote Authentication can support 2FA/MFA, depending on the AAA server capabilities.
Lighthouse supports SAML integration with the following identity providers:
- OKTA
- Azure Active Directory (Azure AD)
- One Login
Before you begin
Note: The following variables are used in the SAML configuration instructions below. Please replace them with the correct values for your environment.
{main lighthouse address}
- The address most users will use to connect to your primary Lighthouse web interface. e.g. lighthouse.example.com or 192.168.1.10{provider}
- Each IdP implements the specification slightly differently. Lighthouse needs to know which style to expect to handle these differences. If your IdP is not one of our official supported IdPs, try configuring Lighthouse using the generic provider option as the most widely applicable. You could also try using our other explicit IdP options, but these often expect provider-specific intricacies.
Please also review the limitations of the Lighthouse SAML SSO feature.
Generic IdP setup
Note: You must have your user groups setup in lighthouse prior creating & assigning them via the IdP. See the example in step 6 of the Okta configuration later in this topic.
Note: The {provider}
in the steps must exactly match one of our provider strings e.g. generic, okta, azure_ad, onelogin.
-
Create an application integration for “Lighthouse” in your IdP
-
Set ACS or consumer URL as
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/{provider}
-
Set the Allowed SSO URLs or Allowed redirect URLs or ACS URL Validator to include or match the
/saml/sso/
URL for each address of each of your lighthouses that you want users to be able to login from.Example:
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/{provider} https://{main lighthouse IP address}/api/v3.7/sessions/saml/sso/{provider} https://{secondary lighthouse address}/api/v3.7/sessions/saml/sso/{provider}
Depending on your IdP you may need to include the
/saml/sp_init/
URLs.https://{main lighthouse address}/api/v3.7/sessions/saml/sso/{provider} https://{main lighthouse address}/api/v3.7/sessions/saml/sp_init/{provider} https://{main lighthouse IP address}/api/v3.7/sessions/saml/sso/{provider} https://{main lighthouse IP address}/api/v3.7/sessions/saml/sp_init/{provider} https://{secondary lighthouse address}/api/v3.7/sessions/saml/sso/{provider} https://{secondary lighthouse address}/api/v3.7/sessions/saml/sp_init/{provider}
-
Set the Service Provider EntityID or Audience as
lighthouse-{provider}
-
If your service provider requires you to configure the Recipient
- And only allows a single value
- And you run multiple lighthouses or access lighthouse via multiple addresses
- Then either:
- Set the recipient as
lighthouse-{provider}
and use the onelogin option as your provider configuration. - Or if you only access each via a single address you could create a separate application integration per lighthouse.
- Set the recipient as
-
If your IdP has the option then set the initiator to the Service Provider
-
Set your IdP to sign the Assertion for SAML.
Generic IdP SAML Attribute
You will also need to configure your IdP to send an additional attribute LH_Groups as part of the SAML response.
In most IdPs this is done by adding an Attribute Statement or Parameter configuration in your application integration. This parameter should be set as a multi-value parameter i.e. multiple values should be provided by multiple duplicative either Attribute Value tags or Attribute tags in the SAML assertion.
We recommend setting the value of this attribute to be populated with the names of the user’s Roles (or Groups) in your IdP. This method allows you to create roles in your IdP with the same names as the user groups on your lighthouse that can be assigned in your IdP to grant users that level of access to Lighthouse.
Alternatively, you can populate the LH_Groups attribute with the names of the Lighthouse user groups the user should be granted by any other mechanism that your IdP provides. e.g. custom user properties
Note: Your IdP can populate the LH_Groups attribute to place users in any Lighthouse user group except Lighthouse’s default admin group. You can allow users to login with admin privileges by simply creating another user group in Lighthouse with the admin role and assigning the matching role/group in your IdP to the user. i.e. populate LH_Groups to include its value.
Lighthouse Setup
You will need to export an IdP metadata XML file for your Lighthouse application integration from your IdP. If your IdP requires that requests be signed by the Service Provider then you will also need to provide an x509 certificate & private key in .pem format (either exported from your IdP or created locally then configured in your IdP).
- Upload your IdP metadata XML (and if required certificate & private key) to your primary Lighthouse e.g. via SCP
- Use the
saml-idp-metadata
command to configure each Lighthouse individually. Each Lighthouse is configured individually with the same or a different metadata XML (and certificate + key).
Note: The commands to configure each Lighthouse individually, all must be run from your primary Lighthouse instance.
# Example: Configuring a Multi-Instance Lighthouse for Okta IdP
# List initial lighthouse configurations (i.e. none)
saml-idp-metadata list
# Configure Primary lighthouse
saml-idp-metadata create \
--metadata metadata.xml \
--provider okta \
--lh-id 1
#Configure Secondary lighthouse
saml-idp-metadata create \
--metadata metadata.xml \
--provider okta \
--lh-id 2
# List lighthouse configurations (i.e. both lighthouses configured)
saml-idp-metadata list
Example 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 the addresses of your Lighthouse isntances 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: e.g. Lighthouse
- Click Next
-
For the Single Sign On URL enter:
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/okta
- Tick both:
- Use this for Recipient URL and Destination URL
- Allow this app to request other SSO URLs
- Fill out the 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 Lighthouse instances.
Example:
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/okta https://{main lighthouse IP address}/api/v3.7/sessions/saml/sso/okta https://{secondary lighthouse address}/api/v3.7/sessions/saml/sso/okta
- Tick both:
-
For the Audience URI (SP Entity ID) enter
lighthouse-okta
-
Set Name ID format to email.
-
Set Application username 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 .*
- Name:
- Add a Group Attribute Statement
-
Click Next and finish.
IdP Metadata
In the Sign On tab for your Okta application, find the line:
Identity Provider metadata is available if this application supports dynamic configuration.
Open the link and save the page as an XML file (Recommended name: okta_metadata.xml
). 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 Lighthouse instances to use your IdP e.g.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
- 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) e.g. root Note: After this initial setup, you will be able to login as a SAML user.
- Create the User groups with the Roles and permission that you desire. See “10.1 Creating new users and groups templates” in the Lighthouse User manual.
- In Okta go to Directory > Groups
https://{main lighthouse address}/api/v3.7/sessions/saml/sso/okta
https://{main lighthouse IP address}/api/v3.7/sessions/saml/sso/okta
https://{secondary lighthouse address}/api/v3.7/sessions/saml/sso/okta
- 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
-
Go to Applications > Add App, then search for and choose SAML Custom Connector (Advanced)
-
Name your connector e.g. 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 regular expression that matches only all your Lighthouses’ SSO addresses (IP & DNS for primary & secondary Lighthouse instances).
- 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 addresses192.168.1.10
andlighthouse.example.com
, use the following:^https:\/\/(192\.168\.1\.10|lighthouse\.example\.com)\/api\/v3\.7\/sessions\/saml\/sso\/onelogin$
- Ensure it begins with
- 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
- Set Audience (EntityID) to
-
The recommended method to populate LH_Groups is with Onelogin Roles.
- Go to Parameters then click Add.
- Set Field Name to
LH_Groups
- Enable
Include in SAML assertion
- Enable
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 Lighthouse instances to use your IdP. e.g.saml-idp-metadata -p {root password} create -m /path/to/metadata.xml -P onelogin -n "My Onelogin display name" -l {LH id number}
Roles Setup
If you do not already have your own user groups set up in lighthouse:
- Login to Lighthouse as a local user (or any non-SAML user) i.e. root Note: After this initial setup, you will be able to login as a SAML user.
- Create the user groups with the roles and permissions that you desire. See “8.2 Creating new groups and roles” in the Lighthouse User Manual.
- 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.
- Save.
- Open your role.
- Go to the Users tab on the left.
- Search for and add your users or create a mapping to automatically add multiple users.
- Save.
- If you used a mapping then go to Users > Mappings and run Reapply All Mappings.
The assigned users are now able to login to lighthouse with the permission levels which that 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.
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 e.g. Lighthouse, then click Create
- Go to Properties
- Set Assignment required to
yes
- Set Enabled for users to sign-in to
yes
- Click Save
- Set Assignment required to
- 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 instance that you want to be able to sign in on. i.e. IP addresses and DNS address for both your primary and secondary Lighthouse instances.
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
- Add an Entity ID
- Edit Attributes & Claims
- Remove the default claims from Additional claims.
- Click Add new claim and Enter:
- Name:
LH_Groups
- Source Attributes:
user.assignedroles
- Name:
IdP Metadata
- Go to Azure Active Directory
- Go to Enterprise applications and open your application
- Go to Single sign-on
- In 3. SAML Signing Certificate 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 Lighthouse instances to use your IdP e.g.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
Note: If you do not already have your own user groups set up in Lighthouse: 1. Login to Lighthouse as a local user (or any non-SAML user) e.g. root Note: After this initial setup, you will be able to login as a SAML user. 2. Create the user groups with the roles and permission that you desire. See “8.2 Creating new groups and roles” in the Lighthouse User Manual.
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 user group on Lighthouse.
- Set Allowed member types to
Both (Users/Groups + Applications)
. - Set the other fields as you desire.
- Go to Azure Active Directory
- Go to Enterprise applications
- Open your App
- 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.
Limitations
IdP metadata certificate expiry
The IdP metadata XML file that you export to configure Lighthouse contains a certificate that is used to authenticate that SAML response came from your IdP. Different IdPs have different expiry periods for these certificates, consult your IdP’s documentation to find their expiry period. When your IdP’s certificate expires you will need to regenerate it then re-export your IdP metadata and update your lighthouse configurations. If your IdP supports sending expiry notifications to your admin, we recommend you enable these notifications.
User Permissions Changes
When you change the permissions assigned to a lighthouse user in your IdP (via LH_Groups SAML attribute), the changes will not take effect until the user logs out and back into lighthouse.
If you need to quickly restrict a user’s access, consider altering the permissions of or deleting that user’s user groups on Lighthouse. See Lighthouse user manual “8.3 Modifying existing groups”. You can also set a low Web Session Timeout. See Lighthouse user manual “5.9 Examine or modify Lighthouse Session Settings”.
SAML SSO Usergroups
The LH_Groups attribute can be used to place SSO users in any Lighthouse user group except Lighthouse’s default admin group. You can allow users to login with admin privileges by simply creating another user group in Lighthouse with the admin role and assigning the matching role/group in your IdP to the user. i.e. populate LH_Groups to include its value
SAML SSO Users
SAML Users can only be managed in your IdP and will not appear under Lighthouse User Management.
Comments
0 comments
Please sign in to leave a comment.