Obfuscating the object storage credentials


To prevent the object storage secret key appearing in clear text within the configuration files, you can obfuscate it.

To obfuscate the object storage credentials

  1. To run the obfuscation utility, issue the following command from the management server. The obfuscation utility resides in the $MODEL9_HOME/Utilities directory.

    $MODEL9_HOME/Utilities/model9-obfuscator.sh <object storage secret key>

    The script's outcome is an obfuscated version of the object storage secret key. For example:

    [root@rhel73 Utilities]# ./model9-obfuscator.sh objstoresecret
    /model9/Utilities/model9-credential-encryptor  model9-obfuscator.sh
    15:24:59.677 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - *******************************************************************************
    15:24:59.679 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - * Model9 Credential Encryptor                                                 *
    15:24:59.679 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - * Website: https://www.model9.io                                              *
    15:24:59.679 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - * Contact: support@model9.io                                                  *
    15:24:59.679 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - * 2016-2021 (c) Model9 Software                                               *
    15:24:59.679 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - *******************************************************************************
    15:24:59.702 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - Encrypting...
    15:24:59.785 INFO  [i.m.c.Model9CredentialEncryptorEntryPoint-main] - Encrypted: rNEiN6QZB+OrmDMZBSXYX4F0OlrtWBSbhEJAfU6LfwCPGrW7HsRMZw5599guVIs5
  2. Specify the following parameters in the model9-local.yml file:

    model9.objstore.endpoint.password: <obfuscated_key>
    model9.objstore.endpoint.password_encrypted: true
  3. Restart the management server container by using the following command:

    docker restart model9-v<v.r.m>
  4. Specify the following parameters in the agent.yml file:

    objstore.endpoint.password: <obfuscated_key>
    objstore.endpoint.password_encrypted: true
  5. Restart the BMC AMI Cloud agent.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*