Skip to content

Commit 46e450c

Browse files
authored
Merge pull request #363 from StackStorm/installer_changes
Add some security best practices notes to the docs
2 parents 755167d + 6eb757f commit 46e450c

6 files changed

Lines changed: 90 additions & 12 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. note::
2+
3+
For security reasons, installer script enables authentication and generates random passwords
4+
for dependent services such as MongoDB and PostgreSQL.
5+
6+
If for some reason (e.g. debugging), you need to access those services directly you can find
7+
passwords in the config files - ``/etc/st2/st2.conf`` for MongoDB and RabbitMQ password and
8+
``/etc/mistral/mistral.conf`` for PostgreSQL password.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
By default when dependent services such as MongoDB, RabbitMQ and PostgreSQL are installed, they
2+
have authentication disabled or use a default static password. As such, after you install those
3+
services you should configure them and enable authentication with strong randomly generated
4+
passwords.
5+
6+
Configuring authorization and passwords for those services is out of the scope for this documentation.
7+
For more information refer to the links below:
8+
9+
* MongoDB - https://docs.mongodb.com/manual/tutorial/enable-authentication/, https://docs.mongodb.com/manual/core/authorization/
10+
* RabbitMQ - https://www.rabbitmq.com/authentication.html
11+
* PostgreSQL - https://www.postgresql.org/docs/9.4/static/auth-methods.html
12+
13+
After you enable authentication for those components, you will also need to configure StackStorm
14+
services so they can talk to them.
15+
16+
This means editing the following configuration options:
17+
18+
1. StackStorm config - ``/etc/st2/st2.conf``
19+
20+
* ``database.username`` - MongoDB database username.
21+
* ``database.password`` - MongoDB database password.
22+
* ``messaging.url`` - RabbitMQ transport url (``amqp://<username>:<password>@<hostname>:5672``)
23+
24+
2. Mistral config - ``/etc/mistral/mistral.conf``
25+
26+
* ``database.connection`` - PostgreSQL database connection string (``postgresql://<username>:<password>@<hostname>/mistral``)
27+
* ``transport_url`` - RabbitMQ transport url (``rabbit://<username>:<password>@<hostname>:5672``)
28+
29+
In addition, you are strongly encouraged to follow these best practices for running network
30+
services:
31+
32+
* Ensure communication between services is encrypted. Enable SSL / TLS for all the services -
33+
MongoDB, RabbitMQ, PostgreSQL.
34+
* Configure services to only listen on localhost, and where needed, internal IP addresses. There
35+
is usually no need for most services which are used by |st2| (MongoDB, RabbitMQ, PostgreSQL) to
36+
be available to the public and listen on an external (public) IP address.
37+
* Configure a firewall and set up a whitelist. You should set up a firewall and only allow services
38+
and users which need access to the services to be able to access them. API and auth service
39+
usually need to be accessible to your users, but other dependent services such as MongoDB,
40+
RabbitMQ and PostgreSQL aren't. These should not be directly accessible by users, and only
41+
StackStorm components should be allowed to talk to them.
42+
* Where possible and available, you should also utilize additional network-based isolation and
43+
security features such as DMZs.
44+
45+
The steps mentioned above are especially important for distributed production deployments where |st2|
46+
components are running on multiple servers.

docs/source/install/deb.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ the :doc:`Reference deployment </install/overview>`.
1212

1313
System Requirements
1414
-------------------
15+
1516
Please check :doc:`supported versions and system requirements <system_requirements>`.
1617

1718
Minimal installation
@@ -58,7 +59,7 @@ The following script will detect your platform and architecture and setup the re
5859
curl -s https://packagecloud.io/install/repositories/StackStorm/stable/script.deb.sh | sudo bash
5960
6061
Install |st2| components
61-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62+
~~~~~~~~~~~~~~~~~~~~~~~~
6263

6364
.. code-block:: bash
6465
@@ -171,6 +172,7 @@ Check out :doc:`/reference/cli` to learn convenient ways to authenticate via CLI
171172

172173
Install WebUI and setup SSL termination
173174
---------------------------------------
175+
174176
`NGINX <http://nginx.org/>`_ is used to serve WebUI static files, redirect HTTP to HTTPS,
175177
provide SSL termination for HTTPS, and reverse-proxy st2auth and st2api API endpoints.
176178
To set it up, install `st2web` and `nginx`, generate certificates or place your existing
@@ -279,8 +281,14 @@ If you already run a Hubot instance, you only have to install the `hubot-stackst
279281

280282
* That's it! Go to your Chat room and begin ChatOpsing. Read more in the :doc:`/chatops/index` section.
281283

284+
A Note on Security
285+
------------------
286+
287+
.. include:: common/security_notes.rst
288+
282289
Upgrade to Brocade Workflow Composer
283-
-------------------------------------
290+
------------------------------------
291+
284292
Brocade Workflow Composer is deployed as an addition on top of StackStorm. You will need an active
285293
Brocade Workflow Composer subscription, and a license key to access Brocade Workflow Composer repositories.
286294
To add your license key, replace ``${BWC_LICENSE_KEY}`` in the command below with the key you received when

docs/source/install/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Once it completes successfully, you will see the following output:
4242
Thanks for installing StackStorm! Come visit us in our Slack Channel
4343
and tell us how it's going. We'd love to hear from you!
4444

45+
.. include:: __installer_passwords.rst
46+
4547
.. rubric:: Installations
4648

4749
.. toctree::
@@ -55,4 +57,3 @@ Once it completes successfully, you will see the following output:
5557
Brocade Workflow Composer <bwc>
5658
config/index
5759
upgrades
58-

docs/source/install/rhel6.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ the :doc:`Reference deployment </install/overview>`.
1212

1313
System Requirements
1414
-------------------
15+
1516
Please check :doc:`supported versions and system requirements <system_requirements>`.
1617

1718
Minimal installation
@@ -111,7 +112,7 @@ Install MongoDB, RabbitMQ, and PostgreSQL.
111112
112113
113114
Setup repositories
114-
~~~~~~~~~~~~~~~~~~~
115+
~~~~~~~~~~~~~~~~~~
115116

116117
The following script will detect your platform and architecture and setup the repo accordingly. It'll also install the GPG key for repo signing.
117118

@@ -120,7 +121,7 @@ The following script will detect your platform and architecture and setup the re
120121
curl -s https://packagecloud.io/install/repositories/StackStorm/stable/script.rpm.sh | sudo bash
121122
122123
Install |st2| components
123-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124+
~~~~~~~~~~~~~~~~~~~~~~~~
124125

125126
.. code-block:: bash
126127
@@ -227,10 +228,11 @@ To set up authentication with File Based provider:
227228
# Check that it works
228229
st2 action list
229230
230-
Check out :doc:`/reference/cli` to learn convinient ways to authenticate via CLI.
231+
Check out :doc:`/reference/cli` to learn convenient ways to authenticate via CLI.
231232

232233
Install WebUI and setup SSL termination
233234
---------------------------------------
235+
234236
`NGINX <http://nginx.org/>`_ is used to serve WebUI static files, redirect HTTP to HTTPS,
235237
provide SSL termination for HTTPS, and reverse-proxy st2auth and st2api API endpoints.
236238
To set it up: install `st2web` and `nginx`, generate certificates or place your existing
@@ -296,7 +298,6 @@ For example, to see the endpoint for getting actions, invoke
296298
297299
st2 --debug action list
298300
299-
300301
Setup ChatOps
301302
-------------
302303

@@ -351,8 +352,14 @@ If you already run Hubot instance, you only have to install the `hubot-stackstor
351352

352353
* That's it! Go to your Chat room and begin ChatOps-ing. Read more in the :doc:`/chatops/index` section.
353354

355+
A Note on Security
356+
------------------
357+
358+
.. include:: common/security_notes.rst
359+
354360
Upgrade to Brocade Workflow Composer
355-
-------------------------------------
361+
------------------------------------
362+
356363
Brocade Workflow Composer is deployed as an addition on top of StackStorm. You will need an active
357364
Brocade Workflow Composer subscription, and a license key to access Brocade Workflow Composer repositories.
358365
To add your license key, replace ``${BWC_LICENSE_KEY}`` in the command below with the key you received when

docs/source/install/rhel7.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ the :doc:`Reference deployment </install/overview>`.
1212

1313
System Requirements
1414
-------------------
15+
1516
Please check :doc:`supported versions and system requirements <system_requirements>`.
1617

1718
Minimal installation
@@ -91,7 +92,7 @@ Install MongoDB, RabbitMQ, and PostgreSQL.
9192
sudo systemctl enable postgresql
9293
9394
Setup repositories
94-
~~~~~~~~~~~~~~~~~~~
95+
~~~~~~~~~~~~~~~~~~
9596

9697
The following script will detect your platform and architecture and setup the repo accordingly. It'll also install the GPG key for repo signing.
9798

@@ -100,7 +101,7 @@ The following script will detect your platform and architecture and setup the re
100101
curl -s https://packagecloud.io/install/repositories/StackStorm/stable/script.rpm.sh | sudo bash
101102
102103
Install |st2| components
103-
~~~~~~~~~~~~~~~~~~~~~~~~~
104+
~~~~~~~~~~~~~~~~~~~~~~~~
104105

105106
.. code-block:: bash
106107
@@ -120,6 +121,7 @@ Setup Mistral Database
120121

121122
Configure SSH and SUDO
122123
~~~~~~~~~~~~~~~~~~~~~~
124+
123125
To run local and remote shell actions, |st2| uses a special system user (default ``stanley``).
124126
For remote Linux actions, SSH is used. It is advised to configure identity file based SSH access on all remote hosts. We also recommend configuring SSH access to localhost for running examples and testing.
125127

@@ -202,10 +204,11 @@ To set up authentication with File Based provider:
202204
# Check that it works
203205
st2 action list
204206
205-
Check out :doc:`/reference/cli` to learn convinient ways to authenticate via CLI.
207+
Check out :doc:`/reference/cli` to learn convenient ways to authenticate via CLI.
206208

207209
Install WebUI and setup SSL termination
208210
---------------------------------------
211+
209212
`NGINX <http://nginx.org/>`_ is used to serve WebUI static files, redirect HTTP to HTTPS,
210213
provide SSL termination for HTTPS, and reverse-proxy st2auth and st2api API endpoints.
211214
To set it up: install `st2web` and `nginx`, generate certificates or place your existing
@@ -270,7 +273,6 @@ For example, to see the endpoint for getting actions, invoke
270273
271274
st2 --debug action list
272275
273-
274276
Setup ChatOps
275277
-------------
276278

@@ -324,8 +326,14 @@ If you already run Hubot instance, you only have to install the `hubot-stackstor
324326

325327
* That's it! Go to your Chat room and begin ChatOps-ing. Read more in the :doc:`/chatops/index` section.
326328

329+
A Note on Security
330+
------------------
331+
332+
.. include:: common/security_notes.rst
333+
327334
Upgrade to Brocade Workflow Composer
328335
------------------------------------
336+
329337
Brocade Workflow Composer is deployed as an addition on top of StackStorm. You will need an active
330338
Brocade Workflow Composer subscription, and a license key to access Brocade Workflow Composer repositories.
331339
To add your license key, replace ``${BWC_LICENSE_KEY}`` in the command below with the key you received when

0 commit comments

Comments
 (0)