Skip to content

Commit f36300d

Browse files
Remarks for #1608, #1609
1 parent a93cd97 commit f36300d

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

site/access-control.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,16 @@ new user accounts with generated credentials instead.
7777
## <a id="default-state" class="anchor" href="#default-state">Default Virtual Host and User</a>
7878

7979
When the server first starts running, and detects that its
80-
database is uninitialised or has been deleted, it
80+
database is uninitialised or has been reset or deleted (the node is a "blank node"), it
8181
initialises a fresh database with the following resources:
8282

8383
* a [virtual host](./vhosts.html) named <code>/</code> (a slash)
8484
* a user named <code>guest</code> with a default password of <code>guest</code>, granted full access to the <code>/</code> virtual host
8585

86-
It is advisable to [pre-configure a new user with a generated username and password](#seeding) or [delete](rabbitmqctl.8.html#delete_user)
86+
If a blank node [imports definitions on boot](/definitions.html#import-on-boot-nuances),
87+
this default user will not be created.
88+
89+
It is **highly recommended** to [pre-configure a new user with a generated username and password](#seeding) or [delete](rabbitmqctl.8.html#delete_user)
8790
the `guest` user or at least [change its password](rabbitmqctl.8.html#change_password)
8891
to reasonably secure generated value that won't be known to the public.
8992

site/definitions.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,39 @@ definitions.https.url = https://raw.githubusercontent.com/rabbitmq/sample-config
146146
definitions.tls.versions.1 = tlsv1.2
147147
</pre>
148148

149+
### <a id="import-on-boot-nuances" class="anchor" href="#import-on-boot-nuances">Nuances of Boot-time Definition Import</a>
149150

150151
Definition import happens after plugin activation. This means that definitions related
151152
to plugins (e.g. dynamic Shovels, exchanges of a custom type, and so on) can be imported at boot time.
152153

153154
The definitions in the file will not overwrite anything already in the broker.
154-
However, if a blank (uninitialised) node imports a definition file, it will
155-
not create the default virtual host and user.
155+
156+
If a blank (uninitialised) node imports a definition file, it will
157+
not create the default virtual host and user. In **test or QA** environments,
158+
an equivalent default user can be created via the same definitions file.
159+
160+
For **production** systems a new user with unique credentials must be created and used instead.
161+
162+
The below snippet demonstrates how the definitions file can be modified to
163+
"re-create" the default user that would only be able to connect from `localhost` by default:
164+
165+
<pre class="lang-javascript">
166+
"users": [
167+
{
168+
"name": "guest",
169+
"password": "guest",
170+
"tags": ["administrator"]
171+
}
172+
],
173+
"permissions":[
174+
{
175+
"user":"guest",
176+
"vhost":"/",
177+
"configure":".*",
178+
"read":".*",
179+
"write":".*"}
180+
],
181+
</pre>
156182

157183
### <a id="import-on-boot-skip-if-unchanged" class="anchor" href="#import-on-boot-skip-if-unchanged">Avoid Boot Time Import if Definition Contents Have Not Changed</a>
158184

0 commit comments

Comments
 (0)