Skip to content

Change the Token for Encrypting the Credentials


If you keep the standard installation, MongoDB is used as credential store. For security reasons, change the pre-configured token used for encrypting the credentials. The token may be any string.

Hint - how to change the configuration

In the instructions below, SEAL Operator CLI is used for changing the configuration. You can also use the Consul Web interface.

  1. If SEAL Operator is already in use, back up MongoDB. Otherwise, you lose all data in the next steps. For how to do this, refer to the SEAL-specific MongoDB documentation.

  2. Open a Command Prompt or PowerShell.

  3. Export the complete configuration of SEAL Operator from Consul to a YAML file. This ensures that you edit the current configuration.

    operator config export <filename>.yml --insecure
    
  4. Edit the exported file <filename>.yml.

  5. In the env section, specify the new token in the key MONGO_TOKEN:

    env:
      service:
        ...
        operator-server:
          tag:
            any:
              MONGO_TOKEN: 'new_secure_token'
        ...
    
  6. Save the <filename>.yml file.

  7. Re-import the file to Consul.

    operator config import <filename>.yml --insecure
    
  8. Stop all SEAL Operator services.

    operator service stop
    
  9. When using a PowerShell, delete the complete data directory of MongoDB with the following command:

    rmdir -r "$env:PROGRAMDATA\SEAL Systems\data\seal-mongodb"
    

    When in a Command Prompt, use the following command instead:

    rmdir /q /s "%PROGRAMDATA%\SEAL Systems\data\seal-mongodb"
    
  10. Restart the service seal-mongodb.

    operator service start seal-mongodb
    
  11. If you backed up MongoDB, restore the data. For how to do this, refer to the SEAL-specific MongoDB documentation.

  12. Restart the complete SEAL Operator system.

    operator service start
    
  13. Check the status of the SEAL Operator services.

    operator service status
    

Back to top