Configuration of Keeper Connection Manager Authentication methods
Keeper Connection Manager supports multiple authentication mechanisms which can be enabled through installing additional packages.
For Advanced Linux Install method, packages are available through the Keeper Connection Manager repository and automatically place the necessary Apache Guacamole extension within /etc/guacamole/extensions
and any necessary dependencies (such as database drivers) within /etc/guacamole/lib
.
The "Test Installation" using the user-mapping.xml
file is meant as a quick means of verifying the functionality of Guacamole but is not supported for production deployments.
Ensure that a production-ready authentication mechanism is configured prior to deploying Keeper Connection Manager.
All authentication methods packaged listed below are production-ready:
Using a database like MySQL, PostgreSQL, or SQL Server enables additional features within Keeper Connection Manager, including connection sharing and a web-based administration interface. The LDAP authentication allows authentication to be provided through an LDAP directory such as OpenLDAP or Active Directory, and can be combined with a database, thus avoiding the need to store connections within the LDAP directory using schema modifications.
If you wish to enable multi-factor authentication in front of Keeper Connection Manager, you may do so with Duo or TOTP. Multi-factor authentication is supported in front of any of the above production-ready authentication mechanisms, however keep in mind that a database is always required for TOTP:
Important Note: MFA cannot be activated if the SAML authentication method is already active.
Instructions for authenticating users with a SAML 2.0 / SSO Identity Provider
This documentation assumes that you already have access to a SAML 2.0 Identity Provider, such as Microsoft Azure, Okta, JumpCloud, Ping, AD FS, etc. If you do not already have Guacamole installed, please see the installation instructions.
Keeper Connection Manager can be configured to authenticate users with any SAML 2.0 compatible identity provider. Users can be forced to login with SAML, or you can make SAML an optional login link from the home screen.
Instructions for popular Identity Providers is below.
Microsoft AzureOktaGoogle WorkspaceKeeper Connection Manager SAML configuration with Microsoft Azure
The first step regardless of installation method is to configure your SAML 2.0 identity provider using Microsoft Azure.
(1) In Azure, go to Enterprise Applications and Create a new application.
(2) Give the Enterprise Application a name, and then select "non-gallery" application.
(3) Set up Single Sign On with SAML.
(4) Configure for SAML
(5) Set up the SAML properties to point Azure to your Keeper Connection Manager installation URL:
(6) To support Azure Group to Keeper Connection Manager User Group mappings, you can add a Group claim by editing the Attributes & Claims then adding a Group Claim.
When prompted, you can decide whether the group claim is always sent, or only for specific groups or assigned users.
(7) Assign users and/or groups to the Keeper Connection Manager application, as you would normally do with any SAML connected app.
(8) Download the Azure Metadata file and save to your local machine as metadata.xml
The Azure side of the setup is complete. Note if you change anything, you need to re-download a new metadata.xml file.
(9) Add the KCM Logo
From the "Properties" screen of the Enterprise Application, upload the KCM logo. The file can be downloaded below.
Here's how the logo will look:
If you have installed Keeper Connection Manager using the advanced linux install method, setting up SAML can be performed following the steps below.
Keeper Connection Manager packages Guacamole’s SAML support within the kcm-guacamole-auth-sso-saml
package:
Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to point the SAML installation:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “SAML-1” and defines the IdP configuration. Uncomment the saml-idp-metadata-url
and saml-entity-id
property. You'll need to reference the IdP's metadata file and Entity ID.
The second section contains the callback URL that is used by the IdP. This is typically set to the user-facing URL of the Keeper Connection Manager service.
The 3rd section contains the SAML group attribute that can be used for mapping IdP Groups to Keeper Connection Manager Groups. This is useful for assigning permissions to Connections based on a Group attribute from your identity provider. The below example is referencing a Microsoft Azure configuration.
The 4th section contains optional parameters that can be set.
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
Once you have activated the SAML module, there will be a new "Sign in with SAML" link on the login screen of the application as seen below:
When setting up your user identities in the Settings area, if you would like a user to login with SAML / SSO, just leave the "password" field empty.
If you would like to automatically mapping Group assignments in the identity provider to Keeper Connection Manager Groups, ensure that the saml-group-attribute
parameter is defined to match the Identity Provider Group Attribute. The name of the Group in Keeper Connection Manager needs to match this identifier exactly in order for the mapping to work.
If the group name attribute from the identity provider is not easy to read, this may end up requiring you to create Group Names that look like below:
Keeper Connection Manager SAML configuration with Okta
The first step regardless of installation method is to configure your SAML 2.0 identity provider using Okta.
(1) In Okta, go to Admin > Applications > Create App Integration and select SAML 2.0. Click Next.
(2) Give the Enterprise Application a name and upload the logo file linked below then click Next.
The image logo is here:
(3) Configure the SAML Settings
The SAML configuration should match the format as seen below:
Replace demo3.lurey.com
with the URL of your Keeper Connection Manager domain.
Ensure the full path appears, e.g. https://DOMAIN/api/ext/saml/callback
For the Audience URI, use the path to the Login screen (remove the trailing slash). For example, https://demo3.lurey.com
Scroll down to the Group Attribute Statements. To send the group attribute, set the name to "groups
", and the name format to "Basic
". If you would like ALL groups assigned to the user to be sent to Keeper Connection Manager, select the "Matches regex
" with a value of ".*
"
Click Next.
(4) In the Feedback section, make the selections as appears below.
(5) Assign users and/or groups to the Keeper Connection Manager application, as you would normally do with any SAML connected app.
(6) Download the Okta Metadata file and save to your local machine as metadata.xml
The location of the metadata file depends on your version of the Okta interface. In this example there is a link called "Identity Provider metadata" on the application page. There may also be a text box that contains the metadata which you can copy and paste into a local file on your computer.
The metadata XML file could also be linked in the Sign On tab > SAML Signing Certificate section under "Actions".
Save the resulting metadata.xml file by selecting "Save page as..." in your browser.
The Okta side of the setup is complete. Note if you change anything, you need to re-download a new metadata.xml file.
If you have installed Keeper Connection Manager using the advanced linux install method, setting up SAML can be performed following the steps below.
Keeper Connection Manager packages Guacamole’s SAML support within the kcm-guacamole-auth-sso-saml
package:
Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to point the SAML installation:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “SAML-1” and defines the IdP configuration. Uncomment the saml-idp-metadata-url
and saml-entity-id
property. You'll need to reference the IdP's metadata file and Entity ID.
The second section contains the callback URL that is used by the IdP. This is typically set to the user-facing URL of the Keeper Connection Manager service.
The 4th section contains optional parameters that can be set.
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
Once you have activated the SAML module, there will be a new "Sign in with SAML" link on the login screen of the application as seen below:
When setting up your user identities in the Settings area, if you would like a user to login with SAML / SSO, just leave the "password" field empty.
If you would like to automatically mapping Group assignments in the identity provider to Keeper Connection Manager Groups, simply create a matching group name with the proper assignments. The name of the Group in Keeper Connection Manager needs to match this identifier exactly in order for the mapping to work.
Keeper Connection Manager SAML configuration with Google Workspace
The first step regardless of installation method is to configure your SAML 2.0 identity provider using Google Workspace.
(1) Login to Google Workspace at https://admin.google.com****
Visit the Apps > Web and Mobile Apps screen.
(2) Select "Add App" and select "Add Custom SAML App".
Enter an application name and description. You can also upload a Keeper Connection Manager logo. The image logo is here:
Click Continue.
(3) Download the metadata.xml file
...and then click Continue
(4) Configure the SAML Settings
Update 3 fields: ACS URL, Entity ID and Name ID format.
The ACS URL needs to start with your Keeper Connection Manager domain followed by "/api/ext/saml/callback
".
The Entity ID is just the Keeper Connection Manager domain.
The Name ID format must be EMAIL
Click Continue.
(5) Assign group membership (Optional)
You can now assign Group Membership to the Keeper Connection Manager application, which is optional. If you would like to assign a group, make sure that the "App Attribute" is groups
(lowercase). Then click FINISH.
(6) Enable Access
After creating the SAML app, it is not yet active for all users. To enable access, click on View details and turn the application ON.
The Google Workspace side of the setup is complete. Note if you change anything, you need to re-download a new metadata.xml file.
If you have installed Keeper Connection Manager using the advanced linux install method, setting up SAML can be performed following the steps below.
Keeper Connection Manager packages Guacamole’s SAML support within the kcm-guacamole-auth-sso-saml
package:
Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to point the SAML installation:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “SAML-1” and defines the IdP configuration. Uncomment the saml-idp-metadata-url
and saml-entity-id
property. You'll need to reference the IdP's metadata file and Entity ID.
The second section contains the callback URL that is used by the IdP. This is typically set to the user-facing URL of the Keeper Connection Manager service.
The 4th section contains optional parameters that can be set.
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
Once you have activated the SAML module, there will be a new "Sign in with SAML" link on the login screen of the application as seen below:
When setting up your user identities in the Settings area, if you would like a user to login with SAML / SSO, just leave the "password" field empty.
If you would like to automatically mapping Group assignments in the identity provider to Keeper Connection Manager Groups, simply create a matching group name with the proper assignments. The name of the Group in Keeper Connection Manager needs to match this identifier exactly in order for the mapping to work.
Integrating TOTP based authentication for 2FA
Keeper Connection Manager provides support for TOTP as a second authentication factor, verifying the identities of enrolled users using authentication codes generated with the TOTP standard. To make use of TOTP support, a database authentication mechanism will need be configured, as well, such as MySQL or PostgreSQL. Only once authentication has succeeded through another installed method will TOTP be used to verify the identity of the user, and a database is specifically required for storage of the key that Guacamole and the user's authentication device will use to generate authentication codes.
Keeper Connection Manager packages Guacamole’s TOTP support within the kcm-guacamole-auth-totp package:
The Guacamole-side installation of TOTP support within Keeper Connection Manager consists solely of the kcm-guacamole-auth-totp package. Nothing else needs to be installed except for Guacamole itself and some other means of authentication. If Guacamole has not yet been installed and confirmed to work with a database authentication method, that should be done first before attempting to set up TOTP.
Unlike most other extensions, no additional configuration information is typically needed for the TOTP support to work. All configurable values have defaults which are accepted by widely used TOTP implementations like Google Authenticator. You will only need to specify additional configuration information if your authentication devices differ from these defaults:
Code length
6 digits
Validity period
30 seconds
Hash algorithm
SHA-1
If the above are acceptable, then no configuration changes need to be made and you should proceed to the "Completing installation" section below. If any of the above need to be changed, you will need to edit /etc/guacamole/guacamole.properties
to specify the appropriate values. These properties are documented separately in detail:
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
After TOTP support has been installed and Guacamole has been restarted, only users that exist within the database will automatically be enrolled in TOTP. Valid users that exist only outside the database will be able to log in, but will not be automatically enrolled with TOTP.
If you are using a database alongside LDAP or Active Directory and want to require all users to use TOTP, you should be sure to set the corresponding property within /etc/guacamole/guacamole.properties
to enforce existence of database accounts for all logins. Each supported database has its own variant of this property:
MySQL / MariaDB
PostgreSQL
SQL Server
This is particularly important if the database's concept of identity may differ from your LDAP server's concept of identity. For example, usernames within PostgreSQL are case-sensitive, but usernames within Active Directory typically are not.
Integrating Duo with Keeper Connection Manager for 2FA/MFA
Keeper Connection Manager provides support for Duo as a second authentication factor, automatically verifying user identity with Duo after the user is initially authenticated. To make use of Duo support, some other authentication mechanism will need be configured, as well, such as MySQL, PostgreSQL, or LDAP. Only once authentication has succeeded through another installed method will Duo be used to verify the identity of the user.
Keeper Connection Manager packages Guacamole’s Duo support within the kcm-guacamole-auth-duo package:
The Guacamole-side installation of Duo support within Keeper Connection Manager consists solely of the kcm-guacamole-auth-duo package. Nothing else needs to be installed except for Guacamole itself and some other means of authentication. If Guacamole has not yet been installed and confirmed to work with some other authentication method, that should be done first before attempting to set up Duo.
For Duo to be integrated with any application, that specific instance of the application must first be registered with the Duo service. Duo does not provide a specific integration option for Guacamole, but Guacamole’s Duo support uses Duo’s generic authentication API which they refer to as the “Web SDK”. To use your Guacamole deployment with Duo, you will need to add it to your Duo account as a new “Web SDK” application from within the “Applications” tab of the admin panel.
Once this has been done, Duo will expose several properties specific to your Guacamole deployment: the integration key, secret key, and API hostname. These values can be found within the application’s “Details” section in your Duo account, and will need to be copied into /etc/guacamole/guacamole.properties
:
The relevant properties can be found in the “DUO-1” section:
The Duo “Web SDK” requires that an arbitrary and random key be generated for each application. This key resides strictly on the side of the application, and is not registered with Duo.
Any random value containing at least 40 characters will suffice. To quickly grab 40 random characters from /dev/random
:
This value must then be copied within the duo-application-key property, which can be found in the "DUO-2" section of guacamole.properties
:
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
Instructions for authenticating users with OpenID Connect
This documentation assumes that you already have access to an OpenID Connect identity provider, such as Google, Okta, Azure, etc. If you do not already have Guacamole installed, please see the installation instructions.
Keeper Connection Manager packages Guacamole’s OpenId Connect support within the kcm-guacamole-auth-sso-openid
package:
Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to point the OpenID Connect installation:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “OPENID-1” and defines the IdP configuration. Uncomment the properties in this section and edit them according to your identity provider setup.
The second section contains the Keeper Connection Manager server information that is used by the IdP.
The 3rd section contains the OpenID Connect identity mappings.
The 4th section contains optional parameters that can be set.
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
Instructions for authenticating users with LDAP
This documentation assumes that you already have access to an LDAP directory, such as OpenLDAP or Active Directory, and that Guacamole has already been installed using Keeper Connection Manager. If you do not already an LDAP directory ready, please set up LDAP before proceeding. If you do not already have Guacamole installed, please see the installation instructions.
Keeper Connection Manager packages Guacamole’s LDAP support within the kcm-guacamole-auth-ldap package:
Unlike the MySQL, PostgreSQL, SQL Server and authentication backends, Guacamole’s LDAP support does not require a schema to be applied unless you intend to store connection data within your LDAP directory. If LDAP will be used only to authenticate Guacamole users, no schema modifications need be made, and a database should be used to store connection data.
If you do intend to store connection data within your LDAP directory, you will need to apply the provided schema modifications which create the guacConfigGroup
object class. Be sure to first finish configuring Guacamole for LDAP authentication, and verify that Guacamole can successfully authenticate users against your LDAP directory.
Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to point the LDAP directory:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “LDAP-1” and defines the TCP connection information for the LDAP directory. Uncomment the ldap-hostname property, modifying its value to point to your LDAP server:
By default, Guacamole will connect to your LDAP server without encryption. If your LDAP server uses encryption, you will need to uncomment and set the ldap-encryption-method property to “ssl” for LDAPS (LDAP over SSL/TLS) or “starttls” for STARTTLS.
The default port varies by encryption method, and will be 389 for unencrypted LDAP and STARTTLS, or 636 for LDAPS. If your LDAP server listens on a non-standard port, you will also need to uncomment and modify the ldap-port property.
To authenticate users using LDAP, Guacamole must translate usernames into their corresponding LDAP DN’s. Depending on the complexity of your LDAP directory, this can be as simple as adding a single attribute to a common base DN, or can involve an LDAP query.
The “LDAP-2” section defines the basic parameters required for either case:
The base DN defined by the ldap-user-base-dn property should be the common base shared by all Guacamole users within your LDAP directory, while the attribute which contains the user’s username is defined by ldap-username-attribute. The base DN is always required if LDAP is being used.
By default, Guacamole will attempt to derive the user’s DN directly by prepending the username attribute to the base DN. For example, assume a user is attempting to login with the username “someUser”. If the base DN is “ou=people,dc=example,dc=net” and the username attribute is “uid” (the default), then Guacamole will perform the following steps to authenticate the user:
Prepend the username to the base DN using the “uid” attribute, producing the DN: “uid=someUser,ou=people,dc=example,dc=net”.
Attempt to bind using the DN “uid=someUser,ou=people,dc=example,dc=net” and the password provided by the user.
If the bind attempt succeeds, authentication is successful.
For more complex cases, where the user DN is cannot be directly derived by prepending the username attribute, Guacamole can instead issue an LDAP query to determine the user DN. This requires a search DN and password, defined with the ldap-search-bind-dn and ldap-search-bind-password properties respectively, which Guacamole will bind as when performing the query:
With the search DN and password configured, Guacamole will perform the following steps to authenticate a user:
Bind to the LDAP directory using the search DN and password.
Issue an LDAP query for objects within the subtree of the base DN that contain the user’s username within the defined username attribute.
If exactly one such object is found, attempt to bind using the DN of that object and the password provided by the user.
If the bind attempt succeeds, authentication is successful.
Access to connections within Guacamole may be dictated through LDAP user groups via either of two mechanisms:
Defining connections directly within LDAP using schema modifications and dictating group access using the "seeAlso" attribute.
Mapping LDAP groups to Guacamole groups and leveraging a database to dictate access.
As it is usually preferable to avoid modifying the LDAP schema, mapping LDAP groups to Guacamole groups is recommended. Doing this will require defining the base DN under which all relevant LDAP groups may be found and defining the LDAP attribute that should be used by Guacamole to determine the unique name of the group:
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
If you require the use of a custom Root Certificate for your LDAP server, you can volume mount the file /etc/pki/ca-trust/extracted/java/cacerts in your Docker Compose to override this certificate in the guacamole docker container.
Import the certificate into a Java truststore using "keytool".
Volume mount the cacerts file to your target guacamole docker container
For Advanced Linux Install method leveraging the RPMs, this would be accomplished through Red Hat's automated certificate import tooling following this guide.
This documentation assumes that you have already configured Guacamole to use LDAP for authentication. If have not already done so, please configure Guacamole for LDAP authentication before proceeding.
guacConfigGroup
object classWhen connection data is stored within your LDAP directory, each connection is represented by a special type of LDAP group, and permissions related to Guacamole connections can be managed directly with LDAP based on user membership of these groups. Doing this requires schema modifications which add a new object class called guacConfigGroup
.
An LDIF file defining the schema changes in a manner compatible with OpenLDAP is provided by the kcm-guacamole-auth-ldap package within /opt/keeper/share/guacamole-auth-ldap/schema/guacConfigGroup.ldif
. This file can be applied to your OpenLDAP server using the “ldapadd” command:
Once this is done, connections can be defined by creating new guacConfigGroup
objects within the LDAP directory. Each guacConfigGroup
accepts a single guacConfigProtocol attribute, defining the protocol associated with the connection, and any number of guacConfigParameter attributes, each defining a connection parameter name/value pair. Users that should have access to the connection must be added as members of the guacConfigGroup
using the member attribute.
For example, a connection accessible to two users which uses VNC to connect to localhost at port 5900 with the password “secret” could be defined with the following LDIF file:
To read connection data from LDAP, Guacamole’s main configuration file, modify the /etc/kcm-setup/docker-compose.yml
file.
The base DN of all connections defined within LDAP must be specified using the LDAP_CONFIG_BASE_DN property. This base DN should be the DN of the portion of the LDAP directory whose subtree contains all Guacamole connections accessible via LDAP. Only connections defined within the subtree of this base DN will be visible:
To read connection data from LDAP, Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to define the subtree containing these connections:
The base DN of all connections defined within LDAP must be specified using the ldap-config-base-dn property. This base DN should be the DN of the portion of the LDAP directory whose subtree contains all Guacamole connections accessible via LDAP. Only connections defined within the subtree of this base DN will be visible:
To control group membership using LDAP, modify the /etc/kcm-setup/docker-compose.yml
file.
It is also possible grant entire groups access to connections using the seeAlso attribute. This attribute is a standard LDAP attribute, and will be taken into account by Guacamole if the LDAP_GROUP_BASE_DN property is defined. This property defines the root of the subtree containing all groups which may apply to Guacamole users authenticated using LDAP:
It is also possible grant entire groups access to connections using the seeAlso attribute. This attribute is a standard LDAP attribute, and will be taken into account by Guacamole if the ldap-group-base-dn property is defined. This property defines the root of the subtree containing all groups which may apply to Guacamole users authenticated using LDAP:
Changes to Guacamole’s LDAP configuration will generally only be reread from guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
If multiple authentication methods are installed, Guacamole will poll each method as it attempts to authenticate users, and will retrieve connection data from each method once a user has successfully authenticated. This behavior is designed to allow authentication methods to work together, and can be leveraged to authenticate Guacamole users against LDAP while storing the connection data for those users within MySQL, PostgreSQL, or SQL Server.
When reading data from multiple authentication methods, Guacamole compares the unique identifiers of users (usernames) and groups to determine identity. This means that user accounts from different authentication systems will be automatically combined by Guacamole upon successful authentication as long as those user accounts have the same username, and group memberships will take effect across authentication systems so long as the unique names of those groups match.
If both LDAP and a database authentication method have been configured, Guacamole will automatically attempt to authenticate against both systems whenever a user attempts to log in. The LDAP account will be considered equivalent to the database user if the username is identical, and that user will have access to any data associated with them via the database, as well as any visible objects within the LDAP directory. If that user has permission to query their group memberships within LDAP, and Guacamole has been configured to query groups within LDAP, then the user's group membership will also be retrieved upon authentication, and the user will have access to any data associated with those groups via the database.
Rather than having to manually look up users or groups within the LDAP directory, and then manually create those same users and groups within Guacamole, it is possible to set up administrative user accounts which can already see and manage available LDAP objects. This streamlines the administrative process, reducing the number of users which must be manually created to one.
To see LDAP objects within Guacamole’s administrative interface, one of the following tasks must be performed:
An administrative user within the Guacamole database, such as the default “guacadmin” user, must be manually created within LDAP with the same username and with sufficient privileges to query all Guacamole users and groups defined within LDAP.
An administrative user must be manually created within Guacamole having the same username as an LDAP user with sufficient privileges to query all Guacamole users and groups defined within LDAP.
Because a Guacamole user created as defined above would have access to LDAP users and groups, database users and groups, and database connections, all of this data will be unified within the same administrative interface within Guacamole. The user will be able to grant LDAP users and groups access to connections within the database to just as they would if only the database were in use.
If your Active Directory or LDAP deployment spans multiple servers, Guacamole can be configured to use each of your LDAP servers using ldap-servers.yml
, a configuration file similar to guacamole.properties
and located within /etc/guacamole
. When a user authenticates with a Guacamole instance configured to use multiple LDAP servers, each configured LDAP server is tried, in order, until authentication succeeds. Authentication fails only if none of the defined LDAP servers accept the user's provided credentials.
When ldap-servers.yml
is used, the values within guacamole.properties
still have meaning, but instead serve as defaults for the LDAP servers defined in ldap-servers.yml
.
ldap-servers.yml
The ldap-servers.yml
file contains a single YAML list of LDAP servers, with each server definition consisting of a simple list of configuration properties and values. These configuration properties are identical to the LDAP properties available within guacamole.properties
except that the "ldap-" prefix is omitted.
For example, a simple ldap-servers.yml
that defines two LDAP servers that may be used to authenticate users would contain the following:
When a user attempts to log in, Guacamole will attempt to authenticate the user against the first defined LDAP server (server1.example.net
). If that fails, Guacamole will proceed with the next (server2.example.net
), and so on. Only if authentication fails against all defined LDAP servers will authentication against LDAP fail overall.
Since the only property that varies between the two servers in the above example is the hostname, and since guacamole.properties
serves as the source of default values when ldap-servers.yml
is used, the configuration details common to all servers would be better specified within guacamole.properties
:
The contents of ldap-servers.yml
can then be reduced to only the hostnames:
LDAP servers listed within ldap-servers.yml
may optionally be restricted to only certain users with the "match-usernames
" option. This option accepts both a single string and an array of strings, where each string is a Perl-compatible regular expression. Additionally, if the regular expression includes a capturing group, the contents of the first capturing group will be used as the username representing the user's Guacamole identity.
For example, to define two LDAP servers covering distinct domains, splitting usage of those LDAP servers by whether the user enters their username as "DOMAIN1\username" or "DOMAIN2\username", you would edit your ldap-servers.yml
to contain something like the following:
Each of the LDAP servers defined above will only be used if their corresponding regular expression matches the username specified by the user. Since each of the regular expressions in the above example define a capturing group around the username component of the "DOMAIN\username" format, that portion of the provided username will be used to determine the user's identity. If a user successfully authenticates as "DOMAIN1\myusername", then:
The captured portion ("myusername") will be used to identify the user's corresponding account in Guacamole's database.
The captured portion ("myusername") will be used when mapping the user to their fully-qualified LDAP DN.
If there are multiple username formats that need to be accepted by each LDAP server, multiple regular expressions may be specified. For example, to match both "MYDOMAIN\myusername" and the UPN-style "myusername@mydomain.example.net" formats, you would specify:
Instructions for integrating Keeper Connection Manager and Guacamole with MySQL
This documentation assumes that you already have access to a MySQL server or hosted MySQL database, and that Guacamole has already been installed using Keeper Connection Manager. If you do not already a MySQL server ready, please set up a MySQL or MariaDB instance before proceeding. If you do not already have Guacamole installed, please see the installation instructions.
If you haven’t already done so, a database specific to Guacamole needs to be created within MySQL. The database can be called anything you like; all that matters is that the database be dedicated to Guacamole, and not shared by different applications. Get to the MySQL prompt with the command:
Next, create the database:
Then exit MySQL with the "exit" command.
Guacamole will not automatically initialize the database with the required schema. You will need to do this yourself using the SQL scripts provided with the kcm-guacamole-auth-jdbc-mysql package, which are located within the /opt/keeper/share/guacamole-auth-jdbc-mysql/schema
directory:
001-create-schema.sql
Creates all tables and indexes which are required for the MySQL authentication extension to function.
002-create-admin-user.sql
Creates a default administrative user, “guacadmin”, with password “guacadmin”. These credentials will need to be changed once MySQL authentication is confirmed to be working.
The above scripts must be run in sequence, as it is the first script which actually creates the database schema. The second script, which defines a default administrative user, can only successfully run if the tables created by the first script exist. The simplest way to run both scripts in sequence is to concatenate them:
Alternatively, the scripts can be run individually, as long as the order is correct:
To execute queries against the database, Guacamole will need its own database user with sufficient privileges. Because Guacamole does not automatically apply or update its own schema, the required privileges are minimal, dealing only with creation and maintenance of data within already-defined tables and indexes:
Keeper Connection Manager packages Guacamole’s MySQL support within the kcm-guacamole-auth-jdbc-mysql package. This package must be installed before creating Guacamole’s database within MySQL, as it includes the SQL scripts necessary for doing so:
Guacamole's main configuration file, /etc/guacamole/guacamole.properties
, must now be modified to specify the credntials of the MySQL user and to point the MySQL database:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked "JDBC-1" and defines the TCP connection information for the database in use. Uncomment the mysql-hostname and mysql-port properties, modifying their values to point to your MySQL server:
The "JDBC-2" section, which defines the database name and associated credentials, must also be modified to specify the correct database name, username, and password. These values are given with the mysql-database, mysql-username, and mysql-password properties respectively:
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
To make sure everything is working as expected, you should also visit your Guacamole instance with a web browser (most likely at http://HOSTNAME:8080/guacamole/
, where “HOSTNAME” is the hostname or IP address of your server). If all is working correctly, you should see a login screen with a username/password prompt, and you will be able to log in using the default account created with the 002-create-admin-user.sql
script:
Password:
guacadmin
Once you have verified that you can log in successfully, you should immediately change the password. While logged into Keeper Connection Manager, you can access the built-in password changing interface by clicking on your username in the upper-right corner of the screen and selecting “Settings”.
CentOS and RHEL both provide a package for the MariaDB database server called "mariadb-server". Installing this package will install a version of MariaDB that is explicitly supported by Keeper Connection Manager. If you do not have an existing database instance or third-party database hosting provider that you would prefer to use, installing a fresh instance of MariaDB for use by Guacamole will work nicely:
As with other standard CentOS / RHEL packages providing a service, the MariaDB service will not be started by default after the "mariadb-server" package is installed. It must be started manually, and then configured to automatically start if the system is rebooted:
If MariaDB is installed locally (on the same server as Apache Guacamole), its default configuration will prevent Guacamole from authenticating. This is due to the way that MariaDB handles authentication and anonymous database users: if an anonymous user is defined for the same hostname/address, MariaDB will use only the anonymous user, and authentication using a non-anonymous user and password from the same hostname/address will fail.
This can be checked by querying MariaDB's user table directly:
Any users with empty usernames in the results of the above query are anonymous users which may block authentication from succeeding:
Dropping those users should allow non-anonymous authentication from those same hosts to succeed:
Once MariaDB has been deployed, you should move forward with configuring Guacamole to use your new MariaDB instance. This process is documented in its entirety, and the default /etc/guacamole/guacamole.properties
file also contains placeholders and comments to help guide administrators to the correct configuration properties. Overall, the process will involve:
Installing the package providing MySQL / MariaDB support (kcm-guacamole-auth-jdbc-mysql
).
Creating a new database within your MariaDB instance using the provided schema files.
Creating a database user that Guacamole can use to execute queries against your database.
Editing /etc/guacamole/guacamole.properties
to point Guacamole at your database (and to specify the credentials of the database user it should use).
Instructions for integrating Keeper Connection Manager and Guacamole with PostgreSQL
This documentation assumes that you already have access to a PostgreSQL server or hosted PostgreSQL database, and that Guacamole has already been installed using Keeper Connection Manager. If you do not already a PostgreSQL server ready, please set up a PostgreSQL instance before proceeding. If you do not already have Guacamole installed, please see the installation instructions.
If you haven’t already done so, a database specific to Guacamole needs to be created within PostgreSQL. The database can be called anything you like; all that matters is that the database be dedicated to Guacamole, and not shared by different applications:
Guacamole will not automatically initialize the database with the required schema. You will need to do this yourself using the SQL scripts provided with the kcm-guacamole-auth-jdbc-postgresql package, which are located within the /opt/keeper/share/guacamole-auth-jdbc-postgresql/schema
directory:
001-create-schema.sql
Creates all tables and indexes which are required for the PostgreSQL authentication extension to function.
002-create-admin-user.sql
Creates a default administrative user, “guacadmin”, with password “guacadmin”. These credentials will need to be changed once PostgreSQL authentication is confirmed to be working.
The above scripts must be run in sequence, as it is the first script which actually creates the database schema. The second script, which defines a default administrative user, can only successfully run if the tables created by the first script exist. The simplest way to run both scripts in sequence is to concatenate them:
Alternatively, the scripts can be run individually, as long as the order is correct:
To execute queries against the database, Guacamole will need its own database user with sufficient privileges. Because Guacamole does not automatically apply or update its own schema, the required privileges are minimal, dealing only with creation and maintenance of data within already-defined tables and indexes:
Keeper Connection Manager packages Guacamole’s PostgreSQL support within the kcm-guacamole-auth-jdbc-postgresql package. This package must be installed before creating Guacamole’s database within PostgreSQL, as it includes the SQL scripts necessary for doing so:
Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must now be modified to specify the credentials of the PostgreSQL user and to point the PostgreSQL database:
The guacamole.properties
file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “JDBC-1” and defines the TCP connection information for the database in use. Uncomment the postgresql-hostname and postgresql-port properties, modifying their values to point to your PostgreSQL server:
The “JDBC-2” section, which defines the database name and associated credentials, must also be modified to specify the correct database name, username, and password. These values are given with the postgresql-database, postgresql-username, and postgresql-password properties respectively:
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process.
To make sure everything is working as expected, you should also visit your Guacamole instance with a web browser (most likely at http://HOSTNAME:8080/guacamole/
, where “HOSTNAME” is the hostname or IP address of your server). If all is working correctly, you should see a login screen with a username/password prompt, and you will be able to log in using the default account created with the 002-create-admin-user.sql
script:
Password:
guacadmin
Once you have verified that you can log in successfully, you should immediately change the password. While logged into Keeper Connection Manager, you can access the built-in password changing interface by clicking on your username in the upper-right corner of the screen and selecting “Settings”.
Instructions for installing PostgreSQL in Guacamole for Authentication
CentOS and RHEL both provide a package for the PostgreSQL database server called "postgresql-server". Installing this package will install a version of PostgreSQL that is explicitly supported by Keeper Connection Manager. If you do not have an existing database instance or third-party database hosting provider that you would prefer to use, installing a fresh instance of PostgreSQL for use by Guacamole will work nicely:
As with other standard CentOS / RHEL packages providing a service, the PostgreSQL service will not be started by default after the "postgresql-server" package is installed. However, if you attempt to start the PostgreSQL service now, the service will fail to start as PostgreSQL's database has not yet been created and initialized. This must be done manually with the "postgresql-setup" command:
Once the database has been initialized, the service can be safely started and configured to start automatically if the system is rebooted:
If PostgreSQL is installed locally (on the same server as Apache Guacamole), its default configuration will prevent Guacamole from authenticating. This is because PostgreSQL can be configured to use different authentication mechanisms for connections coming from different networks or addresses, and the default configuration uses "ident" authentication for connections from the local machine. The "ident" method is incompatible with providing a database username and password via TCP, which will result in Guacamole being unable to connect to PostgreSQL.
Edit PostgreSQL's main configuration file, /var/lib/pgsql/data/pg_hba.conf
, looking for the lines which associate IPv4 or IPv6 loopback addresses with "ident":
The keyword ident
should be changed to md5
to allow username/password authentication for local connections:
PostgreSQL will then need to be restarted to apply these changes:
Once PostgreSQL has been deployed, you should move forward with configuring Guacamole to use your new PostgreSQL instance. This process is documented in its entirety, and the default /etc/guacamole/guacamole.properties
file also contains placeholders and comments to help guide administrators to the correct configuration properties. Overall, the process will involve:
Installing the package providing PostgreSQL support (kcm-guacamole-auth-jdbc-postgresql
).
Creating a new database within your PostgreSQL instance using the provided schema files.
Creating a database user that Guacamole can use to execute queries against your database.
Editing /etc/guacamole/guacamole.properties
to point Guacamole at your database (and to specify the credentials of the database user it should use).
This documentation assumes that you already have access to a SQL Server database, either on a server of your own or hosted elsewhere, and that Guacamole has already been installed using Keeper Connection Manager. If you do not already a SQL Server database ready, please set up SQL Server before proceeding. If you do not already have Guacamole installed, please see the installation instructions.
If you haven’t already done so, a database specific to Guacamole needs to be created within SQL Server. The database can be called anything you like and there are no specific requirements for the size of the database, collation, etc.; all that matters is that the database be dedicated to Guacamole, and not shared by different applications:
Guacamole will not automatically initialize the database with the required schema. You will need to do this yourself using the SQL scripts provided with the kcm-guacamole-auth-jdbc-sqlserver package, which are located within the /opt/keeper/share/guacamole-auth-jdbc-sqlserver/schema
directory:
001-create-schema.sql
Creates all tables and indexes which are required for the SQL Server authentication extension to function.
002-create-admin-user.sql
Creates a default administrative user, “guacadmin”, with password “guacadmin”. These credentials will need to be changed once SQL Server authentication is confirmed to be working.
The above scripts must be run in sequence. The first script, 001-create-schema.sql
, creates the database schema:
To execute queries against the database, Guacamole will need its own database user with sufficient privileges. Because Guacamole does not automatically apply or update its own schema, the required privileges are minimal, dealing only with creation and maintenance of data within already-defined tables and indexes. Permission to SELECT
, INSERT
, UPDATE
, and DELETE
from all tables in the database is sufficient and exactly covered by SQL Server's db_datareader
and db_datawriter
roles.
The login to be used by Guacamole must use SQL Server authentication, with a password which will eventually be stored within /etc/guacamole/guacamole.properties
:
The login must then be associated with a user specific to the Guacamole database:
To grant the necessary SELECT
, INSERT
, UPDATE
, and DELETE
permissions for all tables in the Guacamole database, the user must be added to the database's db_datareader
and db_datawriter
roles:
Keeper Connection Manager packages Guacamole’s SQL Server support within the kcm-guacamole-auth-jdbc-sqlserver package. This package must be installed before creating Guacamole’s database within SQL Server, as it includes the SQL scripts necessary for doing so:
Once the database and database user have been prepared, Guacamole’s main configuration file, /etc/guacamole/guacamole.properties
, must be modified to specify the credentials of that user and to point the SQL Server instance and database:
The guacamole.properties file provided with Keeper Connection Manager is organized into sections documented with blocks of comments and example properties. The first section which must be modified is marked “JDBC-1” and defines the TCP connection information for the database in use. Uncomment the sqlserver-hostname and sqlserver-port properties, modifying their values to point to your instance of SQL Server:
The “JDBC-2” section, which defines the database name and associated credentials, must also be modified to specify the correct database name, username, and password. These values are given with the sqlserver-database, sqlserver-username, and sqlserver-password properties respectively:
Guacamole will generally only load new extensions and reread guacamole.properties
during the startup process. To apply the configuration changes, Guacamole must be restarted:
To make sure everything is working as expected, you should also visit your Keeper Connection Manager instance with a web browser (most likely at http://HOSTNAME:8080/guacamole/
, where “HOSTNAME” is the hostname or IP address of your server). If all is working correctly, you should see a login screen with a username/password prompt, and you will be able to log in using the default account created with the 002-create-admin-user.sql
script:
Password:
guacadmin
Once you have verified that you can log in successfully, you should immediately change the password. While logged into Keeper Connection Manager, you can access the built-in password changing interface by clicking on your username in the upper-right corner of the screen and selecting “Settings”.