Using the Bridge configuration file to configure the administration endpoint

You can update the Bridge configuration by using the imabridge command. In the Docker environment, the command is run from within the container.

Note: If you are running in a Docker container and you created an admin endpoint during the creation of the Docker container, this task is not required.

More than one administrative endpoint can be configured. For example, you might want one administrative endpoint to be available to both the localhost environment and to the private network.

Instead of using a command, you can also update the dynamic configuration file /var/imabridge/bridge.cfg directly by editing the file or by copying to the file. Updating the dynamic configuration file also changes the configuration of the running bridge. However, if there are any errors in the new configuration, it might not be possible for the Bridge to restart.

For a description of endpoint object properties, see Configuring the Bridge.

  1. Create a temporary configuration file, for example new.cfg. Or you can modify the sample configuration file that is available at /opt/ibm/imabridge/sample-config/admin_default.cfg. The contents of the configuration file must match the following format:
    
    {
        "Endpoint": {
            "admin": {
                "Port": 9082,
                "Interface": "*",
                "Secure": true,
                "Protocol": "Admin",
                "Method": "TLSv1.2",
                "Certificate": "imabridge_default_cert.pem",
                "Key": "imabridge_default_key.pem",
                "KeyPassword": "",
                "EnableAbout": true,
                "Authentication": "basic"
            }
        },
        "User": {
            "admin": { "Password": "admin" }
        }
    }
    
    Note: If the new configuration file is correct, the configuration of the running bridge is updated successfully. If there are any errors in the new configuration file, error messages are generated.
  2. Run the following command: sudo /opt/ibm/imabridge/bin/imabridge -u path/new.cfg and replace the path variable with the directory in which the configuration file is stored.
  3. If TLS is enabled, you must supply private key and server certificate files in the /var/imabridge/keystore directory. If self-signed certificates are used, you must generate the certificates with the appropriate tools such as openssl.