User Tools

Site Tools


replicator_agent_encrypting_fields

Encrypting Fields Inside the Config File

Encrypting sensitive field values is supported in the config.xml and agent.xml files. The agent will utilize encrypted fields based on the “encrypted:” and “encrypt:” prefixes.

When the Agent (or the Validate Configuration) starts, any configuration values prefixed with “encrypt:” will be encrypted and the configuration file will be rewritten with the prefixes changed to “encrypted:”.

You can encrypt passwords attributes and elements, as well as your decryption keys if desired.

Example

Enter In Encrypted Values

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
    <agent>
        <subscribe>
            <task>
                <task_name>example_subscribe</task_name>
                <message_connection password="encrypt:MbsPassword" user="MbsUser">amqps://example.perspectium.net</message_connection>
                <instance_connection password="encrypt:MbsPassword" user="SnUser">https://example.service-now.com</instance_connection>
                <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
                <decryption_key>The cow jumped over the moon</decryption_key>
 
                <database_type>mysql</database_type>
                <database_server>localhost</database_server>
                <database_port>3306</database_port>
                <database_user>perspectium</database_user>
                <database_password>encrypt:DbPassword</database_password>
                <database_params>characterEncoding=UTF-8</database_params>
                <database>psp_repl</database>
            </task>
        </subscribe>
 
        <max_reads_per_connect>4000</max_reads_per_connect>
        <polling_interval>5</polling_interval>
        <skip_message_set_processing/>
    </agent>
</config>

Encrypted Values After Startup

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
    <agent>
        <subscribe>
            <task>
                <task_name>example_subscribe</task_name>
                <message_connection password="encrypted:vlOtU71yu8N/EFIJH85SauokjluHg3zcxvdAmB0=" user="MbsUser">amqps://example.perspectium.net</message_connection>
                <instance_connection password="encrypted:vlOtU71yu8N/EFIJH85SSJMF8Q5huHg3zc804oGAmB0=" user="SnUser">https://example.service-now.com</instance_connection>
                <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
                <decryption_key>The cow jumped over the moon</decryption_key>
 
                <database_type>mysql</database_type>
                <database_server>localhost</database_server>
                <database_port>3306</database_port>
                <database_user>perspectium</database_user>
                <database_password>encrypted:vlOtU71asdfsadf/EFIJHasdfasfjlj=</database_password>
                <database_params>characterEncoding=UTF-8</database_params>
                <database>psp_repl</database>
            </task>
        </subscribe>
 
        <max_reads_per_connect>4000</max_reads_per_connect>
        <polling_interval>5</polling_interval>
        <skip_message_set_processing/>
    </agent>
</config>
replicator_agent_encrypting_fields.txt · Last modified: 2018/02/23 14:55 by jackson.davenport