Most Popular
Recently Added
Recently Updated

Setting Up Basic Auth

Use Case

How to setup basic authentication between nodes.

Solution

Master Node (Registration Node)

  1. At the bottom of your existing {SYM_HOME}/web/WEB-INF/web.xml file, add a security constraint by adding the following lines:
    /sync/* nodeRole BASIC default

  2. Create a jetty-web.xml with the following contents int the {SYM_HOME}/web/WEB-INF folder. This will add a login service handler.
    default /web/WEB-INF/realm.properties

  3. Create a realm.properties file with the following contents and put into the {SYM_HOME}/web/WEB-INF folder. This file contains the usernames and passwords needed by nodes to authenticate.

    Note

    The format of the realm.properties is "username: password, role". The role in the realm.properties needs to match the role in the web.xml.


    node: secret,nodeRole
    node2: secret2,nodeRole

    Nodes

  4. Add the following properties to each node. Find the appropriate engine properties file for each node in the {SYM_HOME}/engines/*.properties.
    http.basic.auth.username=node
    http.basic.auth.password=secret
    

Properties ID: 000029   Views: 2934   Updated: 9 years ago
Filed under: