Skip to content

Commit 66ac11e

Browse files
Explain how to use encrypted values with select rabbitmq.conf keys
1 parent 9214ea0 commit 66ac11e

File tree

3 files changed

+85
-1
lines changed

3 files changed

+85
-1
lines changed

docs/configure.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,34 @@ rabbitmqctl encode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 \
17441744
"<<""guest"">>" mypassphrase
17451745
```
17461746
1747+
### Using Encrypted Values in `rabbitmq.conf` and `advanced.config`
1748+
1749+
Encrypted values must be used as pairs, for example, if the encrypted value
1750+
was returned as `<<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>`, the value in `advanced.config` will look like this:
1751+
1752+
```erl
1753+
{encrypted, <<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>}
1754+
```
1755+
1756+
In, `rabbitmq.conf`, an encrypted value from the example above should be
1757+
prefixed with `encrypted:`, that is:
1758+
1759+
```ini
1760+
default_passowrd = encrypted:T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0
1761+
```
1762+
1763+
When the `rabbitmq.conf` file is translated during node boot, the above
1764+
value will be translated to `{encrypted, <<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>}`, that is, the same value
1765+
as used in `advanced.config`.
1766+
1767+
Value encryption is supposed for the following `rabbitmq.conf` keys:
1768+
1769+
* `ssl_options.password`
1770+
* `default_password`
1771+
* `default_user.$username.password`
1772+
* `definitions.tls.password`
1773+
* `anonymous_login_pass`
1774+
17471775
17481776
## Configuration Using Environment Variables {#customise-environment}
17491777

versioned_docs/version-4.0/configure.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,34 @@ rabbitmqctl encode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 \
17441744
"<<""guest"">>" mypassphrase
17451745
```
17461746
1747+
### Using Encrypted Values in `rabbitmq.conf` and `advanced.config`
1748+
1749+
Encrypted values must be used as pairs, for example, if the encrypted value
1750+
was returned as `<<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>`, the value in `advanced.config` will look like this:
1751+
1752+
```erl
1753+
{encrypted, <<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>}
1754+
```
1755+
1756+
In, `rabbitmq.conf`, an encrypted value from the example above should be
1757+
prefixed with `encrypted:`, that is:
1758+
1759+
```ini
1760+
default_passowrd = encrypted:T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0
1761+
```
1762+
1763+
When the `rabbitmq.conf` file is translated during node boot, the above
1764+
value will be translated to `{encrypted, <<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>}`, that is, the same value
1765+
as used in `advanced.config`.
1766+
1767+
Value encryption is supposed for the following `rabbitmq.conf` keys:
1768+
1769+
* `ssl_options.password`
1770+
* `default_password`
1771+
* `default_user.$username.password`
1772+
* `definitions.tls.password`
1773+
* `anonymous_login_pass`
1774+
17471775
17481776
## Configuration Using Environment Variables {#customise-environment}
17491777

versioned_docs/version-4.1/configure.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ GET /api/overview
16091609

16101610
## Configuration Value Encryption {#configuration-encryption}
16111611

1612-
Sensitive `advanced.config` entries (e.g. password, URL containing
1612+
Sensitive `advanced.config` and select `rabbitmq.conf` entries (e.g. password, URL containing
16131613
credentials) can be encrypted. RabbitMQ nodes then decrypt encrypted entries on boot.
16141614

16151615
Note that encrypted configuration entries don't make the
@@ -1750,6 +1750,34 @@ rabbitmqctl encode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 \
17501750
"<<""guest"">>" mypassphrase
17511751
```
17521752
1753+
### Using Encrypted Values in `rabbitmq.conf` and `advanced.config`
1754+
1755+
Encrypted values must be used as pairs, for example, if the encrypted value
1756+
was returned as `<<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>`, the value in `advanced.config` will look like this:
1757+
1758+
```erl
1759+
{encrypted, <<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>}
1760+
```
1761+
1762+
In, `rabbitmq.conf`, an encrypted value from the example above should be
1763+
prefixed with `encrypted:`, that is:
1764+
1765+
```ini
1766+
default_passowrd = encrypted:T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0
1767+
```
1768+
1769+
When the `rabbitmq.conf` file is translated during node boot, the above
1770+
value will be translated to `{encrypted, <<"T9rCCHjY0ewlCWll8ux8vdynuAdA0/ji4koKh3eaziLfgigeW3K21VFzQZnvUxF0">>}`, that is, the same value
1771+
as used in `advanced.config`.
1772+
1773+
Value encryption is supposed for the following `rabbitmq.conf` keys:
1774+
1775+
* `ssl_options.password`
1776+
* `default_password`
1777+
* `default_user.$username.password`
1778+
* `definitions.tls.password`
1779+
* `anonymous_login_pass`
1780+
17531781
17541782
## Configuration Using Environment Variables {#customise-environment}
17551783

0 commit comments

Comments
 (0)