Skip to content

Commit be8d2aa

Browse files
author
Khushboo
committed
Merge branch 'master' of github.com:StackStorm/st2 into workflow_engine_graceful_shutdown
2 parents d65f198 + e2e4e26 commit be8d2aa

File tree

72 files changed

+2343
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2343
-118
lines changed

.github/workflows/microbenchmarks.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ jobs:
8787
virtualenv
8888
~/virtualenv
8989
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
90-
restore-keys: |
91-
${{ runner.os }}-v4-python-${{ matrix.python }}-
90+
# Don't use alternative key as if requirements.txt has altered we
91+
# don't want to retrieve previous cache
92+
#restore-keys: |
93+
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
9294
- name: Cache APT Dependencies
9395
id: cache-apt-deps
9496
uses: actions/cache@v2

.github/workflows/orquesta-integration-tests.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ jobs:
143143
# !virtualenv/lib/python*/site-packages/st2*
144144
# !virtualenv/bin/st2*
145145
key: ${{ runner.os }}-v4-python-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'test-requirements.txt') }}
146-
restore-keys: |
147-
${{ runner.os }}-v4-python-${{ matrix.python }}-
146+
# Don't use alternative key as if requirements.txt has altered we
147+
# don't want to retrieve previous cache
148+
#restore-keys: |
149+
# ${{ runner.os }}-v4-python-${{ matrix.python }}-
148150
- name: Cache APT Dependencies
149151
id: cache-apt-deps
150152
uses: actions/cache@v2

CHANGELOG.rst

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ in development
77
Fixed
88
~~~~~
99

10-
1110
* Fix deserialization bug in st2 API for url encoded payloads. #5536
1211

1312
Contributed by @sravs-dev
@@ -41,6 +40,12 @@ Fixed
4140

4241
Contributed by Amanda McGuinness (@amanda11 intive) #5581
4342

43+
* Downgrade tenacity as tooz dependency on tenacity has always been < 7.0.0 #5607
44+
45+
Contributed by @khushboobhatia01
46+
47+
* Updated paramiko version to 2.10.3 to add support for more key verification algorithms. #5600
48+
4449
Added
4550
~~~~~
4651

@@ -110,6 +115,59 @@ Added
110115

111116
Contributed by Amanda McGuinness (@amanda11 Intive)
112117

118+
* Add new ``api.auth_cookie_secure`` and ``api.auth_cookie_same_site`` config options which
119+
specify values which are set for ``secure`` and ``SameSite`` attribute for the auth cookie
120+
we set when authenticating via token / api key in query parameter value (e.g. via st2web).
121+
122+
For security reasons, ``api.auth_cookie_secure`` defaults to ``True``. This should only be
123+
changed to ``False`` if you have a valid reason to not run StackStorm behind HTTPs proxy.
124+
125+
Default value for ``api.auth_cookie_same_site`` is ``lax``. If you want to disable this
126+
functionality so it behaves the same as in the previous releases, you can set that option
127+
to ``None``.
128+
129+
#5248
130+
131+
Contributed by @Kami.
132+
133+
* Add new ``st2 action-alias test <message string>`` CLI command which allows users to easily
134+
test action alias matching and result formatting.
135+
136+
This command will first try to find a matching alias (same as ``st2 action-alias match``
137+
command) and if a match is found, trigger an execution (same as ``st2 action-alias execute``
138+
command) and format the execution result.
139+
140+
This means it uses exactly the same flow as commands on chat, but the interaction avoids
141+
chat and hubot which should make testing and developing aliases easier and faster. #5143
142+
143+
#5143
144+
145+
Contributed by @Kami.
146+
147+
* Add new ``credentials.basic_auth = username:password`` CLI configuration option.
148+
149+
This argument allows client to use additional set of basic auth credentials when talking to the
150+
StackStorm API endpoints (api, auth, stream) - that is, in addition to the token / api key
151+
native StackStorm auth.
152+
153+
This allows for simple basic auth based multi factor authentication implementation for
154+
installations which don't utilize SSO.
155+
156+
#5152
157+
158+
Contributed by @Kami.
159+
160+
* Add new audit message when a user has decrypted a key whether manually in the container (st2 key get [] --decrypt)
161+
or through a workflow with a defined config. #5594
162+
Contributed by @dmork123
163+
164+
* Added garbage collection for rule_enforcement and trace models #5596/5602
165+
Contributed by Amanda McGuinness (@amanda11 intive)
166+
167+
* Added garbage collection for workflow execution and task execution objects #4924
168+
Contributed by @srimandaleeka01 and @amanda11
169+
170+
113171
Fixed
114172
~~~~~
115173

@@ -119,10 +177,31 @@ Fixed
119177

120178
* Fix ``st2-self-check`` script reporting falsey success when the nested workflows runs failed. #5487
121179

180+
* Fix actions from the contrib/linux pack that fail on CentOS-8 but work on other operating systems and distributions. (bug fix) #4999 #5004
181+
182+
Reported by @blag and @dove-young contributed by @winem.
183+
122184
* Use byte type lock name which is supported by all tooz drivers. #5529
123185

124186
Contributed by @khushboobhatia01
125187

188+
* Fixed issue where pack index searches are ignoring no_proxy #5497
189+
190+
Contributed by @minsis
191+
192+
* Fixed trigger references emitted by ``linux.file_watch.line``. #5467
193+
194+
Prior to this patch multiple files could be watched but the rule reference of last registered file
195+
would be used for all trigger emissions causing rule enforcement to fail. References are now tracked
196+
on a per file basis and used in trigger emissions.
197+
198+
Contributed by @nzlosh
199+
200+
Changed
201+
~~~~~~~
202+
203+
* Bump black to v22.3.0 - This is used internally to reformat our python code. #5606
204+
126205
3.6.0 - October 29, 2021
127206
------------------------
128207

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,19 @@ black: requirements .black-check
381381
echo "Running black on" $$component; \
382382
echo "==========================================================="; \
383383
. $(VIRTUALENV_DIR)/bin/activate ; black --check --config pyproject.toml $$component/ || exit 1; \
384-
. $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
384+
if [ -d "$$component/bin" ]; then \
385+
. $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
386+
fi \
385387
done
386388
# runner modules and packages
387389
@for component in $(COMPONENTS_RUNNERS); do\
388390
echo "==========================================================="; \
389391
echo "Running black on" $$component; \
390392
echo "==========================================================="; \
391393
. $(VIRTUALENV_DIR)/bin/activate ; black --check --config pyproject.toml $$component/ || exit 1; \
392-
. $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
394+
if [ -d "$$component/bin" ]; then \
395+
. $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
396+
fi \
393397
done
394398
. $(VIRTUALENV_DIR)/bin/activate; black --check --config pyproject.toml contrib/ || exit 1;
395399
. $(VIRTUALENV_DIR)/bin/activate; black --check --config pyproject.toml scripts/*.py || exit 1;
@@ -411,15 +415,19 @@ black: requirements .black-format
411415
echo "Running black on" $$component; \
412416
echo "==========================================================="; \
413417
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$component/ || exit 1; \
414-
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
418+
if [ -d "$$component/bin" ]; then \
419+
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
420+
fi \
415421
done
416422
# runner modules and packages
417423
@for component in $(COMPONENTS_RUNNERS); do\
418424
echo "==========================================================="; \
419425
echo "Running black on" $$component; \
420426
echo "==========================================================="; \
421427
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$component/ || exit 1; \
422-
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
428+
if [ -d "$$component/bin" ]; then \
429+
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
430+
fi \
423431
done
424432
. $(VIRTUALENV_DIR)/bin/activate; black --config pyproject.toml contrib/ || exit 1;
425433
. $(VIRTUALENV_DIR)/bin/activate; black --config pyproject.toml scripts/*.py || exit 1;

conf/st2.conf.sample

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ workflows_pool_size = 40
3838
[api]
3939
# List of origins allowed for api, auth and stream
4040
allow_origin = http://127.0.0.1:3000 # comma separated list allowed here.
41+
# SameSite attribute value for the auth-token cookie we set on successful authentication from st2web. If you don't have a specific reason (e.g. supporting old browsers) we recommend you set this value to strict. Setting it to "unset" will default to the behavior in previous releases and not set this SameSite header value.
42+
# Valid values: strict, lax, none, unset
43+
auth_cookie_same_site = lax
44+
# True if secure flag should be set for "auth-token" cookie which is set on successful authentication via st2web. You should only set this to False if you have a good reason to not run and access StackStorm behind https proxy.
45+
auth_cookie_secure = True
4146
# None
4247
debug = False
4348
# StackStorm API server host
@@ -142,6 +147,7 @@ ssl = False
142147
# ca_certs file contains a set of concatenated CA certificates, which are used to validate certificates passed from MongoDB.
143148
ssl_ca_certs = None
144149
# Specifies whether a certificate is required from the other side of the connection, and whether it will be validated if provided
150+
# Valid values: none, optional, required
145151
ssl_cert_reqs = None
146152
# Certificate file used to identify the localconnection
147153
ssl_certfile = None
@@ -151,7 +157,7 @@ ssl_keyfile = None
151157
ssl_match_hostname = True
152158
# username for db login
153159
username = None
154-
# Compression level when compressors is set to zlib. Valid calues are -1 to 9. Defaults to 6.
160+
# Compression level when compressors is set to zlib. Valid values are -1 to 9. Defaults to 6.
155161
zlib_compression_level =
156162

157163
[exporter]
@@ -161,20 +167,28 @@ dump_dir = /opt/stackstorm/exports/
161167
logging = /etc/st2/logging.exporter.conf
162168

163169
[garbagecollector]
164-
# Action execution output objects (ones generated by action output streaming) older than this value (days) will be automatically deleted.
170+
# Action execution output objects (ones generated by action output streaming) older than this value (days) will be automatically deleted. Defaults to 7.
165171
action_executions_output_ttl = 7
166-
# Action executions and related objects (live actions, action output objects) older than this value (days) will be automatically deleted.
172+
# Action executions and related objects (live actions, action output objects) older than this value (days) will be automatically deleted. Defaults to None (disabled).
167173
action_executions_ttl = None
168174
# How often to check database for old data and perform garbage collection.
169175
collection_interval = 600
170176
# Location of the logging configuration file.
171177
logging = /etc/st2/logging.garbagecollector.conf
172178
# Set to True to perform garbage collection on Inquiries (based on the TTL value per Inquiry)
173179
purge_inquiries = False
180+
# Rule enforcements older than this value (days) will be automatically deleted. Defaults to None (disabled).
181+
rule_enforcements_ttl = None
174182
# How long to wait / sleep (in seconds) between collection of different object types.
175183
sleep_delay = 2
176-
# Trigger instances older than this value (days) will be automatically deleted.
184+
# Workflow task execution output objects (generated by action output streaming) older than this value (days) will be automatically deleted. Defaults to None (disabled).
185+
task_executions_ttl = None
186+
# Trace objects older than this value (days) will be automatically deleted. Defaults to None (disabled).
187+
traces_ttl = None
188+
# Trigger instances older than this value (days) will be automatically deleted. Defaults to None (disabled).
177189
trigger_instances_ttl = None
190+
# Workflow execution output objects (generated by action output streaming) older than this value (days) will be automatically deleted. Defaults to None (disabled).
191+
workflow_executions_ttl = None
178192

179193
[keyvalue]
180194
# Allow encryption of values in key value stored qualified as "secret".
@@ -195,7 +209,8 @@ redirect_stderr = False
195209
[messaging]
196210
# URL of all the nodes in a messaging service cluster.
197211
cluster_urls = # comma separated list allowed here.
198-
# Compression algorithm to use for compressing the payloads which are sent over the message bus. Valid values include: zstd, lzma, bz2, gzip. Defaults to no compression.
212+
# Compression algorithm to use for compressing the payloads which are sent over the message bus. Defaults to no compression.
213+
# Valid values: zstd, lzma, bz2, gzip, None
199214
compression = None
200215
# How many times should we retry connection before failing.
201216
connection_retries = 10
@@ -208,6 +223,7 @@ ssl = False
208223
# ca_certs file contains a set of concatenated CA certificates, which are used to validate certificates passed from RabbitMQ.
209224
ssl_ca_certs = None
210225
# Specifies whether a certificate is required from the other side of the connection, and whether it will be validated if provided.
226+
# Valid values: none, optional, required
211227
ssl_cert_reqs = None
212228
# Certificate file used to identify the local connection (client).
213229
ssl_certfile = None

conf/st2rc.sample.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ username = test1
2121
password = testpassword
2222
# or authenticate with an api key.
2323
# api_key = <key>
24+
# Optional additional http basic auth credentials which are sent with each HTTP
25+
# request except the auth request to /v1/auth/tokens endpoint.
26+
# Available in StackStorm >= v3.4.0
27+
# NOTE: Username can't contain colon (:) character.
28+
# basic_auth = username:password
2429

2530
[api]
2631
url = http://127.0.0.1:9101/v1

contrib/linux/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ Example trigger payload:
5555

5656
## Troubleshooting
5757

58-
* On CentOS7/RHEL7, dig is not installed by default. Run ``sudo yum install bind-utils`` to install.
58+
* On CentOS7/RHEL7, dig is not installed by default. Run ``sudo yum install bind-utils`` to install.
59+
* On CentOS8/RHEL8, lsof is not installed by default. Run ``sudo yum install lsof`` to install.

contrib/linux/actions/checks/check_loadavg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/opt/stackstorm/st2/bin/python
22

33
# Copyright 2020 The StackStorm Authors.
44
# Copyright 2019 Extreme Networks, Inc.

contrib/linux/actions/checks/check_processes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/opt/stackstorm/st2/bin/python
22

33
# Copyright 2020 The StackStorm Authors.
44
# Copyright 2019 Extreme Networks, Inc.

contrib/linux/actions/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/opt/stackstorm/st2/bin/python
22

33
# Copyright 2020 The StackStorm Authors.
44
# Copyright 2019 Extreme Networks, Inc.

0 commit comments

Comments
 (0)