Skip to content

Commit c4e784f

Browse files
authored
Merge pull request #673 from StackStorm/sudo_password_docs
Documentation for new sudo_password runner parameter
2 parents 77a5ff0 + 28beafa commit c4e784f

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

docs/source/_includes/runner_parameters/local_shell_cmd.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
* ``kwarg_op`` (string) - Operator to use in front of keyword args i.e. "--" or "-".
44
* ``cmd`` (string) - Arbitrary Linux command to be executed on the host.
5-
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.
5+
* ``sudo_password`` (string) - Sudo password. To be used when paswordless sudo is not allowed.
66
* ``env`` (object) - Environment variables which will be available to the command(e.g. key1=val1,key2=val2)
7+
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.
78
* ``sudo`` (boolean) - The command will be executed with sudo.
89
* ``cwd`` (string) - Working directory where the command will be executed in
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.. NOTE: This file has been generated automatically, don't manually edit it
22
33
* ``kwarg_op`` (string) - Operator to use in front of keyword args i.e. "--" or "-".
4-
* ``sudo`` (boolean) - The command will be executed with sudo.
5-
* ``cwd`` (string) - Working directory where the script will be executed in
4+
* ``sudo_password`` (string) - Sudo password. To be used when paswordless sudo is not allowed.
65
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.
7-
* ``env`` (object) - Environment variables which will be available to the script(e.g. key1=val1,key2=val2)
6+
* ``env`` (object) - Environment variables which will be available to the script(e.g. key1=val1,key2=val2)
7+
* ``sudo`` (boolean) - The command will be executed with sudo.
8+
* ``cwd`` (string) - Working directory where the script will be executed in
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. NOTE: This file has been generated automatically, don't manually edit it
22
3+
* ``log_level`` (string) - Default log level for Python runner actions.
34
* ``env`` (object) - Environment variables which will be available to the script.
45
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.

docs/source/_includes/runner_parameters/remote_shell_cmd.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
33
* ``username`` (string) - Username used to log-in. If not provided, default username from config is used.
44
* ``private_key`` (string) - Private key material or path to the private key file on disk used to log in.
5-
* ``cmd`` (string) - Arbitrary Linux command to be executed on the remote host(s).
6-
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.
5+
* ``sudo_password`` (string) - Sudo password. To be used when paswordless sudo is not allowed.
76
* ``env`` (object) - Environment variables which will be available to the command(e.g. key1=val1,key2=val2)
87
* ``sudo`` (boolean) - The remote command will be executed with sudo.
9-
* ``cwd`` (string) - Working directory where the script will be executed in
108
* ``kwarg_op`` (string) - Operator to use in front of keyword args i.e. "--" or "-".
119
* ``bastion_host`` (string) - The host SSH connections will be proxied through. Note: This connection is made using the same parameters as the final connection, and is only used in ParamikoSSHRunner.
12-
* ``hosts`` (string) - A comma delimited string of a list of hosts where the remote command will be executed.
1310
* ``passphrase`` (string) - Passphrase for the private key, if needed.
14-
* ``parallel`` (boolean) - Default to parallel execution.
1511
* ``password`` (string) - Password used to log in. If not provided, private key from the config file is used.
1612
* ``port`` (integer) - SSH port. Note: This parameter is used only in ParamikoSSHRunner.
13+
* ``cmd`` (string) - Arbitrary Linux command to be executed on the remote host(s).
14+
* ``parallel`` (boolean) - Default to parallel execution.
15+
* ``hosts`` (string) - A comma delimited string of a list of hosts where the remote command will be executed.
16+
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.
17+
* ``cwd`` (string) - Working directory where the script will be executed in
1718
* ``dir`` (string) - The working directory where the script will be copied to on the remote host.

docs/source/_includes/runner_parameters/remote_shell_script.rst

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
* ``username`` (string) - Username used to log-in. If not provided, default username from config is used.
44
* ``private_key`` (string) - Private key material to log in. Note: This needs to be actual private key data and NOT path.
5+
* ``sudo_password`` (string) - Sudo password. To be used when paswordless sudo is not allowed.
56
* ``timeout`` (integer) - Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds.
67
* ``env`` (object) - Environment variables which will be available to the script(e.g. key1=val1,key2=val2)
78
* ``sudo`` (boolean) - The remote command will be executed with sudo.

docs/source/reference/runners.rst

+10
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ This is a remote runner. This runner executes a Linux command on one or more rem
5252
by the user. The last newline character is stripped from ``stdout`` and ``stderr`` fields in the
5353
output.
5454

55+
.. note::
56+
57+
By default |st2| uses paswordless sudo for system user which is used to execute commands on
58+
local and remote systems. In addition to paswordless sudo, local and remote runners also support
59+
password protected sudo via ``sudo_password`` runner parameter. With the remote runner, sudo
60+
password is passed to the sudo command as a command line argument which means it has some
61+
security implications - if bash history is enabled for the system user under which |st2|
62+
remote commands run, this command which includes sudo password will be saved in bash history
63+
and any system user which access to that user bash history file will be able to view it.
64+
5565
Runner Parameters
5666
^^^^^^^^^^^^^^^^^
5767

0 commit comments

Comments
 (0)