Enable Authorization of Named Services

Perform these steps to restrict access to named REST services. Permissions apply to all URLs that implement the named services.

Procedure

  1. Configure the rsgateway-extensions.yaml file with a ConfigMap in the Helm values file.
    For example:
    rsgateway:
      configuration:
        container:
          configmap:
            rsgateway-extensions.yaml: |-
               rest:
                 subscriber_create_basic:
                   roles: MTX_ROLE_CUST_ONE,MTX_ROLE_CUST_TWO

    This enables calling of the subscriber_create_basic service by providing a user with role MTX_ROLE_CUST_ONE or MTX_ROLE_CUST_TWO permissions (required for calling the subscriber_create_basic service).

  2. Configure the rsgateway_users.yaml file.
    The configuration is:
    username: "{EncodingAlgorithm}EncodedPassword, role1, role2, roleN"
    where:
    • username — The client's login ID.
    • EncodingAlgorithm — The encoding algorithm (such as bcrypt).
    • EncodedPassword — An EncodingAlgorithm-encoded password string.
    • role(1, 2, N) — A comma-separated list of RS Gateway roles.
    For example:
    rsgateway:
      configuration:
        container:
          configmap:
            rsgateway_users.yaml: |-
              user:john: '{bcrypt}$2a$10$dXJ3SW6G7P50lGmMkkmwe.20cQQubK3.HZWzG3YB1tlRy.fqvM/BG, MTX_ROLE_RSG_CREATE, MTX_ROLE_RSG_READ, MTX_ROLE_RSG_UPDATE, MTX_ROLE_RSG_DELETE, MTX_ROLE_RSG_STD' 
  3. Apply the configuration and restart RS Gateway with a command like 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.

What to do next

For a description of RS Gateway roles, see the related RS Gateway roles discussion. For information about supported encoding algorithms (such as bcrypt), see the discussion about password encoding in MATRIXX Security.

For more information about configuring MATRIXX gateways and web apps, including how to use configuration sources for configuration, see the discussion about configuring MATRIXX gateways and web apps in MATRIXX Configuration.