Skip to content
Merged
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ Changed

* Update ``pyyaml`` dependency to the latest stable version (5.4). #5207

* Update various dependencies to latest stable versions (``bcrypt``, ``appscheduler``, ``pytz``,
``python-dateutil``, ``psutil``, ``passlib``, ``gunicorn``, ``flex``, ``cryptography``.
``eventlet``, ``greenlet``, ``webob`` , ``mongoengine``, ``pymongo``, ``requests``). #5215

Contributed by @Kami.

Improvements
~~~~~~~~~~~~

Expand Down
32 changes: 16 additions & 16 deletions fixed-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# Packages versions fixed for the whole st2 stack
# Note: amqp is used by kombu
amqp==2.5.2
apscheduler==3.6.3
apscheduler==3.7.0
# requests 2.23 requires chardet < 3.1.0
chardet<3.1.0
# NOTE: 2.0 version breaks pymongo work with hosts
dnspython>=1.16.0,<2.0.0
cryptography==3.3.2
cryptography==3.4.7
# Note: 0.20.0 removed select.poll() on which some of our code and libraries we
# depend on rely
eventlet==0.25.1
flex==6.14.0
eventlet==0.30.2
flex==6.14.1
gitpython==2.1.15
# Note: greenlet is used by eventlet
greenlet==0.4.15
gunicorn==19.9.0
greenlet==1.0.0
gunicorn==20.1.0
jsonpath-rw==1.4.0
jsonschema==2.6.0
kombu==4.6.6
lockfile==0.12.2
mongoengine==0.18.2
mongoengine==0.23.0
networkx==1.11
# NOTE: Recent version substantially affect the performance and add big import time overhead
# See https://github.com/StackStorm/st2/issues/4160#issuecomment-394386433 for details
oslo.config>=1.12.1,<1.13
oslo.utils<5.0,>=4.0.0
paramiko==2.7.2
passlib==1.7.1
passlib==1.7.4
prance==0.9.0
prompt-toolkit==1.0.15
pyinotify==0.9.6; platform_system=="Linux"
pymongo==3.10.0
pymongo==3.11.3
python-editor==1.0.4
python-gnupg==0.4.5
python-keyczar==0.716
pytz==2019.1
pytz==2021.1
pywinrm==0.3.0
pyyaml==5.4
requests[security]==2.23.0
requests[security]==2.25.1
retrying==1.3.3
routes==2.4.1
semver==2.9.0
Expand All @@ -49,17 +49,17 @@ tooz==2.8.0
# Note: virtualenv embeds wheels for pip, wheel, and setuptools. So pinning virtualenv pins those as well.
# virtualenv==20.4.0 (<21) has pip==20.3.3 wheel==0.36.2 setuptools==51.3.3
virtualenv==20.4.0
webob==1.8.5
webob==1.8.7
zake==0.2.2
# test requirements below
bcrypt==3.1.7
bcrypt==3.2.0
jinja2==2.11.3
mock==2.0.0
mock==4.0.3
more-itertools==5.0.0
nose-timer==0.7.5
nose-parallel==0.3.1
psutil==5.6.6
python-dateutil==2.8.0
psutil==5.8.0
python-dateutil==2.8.1
python-statsd==2.1.0
prometheus_client==0.1.1
ujson==1.35
Expand Down
32 changes: 16 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@
# update the component requirements.txt
RandomWords
amqp==2.5.2
apscheduler==3.6.3
apscheduler==3.7.0
argcomplete
bcrypt==3.1.7
bcrypt==3.2.0
chardet<3.1.0
cryptography==3.3.2
cryptography==3.4.7
dnspython>=1.16.0,<2.0.0
eventlet==0.25.1
flex==6.14.0
eventlet==0.30.2
flex==6.14.1
git+https://github.com/StackStorm/logshipper.git@stackstorm_patched#egg=logshipper
git+https://github.com/StackStorm/[email protected]#egg=orquesta
git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master#egg=st2-auth-backend-flat-file
git+https://github.com/StackStorm/st2-auth-ldap.git@master#egg=st2-auth-ldap
git+https://github.com/StackStorm/st2-rbac-backend.git@master#egg=st2-rbac-backend
gitpython==2.1.15
greenlet==0.4.15
gunicorn==19.9.0
greenlet==1.0.0
gunicorn==20.1.0
jinja2==2.11.3
jsonpath-rw==1.4.0
jsonschema==2.6.0
kombu==4.6.6
lockfile==0.12.2
mock==2.0.0
mongoengine==0.18.2
mock==4.0.3
mongoengine==0.23.0
more-itertools==5.0.0
networkx==1.11
nose
Expand All @@ -39,22 +39,22 @@ orjson==3.5.1
oslo.config>=1.12.1,<1.13
oslo.utils<5.0,>=4.0.0
paramiko==2.7.2
passlib==1.7.1
passlib==1.7.4
prettytable
prompt-toolkit==1.0.15
psutil==5.6.6
psutil==5.8.0
pyinotify==0.9.6; platform_system=="Linux"
pymongo==3.10.0
pymongo==3.11.3
pyrabbit
python-dateutil==2.8.0
python-dateutil==2.8.1
python-editor==1.0.4
python-json-logger
python-statsd==2.1.0
pytz==2019.1
pytz==2021.1
pywinrm==0.3.0
pyyaml==5.4
rednose
requests[security]==2.23.0
requests[security]==2.25.1
retrying==1.3.3
routes==2.4.1
semver==2.9.0
Expand All @@ -65,7 +65,7 @@ stevedore==1.30.1
tooz==2.8.0
udatetime==0.0.16
unittest2
webob==1.8.5
webob==1.8.7
webtest
zake==0.2.2
zipp>=0.5,<=1.0.0
8 changes: 4 additions & 4 deletions st2actions/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# If you want to update depdencies for a single component, modify the
# in-requirements.txt for that component and then run 'make requirements' to
# update the component requirements.txt
apscheduler==3.6.3
apscheduler==3.7.0
chardet<3.1.0
eventlet==0.25.1
eventlet==0.30.2
git+https://github.com/StackStorm/logshipper.git@stackstorm_patched#egg=logshipper
gitpython==2.1.15
jinja2==2.11.3
Expand All @@ -16,8 +16,8 @@ lockfile==0.12.2
oslo.config>=1.12.1,<1.13
oslo.utils<5.0,>=4.0.0
pyinotify==0.9.6; platform_system=="Linux"
python-dateutil==2.8.0
python-dateutil==2.8.1
python-json-logger
pyyaml==5.4
requests[security]==2.23.0
requests[security]==2.25.1
six==1.13.0
8 changes: 4 additions & 4 deletions st2api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# If you want to update depdencies for a single component, modify the
# in-requirements.txt for that component and then run 'make requirements' to
# update the component requirements.txt
eventlet==0.25.1
gunicorn==19.9.0
eventlet==0.30.2
gunicorn==20.1.0
jsonschema==2.6.0
kombu==4.6.6
mongoengine==0.18.2
mongoengine==0.23.0
oslo.config>=1.12.1,<1.13
oslo.utils<5.0,>=4.0.0
pymongo==3.10.0
pymongo==3.11.3
simplejson
six==1.13.0
6 changes: 3 additions & 3 deletions st2api/st2api/controllers/v1/actionexecutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _handle_schedule_execution(
:type liveaction: :class:`LiveActionAPI`
"""
if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

# Assert action ref is valid
action_ref = liveaction_api.action
Expand Down Expand Up @@ -799,7 +799,7 @@ def put(self, id, liveaction_api, requester_user, show_secrets=False):

"""
if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

from_model_kwargs = {
"mask_secrets": self._get_mask_secrets(
Expand Down Expand Up @@ -929,7 +929,7 @@ def delete(self, id, requester_user, show_secrets=False):

"""
if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

from_model_kwargs = {
"mask_secrets": self._get_mask_secrets(
Expand Down
2 changes: 1 addition & 1 deletion st2api/st2api/controllers/v1/aliasexecution.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _post(self, payload, requester_user, show_secrets=False, match_multiple=Fals
return

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

format_str = payload.format or ""
command = payload.command or ""
Expand Down
8 changes: 4 additions & 4 deletions st2api/st2api/controllers/v1/keyvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_one(
scope = FULL_USER_SCOPE

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

scope = get_datastore_full_scope(scope)
self._validate_scope(scope=scope)
Expand Down Expand Up @@ -156,7 +156,7 @@ def get_all(
scope = FULL_USER_SCOPE

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

scope = get_datastore_full_scope(scope)

Expand Down Expand Up @@ -284,7 +284,7 @@ def put(self, kvp, name, requester_user, scope=FULL_SYSTEM_SCOPE):
scope = FULL_SYSTEM_SCOPE

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

scope = getattr(kvp, "scope", scope)
scope = get_datastore_full_scope(scope)
Expand Down Expand Up @@ -362,7 +362,7 @@ def delete(self, name, requester_user, scope=FULL_SYSTEM_SCOPE, user=None):
scope = FULL_SYSTEM_SCOPE

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

scope = get_datastore_full_scope(scope)
self._validate_scope(scope=scope)
Expand Down
4 changes: 2 additions & 2 deletions st2api/st2api/controllers/v1/packs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def post(self, pack_install_request, requester_user=None):
parameters["skip_dependencies"] = True

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

new_liveaction_api = LiveActionCreateAPI(
action="packs.install", parameters=parameters, user=requester_user.name
Expand All @@ -127,7 +127,7 @@ def post(self, pack_uninstall_request, ref_or_id=None, requester_user=None):
parameters = {"packs": pack_uninstall_request.packs}

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

new_liveaction_api = LiveActionCreateAPI(
action="packs.uninstall", parameters=parameters, user=requester_user.name
Expand Down
4 changes: 2 additions & 2 deletions st2api/st2api/controllers/v1/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def post(self, rule, requester_user):
)

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)

# Validate that the authenticated user is admin if user query param is provided
user = requester_user.name
Expand Down Expand Up @@ -195,7 +195,7 @@ def put(self, rule, rule_ref_or_id, requester_user):
)

if not requester_user:
requester_user = UserDB(cfg.CONF.system_user.user)
requester_user = UserDB(name=cfg.CONF.system_user.user)
# Validate that the authenticated user is admin if user query param is provided
user = requester_user.name
rbac_utils.assert_user_is_admin_if_user_query_param_is_provided(
Expand Down
2 changes: 1 addition & 1 deletion st2api/tests/unit/controllers/v1/test_executions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ def test_get_single_attribute_success(self):

resp = self.app.get("/v1/executions/%s/attribute/trigger_instance" % (exec_id))
self.assertEqual(resp.status_int, 200)
self.assertEqual(resp.json, None)
self.assertEqual(resp.json, {})

data = {}
data["status"] = action_constants.LIVEACTION_STATUS_SUCCEEDED
Expand Down
6 changes: 5 additions & 1 deletion st2api/tests/unit/controllers/v1/test_executions_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,18 @@ def mock_get_token(*args, **kwargs):
return USR_TOKEN


def mock_get_by_name(name):
return UserDB(name=name)


@mock.patch.object(PoolPublisher, "publish", mock.MagicMock())
class ActionExecutionControllerTestCaseAuthEnabled(FunctionalTest):

enable_auth = True

@classmethod
@mock.patch.object(Token, "get", mock.MagicMock(side_effect=mock_get_token))
@mock.patch.object(User, "get_by_name", mock.MagicMock(side_effect=UserDB))
@mock.patch.object(User, "get_by_name", mock_get_by_name)
@mock.patch.object(
action_validator, "validate_action", mock.MagicMock(return_value=True)
)
Expand Down
10 changes: 5 additions & 5 deletions st2auth/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# If you want to update depdencies for a single component, modify the
# in-requirements.txt for that component and then run 'make requirements' to
# update the component requirements.txt
bcrypt==3.1.7
eventlet==0.25.1
bcrypt==3.2.0
eventlet==0.30.2
git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master#egg=st2-auth-backend-flat-file
git+https://github.com/StackStorm/st2-auth-ldap.git@master#egg=st2-auth-ldap
gunicorn==19.9.0
gunicorn==20.1.0
oslo.config>=1.12.1,<1.13
passlib==1.7.1
pymongo==3.10.0
passlib==1.7.4
pymongo==3.11.3
six==1.13.0
stevedore==1.30.1
8 changes: 4 additions & 4 deletions st2client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
# update the component requirements.txt
argcomplete
chardet<3.1.0
cryptography==3.3.2
cryptography==3.4.7
jsonpath-rw==1.4.0
jsonschema==2.6.0
more-itertools==5.0.0
orjson==3.5.1
prettytable
prompt-toolkit==1.0.15
python-dateutil==2.8.0
python-dateutil==2.8.1
python-editor==1.0.4
pytz==2019.1
pytz==2021.1
pyyaml==5.4
requests[security]==2.23.0
requests[security]==2.25.1
six==1.13.0
sseclient-py==1.7
zipp>=0.5,<=1.0.0
Loading