Configure RS Gateway for LDAP Authentication

This example demonstrates a simple LDAP authentication for RS Gateway.

Before you begin

You must have access to a running LDAP server.

About this task

This example is provided as an alternative to the default RS Gateway authentication. If you enable LDAP authentication, the default users are evaluated first and then LDAP authentication is used.
Note: MATRIXX supports Active Directory (AD) LDAP authentication. For information about enabling AD support for RS Gateway, see the discussion about configuring Active Directory LDAP authentication.

Procedure

  1. Configure the rsgateway-site.yaml file with a ConfigMap in the Helm values file..
    For example:
    rsgateway:
      configuration:
        container:
          configmap:
            rsgateway-site.yaml: |-          
              ldap:
                enabled: true
                contextSource: ldap://localhost:10389/dc=example,dc=com
                authoritiesPopulator: ou=groups
                groupRoleAttribute: ou
                userDnPatterns: uid={0},ou=people  
                convertToUpperCase: true
                searchSubTree: true
                userSearch:
                  filter: (sAMAccountName={0}) 
                  base: DC=example,DC=com
    where the properties are:
    Property Description Default
    contextSource The URL of the LDAP server. ldap://localhost:10389/dc=example,dc=com
    authoritiesPopulator The base name to use when searching for groups. ou=groups
    groupRoleAttribute The attribute to use to identify user roles. ou
    userDnPatterns The Distinguished Name pattern to use when looking for users in LDAP. uid={0},ou=people
    userSearch:base The base path to search for users. For example: DC=example,DC=com
    userSearch:filter The filter to use to search for a user's DN before bind. For example: (sAMAccountName={0})
    searchSubTree (true or false) If true, then the entire subTree is searched. true
    convertToUpperCase (true or false) If true, the roles are converted to uppercase. true
    password The password of the user to use for LDAP authentication requests. No default value. The correct value depends on LDAP configuration.
  2. Apply the configuration and restart RS Gateway with a command similar to the following:
    helm upgrade ag1 matrixx/matrixx --namespace matrixx-webapps-gateways -f matrixx-webapps-gateways_values.yaml --version 5270

    Where matrixx-webapps-gateways_values.yaml is a Helm values file that defines the ConfigMaps and enables RS Gateway.

Results

The files are dynamically created and mounted to /sync/conf, which is synchronized with /opt/mtx/conf in the component container at start-up, using rsync. RS Gateway should be restarted to pick up the changes.