Skip to main content

mangle

Using the Mangle Tool to Hash Secrets

We recommend using Secret as a Service solutions like Hashicorp Vault or AWS Secrets Manager to securely store sensitive information such as passwords.

However, in some cases, using such solutions might not be possible. To avoid storing clear-text passwords in your configuration files, you can use the mangle utility supplied with Ember.

How to Use Mangle

Hash a Secret

Assuming you are running Ember in a container (similar steps apply for standalone Ember installations):

  1. Attach to the Ember container.

  2. Run the mangle tool with single command-line argument, which is the secret you want to hash:

    #/opt/deltix/ember/bin/mangle mySecretPassword123
    EVb6d076d78f38d12f3819a6fb377775e5c09058ea3f617665
note

If the tool is called without any arguments, it reads your secret from standard input, which may be considered more secure than leaving your password in command history.

Unhash a Secret

To unmangle a secret, use the -reverse flag along with the hashed secret:

/opt/deltix/ember/bin/mangle -reverse EVb6d076d78f38d12f3819a6fb377775e5c09058ea3f617665