Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-oslo.middleware for
openSUSE:Factory checked in at 2024-09-04 13:22:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.middleware (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.middleware.new.10096 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.middleware"
Wed Sep 4 13:22:43 2024 rev:22 rq:1198361 version:6.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-oslo.middleware/python-oslo.middleware.changes
2023-12-01 21:27:35.482778791 +0100
+++
/work/SRC/openSUSE:Factory/.python-oslo.middleware.new.10096/python-oslo.middleware.changes
2024-09-04 13:22:56.149528048 +0200
@@ -1,0 +2,29 @@
+Mon Sep 2 17:31:43 UTC 2024 - [email protected]
+
+- update to version 6.2.0
+ - reno: Update master for unmaintained/xena
+ - Remove old excludes
+ - reno: Update master for unmaintained/zed
+ - Make ConfigInvalid generic
+ - reno: Update master for unmaintained/victoria
+ - Update master for stable/2024.1
+ - pre-commit: Bump versions
+ - reno: Update master for unmaintained/wallaby
+ - pre-commit: Integrate bandit
+ - Add a enabled by files healthcheck plugin
+
+-------------------------------------------------------------------
+Thu May 2 22:13:06 UTC 2024 - [email protected]
+
+- update to version 6.1.0
+ - healthcheck: Ignore proxied requests
+ - Bump hacking
+ - Imported Translations from Zanata
+ - Update python classifier in setup.cfg
+ - healthcheck: Limit source IP range
+ - reno: Update master for unmaintained/yoga
+ - Remove oslo namespace package (again)
+ - Remove deprecated SSLMiddleware
+ - Update master for stable/2023.2
+
+-------------------------------------------------------------------
Old:
----
oslo.middleware-5.2.0.tar.gz
New:
----
oslo.middleware-6.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.middleware.spec ++++++
--- /var/tmp/diff_new_pack.bLQ5DV/_old 2024-09-04 13:22:57.981604710 +0200
+++ /var/tmp/diff_new_pack.bLQ5DV/_new 2024-09-04 13:22:57.985604878 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-oslo.middleware
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: python-oslo.middleware
-Version: 5.2.0
+Version: 6.2.0
Release: 0
Summary: OpenStack oslo.middleware library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/oslo.middleware
-Source0:
https://files.pythonhosted.org/packages/source/o/oslo.middleware/oslo.middleware-5.2.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/o/oslo.middleware/oslo.middleware-6.2.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-Jinja2 >= 2.10
BuildRequires: python3-WebOb >= 1.8.0
@@ -85,7 +85,7 @@
This package contains the documentation.
%prep
-%autosetup -p1 -n oslo.middleware-5.2.0
+%autosetup -p1 -n oslo.middleware-6.2.0
%py_req_cleanup
%build
++++++ oslo.middleware-5.2.0.tar.gz -> oslo.middleware-6.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/.pre-commit-config.yaml
new/oslo.middleware-6.2.0/.pre-commit-config.yaml
--- old/oslo.middleware-5.2.0/.pre-commit-config.yaml 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/.pre-commit-config.yaml 2024-08-21
17:11:12.000000000 +0200
@@ -1,15 +1,6 @@
-# We from the Oslo project decided to pin repos based on the
-# commit hash instead of the version tag to prevend arbitrary
-# code from running in developer's machines. To update to a
-# newer version, run `pre-commit autoupdate` and then replace
-# the newer versions with their commit hash.
-
-default_language_version:
- python: python3
-
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0
+ rev: v4.5.0
hooks:
- id: trailing-whitespace
# Replaces or checks mixed line ending
@@ -27,13 +18,14 @@
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- - repo: local
+ - repo: https://opendev.org/openstack/hacking
+ rev: 6.1.0
hooks:
- - id: flake8
- name: flake8
- additional_dependencies:
- - hacking>=3.0.1,<3.1.0
- language: python
- entry: flake8
- files: '^.*\.py$'
+ - id: hacking
+ additional_dependencies: []
exclude: '^(doc|releasenotes|tools)/.*$'
+ - repo: https://github.com/PyCQA/bandit
+ rev: 1.7.6
+ hooks:
+ - id: bandit
+ args: ['-x', 'tests']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/AUTHORS
new/oslo.middleware-6.2.0/AUTHORS
--- old/oslo.middleware-5.2.0/AUTHORS 2023-08-29 14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/AUTHORS 2024-08-21 17:11:57.000000000 +0200
@@ -1,4 +1,5 @@
Abhijeet Malawade <[email protected]>
+Abhishek Kekane <[email protected]>
Adam Kijak <[email protected]>
Aditi Raveesh <[email protected]>
Akihiro Motoki <[email protected]>
@@ -74,6 +75,8 @@
Sean Dague <[email protected]>
Sean McGinnis <[email protected]>
Sergey Kraynev <[email protected]>
+Stephen Finucane <[email protected]>
+Takashi Kajinami <[email protected]>
Takashi Kajinami <[email protected]>
Thomas Goirand <[email protected]>
Thomas Goirand <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/ChangeLog
new/oslo.middleware-6.2.0/ChangeLog
--- old/oslo.middleware-5.2.0/ChangeLog 2023-08-29 14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/ChangeLog 2024-08-21 17:11:57.000000000 +0200
@@ -1,6 +1,36 @@
CHANGES
=======
+6.2.0
+-----
+
+* Make ConfigInvalid generic
+* Add a enabled by files healthcheck plugin
+* reno: Update master for unmaintained/zed
+* Remove old excludes
+* pre-commit: Integrate bandit
+* pre-commit: Bump versions
+* Update master for stable/2024.1
+* reno: Update master for unmaintained/xena
+* reno: Update master for unmaintained/wallaby
+* reno: Update master for unmaintained/victoria
+
+6.1.0
+-----
+
+* reno: Update master for unmaintained/yoga
+* Bump hacking
+* Update python classifier in setup.cfg
+
+6.0.0
+-----
+
+* healthcheck: Ignore proxied requests
+* Remove deprecated SSLMiddleware
+* Remove oslo namespace package (again)
+* Imported Translations from Zanata
+* Update master for stable/2023.2
+
5.2.0
-----
@@ -43,6 +73,7 @@
* Add Python3 yoga unit tests
* Update master for stable/xena
* Add oslo.config.opts entrypoint for basic auth middleware
+* healthcheck: Limit source IP range
4.4.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/PKG-INFO
new/oslo.middleware-6.2.0/PKG-INFO
--- old/oslo.middleware-5.2.0/PKG-INFO 2023-08-29 14:28:51.787379000 +0200
+++ new/oslo.middleware-6.2.0/PKG-INFO 2024-08-21 17:11:57.851624300 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: oslo.middleware
-Version: 5.2.0
+Version: 6.2.0
Summary: Oslo Middleware library
Home-page: https://docs.openstack.org/oslo.middleware/latest/
Author: OpenStack
@@ -41,6 +41,7 @@
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/doc/requirements.txt
new/oslo.middleware-6.2.0/doc/requirements.txt
--- old/oslo.middleware-5.2.0/doc/requirements.txt 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/doc/requirements.txt 2024-08-21
17:11:12.000000000 +0200
@@ -1,9 +1,5 @@
-# The order of packages is significant, because pip processes them in the order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
# These are needed for docs generation
-
openstackdocstheme>=2.2.0 # Apache-2.0
-sphinx>=2.0.0,!=2.1.0 # BSD
+sphinx>=2.0.0 # BSD
reno>=3.1.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/doc/source/reference/healthcheck_plugins.rst
new/oslo.middleware-6.2.0/doc/source/reference/healthcheck_plugins.rst
--- old/oslo.middleware-5.2.0/doc/source/reference/healthcheck_plugins.rst
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/doc/source/reference/healthcheck_plugins.rst
2024-08-21 17:11:12.000000000 +0200
@@ -8,6 +8,9 @@
.. automodule:: oslo_middleware.healthcheck.disable_by_file
:members:
+.. automodule:: oslo_middleware.healthcheck.enable_by_files
+ :members:
+
Available Plugins
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo/__init__.py
new/oslo.middleware-6.2.0/oslo/__init__.py
--- old/oslo.middleware-5.2.0/oslo/__init__.py 2023-08-29 14:28:22.000000000
+0200
+++ new/oslo.middleware-6.2.0/oslo/__init__.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,13 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-__import__('pkg_resources').declare_namespace(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo/middleware/__init__.py
new/oslo.middleware-6.2.0/oslo/middleware/__init__.py
--- old/oslo.middleware-5.2.0/oslo/middleware/__init__.py 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo/middleware/__init__.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import sys
-import warnings
-
-def deprecated():
- new_name = __name__.replace('.', '_')
- warnings.warn(
- ('The oslo namespace package is deprecated. Please use %s instead.' %
- new_name),
- DeprecationWarning,
- stacklevel=3,
- )
-
-
-# NOTE(dims): We cannot remove the deprecation or redirects below
-# until Liberty-EOL
-deprecated()
-
-from oslo_middleware import base
-from oslo_middleware import catch_errors
-from oslo_middleware import correlation_id
-from oslo_middleware import debug
-from oslo_middleware import request_id
-from oslo_middleware import sizelimit
-
-sys.modules['oslo.middleware.base'] = base
-sys.modules['oslo.middleware.catch_errors'] = catch_errors
-sys.modules['oslo.middleware.correlation_id'] = correlation_id
-sys.modules['oslo.middleware.debug'] = debug
-sys.modules['oslo.middleware.request_id'] = request_id
-sys.modules['oslo.middleware.sizelimit'] = sizelimit
-
-from oslo_middleware.catch_errors import CatchErrors
-from oslo_middleware.correlation_id import CorrelationId
-from oslo_middleware.cors import CORS
-from oslo_middleware.debug import Debug
-from oslo_middleware.healthcheck import Healthcheck
-from oslo_middleware.http_proxy_to_wsgi import HTTPProxyToWSGI
-from oslo_middleware.request_id import RequestId
-from oslo_middleware.sizelimit import RequestBodySizeLimiter
-from oslo_middleware.ssl import SSLMiddleware
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo.middleware.egg-info/PKG-INFO
new/oslo.middleware-6.2.0/oslo.middleware.egg-info/PKG-INFO
--- old/oslo.middleware-5.2.0/oslo.middleware.egg-info/PKG-INFO 2023-08-29
14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo.middleware.egg-info/PKG-INFO 2024-08-21
17:11:57.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: oslo.middleware
-Version: 5.2.0
+Version: 6.2.0
Summary: Oslo Middleware library
Home-page: https://docs.openstack.org/oslo.middleware/latest/
Author: OpenStack
@@ -41,6 +41,7 @@
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo.middleware.egg-info/SOURCES.txt
new/oslo.middleware-6.2.0/oslo.middleware.egg-info/SOURCES.txt
--- old/oslo.middleware-5.2.0/oslo.middleware.egg-info/SOURCES.txt
2023-08-29 14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo.middleware.egg-info/SOURCES.txt
2024-08-21 17:11:57.000000000 +0200
@@ -27,7 +27,6 @@
doc/source/reference/cors.rst
doc/source/reference/healthcheck_plugins.rst
doc/source/reference/index.rst
-oslo/__init__.py
oslo.middleware.egg-info/PKG-INFO
oslo.middleware.egg-info/SOURCES.txt
oslo.middleware.egg-info/dependency_links.txt
@@ -36,7 +35,6 @@
oslo.middleware.egg-info/pbr.json
oslo.middleware.egg-info/requires.txt
oslo.middleware.egg-info/top_level.txt
-oslo/middleware/__init__.py
oslo_middleware/__init__.py
oslo_middleware/_i18n.py
oslo_middleware/base.py
@@ -45,16 +43,17 @@
oslo_middleware/correlation_id.py
oslo_middleware/cors.py
oslo_middleware/debug.py
+oslo_middleware/exceptions.py
oslo_middleware/http_proxy_to_wsgi.py
oslo_middleware/opts.py
oslo_middleware/request_id.py
oslo_middleware/sizelimit.py
-oslo_middleware/ssl.py
oslo_middleware/stats.py
oslo_middleware/version.py
oslo_middleware/healthcheck/__init__.py
oslo_middleware/healthcheck/__main__.py
oslo_middleware/healthcheck/disable_by_file.py
+oslo_middleware/healthcheck/enable_by_files.py
oslo_middleware/healthcheck/opts.py
oslo_middleware/healthcheck/pluginbase.py
oslo_middleware/locale/en_GB/LC_MESSAGES/oslo_middleware.po
@@ -70,15 +69,21 @@
oslo_middleware/tests/test_opts.py
oslo_middleware/tests/test_request_id.py
oslo_middleware/tests/test_sizelimit.py
-oslo_middleware/tests/test_ssl.py
oslo_middleware/tests/test_stats.py
releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml
releasenotes/notes/basic-auth-middleware-5f812399e325425f.yaml
releasenotes/notes/compat_headers-55a635b8ec01b6f1.yaml
releasenotes/notes/drop-python27-support-a6361831195bf29c.yaml
+releasenotes/notes/enable-by-files-healthcheck-29938e3d6b8e5730.yaml
releasenotes/notes/global_request_id-a8ec7260fbd76444.yaml
+releasenotes/notes/healthcheck-allowed_source_ranges-9cbaf89f65914851.yaml
+releasenotes/notes/healthcheck-ignore_proxied_requests-d04d1661bd687bc6.yaml
releasenotes/notes/log_max_request_body_size-1835363-6f37946210a100d7.yaml
+releasenotes/notes/remove-oslo-namespace-b0f050f074d12aff.yaml
+releasenotes/notes/remove-ssl-middleware-0ce922b05f83c447.yaml
releasenotes/source/2023.1.rst
+releasenotes/source/2023.2.rst
+releasenotes/source/2024.1.rst
releasenotes/source/conf.py
releasenotes/source/index.rst
releasenotes/source/ocata.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo.middleware.egg-info/entry_points.txt
new/oslo.middleware-6.2.0/oslo.middleware.egg-info/entry_points.txt
--- old/oslo.middleware-5.2.0/oslo.middleware.egg-info/entry_points.txt
2023-08-29 14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo.middleware.egg-info/entry_points.txt
2024-08-21 17:11:57.000000000 +0200
@@ -5,11 +5,11 @@
oslo.middleware.healthcheck = oslo_middleware.opts:list_opts_healthcheck
oslo.middleware.http_proxy_to_wsgi =
oslo_middleware.opts:list_opts_http_proxy_to_wsgi
oslo.middleware.sizelimit = oslo_middleware.opts:list_opts_sizelimit
-oslo.middleware.ssl = oslo_middleware.opts:list_opts_ssl
[oslo.middleware.healthcheck]
disable_by_file =
oslo_middleware.healthcheck.disable_by_file:DisableByFileHealthcheck
disable_by_files_ports =
oslo_middleware.healthcheck.disable_by_file:DisableByFilesPortsHealthcheck
+enable_by_files =
oslo_middleware.healthcheck.enable_by_files:EnableByFilesHealthcheck
[paste.app_factory]
healthcheck = oslo_middleware:Healthcheck.app_factory
@@ -24,5 +24,4 @@
http_proxy_to_wsgi = oslo_middleware:HTTPProxyToWSGI.factory
request_id = oslo_middleware:RequestId.factory
sizelimit = oslo_middleware:RequestBodySizeLimiter.factory
-ssl = oslo_middleware:SSLMiddleware.factory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo.middleware.egg-info/pbr.json
new/oslo.middleware-6.2.0/oslo.middleware.egg-info/pbr.json
--- old/oslo.middleware-5.2.0/oslo.middleware.egg-info/pbr.json 2023-08-29
14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo.middleware.egg-info/pbr.json 2024-08-21
17:11:57.000000000 +0200
@@ -1 +1 @@
-{"git_version": "4ba32ed", "is_release": true}
\ No newline at end of file
+{"git_version": "67a0a39", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo.middleware.egg-info/requires.txt
new/oslo.middleware-6.2.0/oslo.middleware.egg-info/requires.txt
--- old/oslo.middleware-5.2.0/oslo.middleware.egg-info/requires.txt
2023-08-29 14:28:51.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo.middleware.egg-info/requires.txt
2024-08-21 17:11:57.000000000 +0200
@@ -6,6 +6,6 @@
oslo.context>=2.19.2
oslo.i18n>=3.15.3
oslo.utils>=3.33.0
-pbr!=2.1.0,>=2.0.0
+pbr>=2.0.0
statsd>=3.2.1
stevedore>=1.20.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo_middleware/__init__.py
new/oslo.middleware-6.2.0/oslo_middleware/__init__.py
--- old/oslo.middleware-5.2.0/oslo_middleware/__init__.py 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/__init__.py 2024-08-21
17:11:12.000000000 +0200
@@ -18,8 +18,7 @@
'Healthcheck',
'HTTPProxyToWSGI',
'RequestId',
- 'RequestBodySizeLimiter',
- 'SSLMiddleware']
+ 'RequestBodySizeLimiter']
from oslo_middleware.basic_auth import BasicAuthMiddleware
from oslo_middleware.catch_errors import CatchErrors
@@ -30,4 +29,3 @@
from oslo_middleware.http_proxy_to_wsgi import HTTPProxyToWSGI
from oslo_middleware.request_id import RequestId
from oslo_middleware.sizelimit import RequestBodySizeLimiter
-from oslo_middleware.ssl import SSLMiddleware
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo_middleware/basic_auth.py
new/oslo.middleware-6.2.0/oslo_middleware/basic_auth.py
--- old/oslo.middleware-5.2.0/oslo_middleware/basic_auth.py 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/basic_auth.py 2024-08-21
17:11:12.000000000 +0200
@@ -22,6 +22,7 @@
from oslo_config import cfg
from oslo_middleware import base
+from oslo_middleware import exceptions
LOG = logging.getLogger(__name__)
@@ -34,12 +35,6 @@
cfg.CONF.register_opts(OPTS, group='oslo_middleware')
-class ConfigInvalid(Exception):
- def __init__(self, error_msg):
- super().__init__(
- 'Invalid configuration file. %(error_msg)s')
-
-
class BasicAuthMiddleware(base.ConfigurableMiddleware):
"""Middleware which performs HTTP basic authentication on requests"""
@@ -135,7 +130,8 @@
if entry and ':' in entry:
parse_entry(entry)
except OSError:
- raise ConfigInvalid(error_msg='Problem reading auth user file')
+ raise exceptions.ConfigInvalid(
+ error_msg='Problem reading auth user file')
def parse_entry(entry):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo_middleware/exceptions.py
new/oslo.middleware-6.2.0/oslo_middleware/exceptions.py
--- old/oslo.middleware-5.2.0/oslo_middleware/exceptions.py 1970-01-01
01:00:00.000000000 +0100
+++ new/oslo.middleware-6.2.0/oslo_middleware/exceptions.py 2024-08-21
17:11:12.000000000 +0200
@@ -0,0 +1,17 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+class ConfigInvalid(Exception):
+ def __init__(self, error_msg):
+ super().__init__(
+ 'Invalid configuration. %(error_msg)s')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/healthcheck/__init__.py
new/oslo.middleware-6.2.0/oslo_middleware/healthcheck/__init__.py
--- old/oslo.middleware-5.2.0/oslo_middleware/healthcheck/__init__.py
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/healthcheck/__init__.py
2024-08-21 17:11:12.000000000 +0200
@@ -16,6 +16,7 @@
import collections
import gc
import io
+import ipaddress
import json
import platform
import socket
@@ -38,6 +39,7 @@
greenlet = None
from oslo_middleware import base
+from oslo_middleware.exceptions import ConfigInvalid
from oslo_middleware.healthcheck import opts
@@ -391,6 +393,16 @@
group='healthcheck')
self._path = self._conf_get('path')
self._show_details = self._conf_get('detailed')
+ self._source_ranges = [
+ ipaddress.ip_network(r)
+ for r in self._conf_get('allowed_source_ranges')]
+ self._ignore_proxied_requests = self._conf_get(
+ 'ignore_proxied_requests')
+
+ # (abhishekk): Verify that if `enable_by_files` and
+ # `disable_by_file` backends are not enabled at same time.
+ self._verify_configured_plugins()
+
self._backends = stevedore.NamedExtensionManager(
self.NAMESPACE, self._conf_get('backends'),
name_order=True, invoke_on_load=True,
@@ -408,6 +420,15 @@
self._default_accept = 'text/plain'
self._ignore_path = False
+ def _verify_configured_plugins(self):
+ backends = self._conf_get('backends')
+ exclusive_plugins = ['disable_by_file', 'enable_by_files']
+
+ if set(exclusive_plugins).issubset(set(backends)):
+ raise ConfigInvalid('`enable_by_files` plugin and '
+ '`disable_by_file` plugin should not be '
+ 'enabled at the same time.')
+
def _conf_get(self, key, group='healthcheck'):
return super(Healthcheck, self)._conf_get(key, group=group)
@@ -550,6 +571,24 @@
def process_request(self, req):
if not self._ignore_path and req.path != self._path:
return None
+
+ if self._source_ranges:
+ remote_addr = ipaddress.ip_address(req.remote_addr)
+ for r in self._source_ranges:
+ if r.version == remote_addr.version and remote_addr in r:
+ break
+ else:
+ # Because source ip is not included in allowed ranges, ignore
+ # the request in this middleware.
+ return None
+
+ if self._ignore_proxied_requests:
+ for hdr in [
+ 'FORWARDED', 'FORWARDED_PROTO', 'FORWARDED_HOST',
+ 'FORWARDED_FOR', 'FORWARDED_PREFIX']:
+ if req.environ.get("HTTP_X_%s" % hdr):
+ return None
+
results = [ext.obj.healthcheck(req.server_port)
for ext in self._backends]
healthy = self._are_results_healthy(results)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/healthcheck/enable_by_files.py
new/oslo.middleware-6.2.0/oslo_middleware/healthcheck/enable_by_files.py
--- old/oslo.middleware-5.2.0/oslo_middleware/healthcheck/enable_by_files.py
1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.middleware-6.2.0/oslo_middleware/healthcheck/enable_by_files.py
2024-08-21 17:11:12.000000000 +0200
@@ -0,0 +1,60 @@
+# Copyright 2024 Red Hat.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import logging
+import os
+
+from oslo_middleware.healthcheck import opts
+from oslo_middleware.healthcheck import pluginbase
+
+LOG = logging.getLogger(__name__)
+
+
+class EnableByFilesHealthcheck(pluginbase.HealthcheckBaseExtension):
+ """EnableByFilesHealthcheck healthcheck middleware plugin
+
+ This plugin checks presence of a file at a specified location.
+
+ Example of middleware configuration:
+
+ .. code-block:: ini
+
+ [app:healthcheck]
+ paste.app_factory = oslo_middleware:Healthcheck.app_factory
+ path = /healthcheck
+ backends = enable_by_files
+ enable_by_file_paths = /var/lib/glance/images/.marker,
+ /var/lib/glance/os_glance_staging_store/.marker
+ # set to True to enable detailed output, False is the default
+ detailed = False
+ """
+
+ def __init__(self, *args, **kwargs):
+ super(EnableByFilesHealthcheck, self).__init__(*args, **kwargs)
+ self.oslo_conf.register_opts(opts.ENABLE_BY_FILES_OPTS,
+ group='healthcheck')
+ self.file_paths = self._conf_get('enable_by_file_paths')
+
+ def healthcheck(self, server_port):
+ for file_path in self.file_paths:
+ if not os.path.exists(file_path):
+ LOG.warning('EnableByFiles healthcheck middleware: Path %s '
+ 'is not present', file_path)
+ return pluginbase.HealthcheckResult(
+ available=False, reason="FILE PATH MISSING",
+ details='File path %s is missing' % file_path)
+ return pluginbase.HealthcheckResult(
+ available=True, reason="OK",
+ details='Specified file paths are available')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/healthcheck/opts.py
new/oslo.middleware-6.2.0/oslo_middleware/healthcheck/opts.py
--- old/oslo.middleware-5.2.0/oslo_middleware/healthcheck/opts.py
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/healthcheck/opts.py
2024-08-21 17:11:12.000000000 +0200
@@ -29,6 +29,14 @@
default=[],
help='Additional backends that can perform health checks and '
'report that information back as part of a request.'),
+ cfg.ListOpt('allowed_source_ranges',
+ default=[],
+ help='A list of network addresses to limit source ip allowed '
+ 'to access healthcheck information. Any request from ip '
+ 'outside of these network addresses are ignored.'),
+ cfg.BoolOpt('ignore_proxied_requests',
+ default=False,
+ help='Ignore requests with proxy headers.')
]
@@ -49,3 +57,11 @@
'Expects a "port:path" list of strings. Used by '
'DisableByFilesPortsHealthcheck plugin.'),
]
+
+
+ENABLE_BY_FILES_OPTS = [
+ cfg.ListOpt('enable_by_file_paths',
+ default=[],
+ help='Check the presence of files. Used by '
+ 'EnableByFilesHealthcheck plugin.'),
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo_middleware/opts.py
new/oslo.middleware-6.2.0/oslo_middleware/opts.py
--- old/oslo.middleware-5.2.0/oslo_middleware/opts.py 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/opts.py 2024-08-21
17:11:12.000000000 +0200
@@ -20,12 +20,10 @@
from oslo_middleware.healthcheck import opts as healthcheck_opts
from oslo_middleware import http_proxy_to_wsgi
from oslo_middleware import sizelimit
-from oslo_middleware import ssl
__all__ = [
'list_opts',
'list_opts_sizelimit',
- 'list_opts_ssl',
'list_opts_cors',
'list_opts_http_proxy_to_wsgi',
'list_opts_healthcheck',
@@ -55,7 +53,6 @@
return list(
itertools.chain(
list_opts_sizelimit(),
- list_opts_ssl(),
list_opts_cors(),
list_opts_http_proxy_to_wsgi(),
list_opts_healthcheck(),
@@ -88,30 +85,6 @@
]
-def list_opts_ssl():
- """Return a list of oslo.config options for the SSL middleware.
-
- The returned list includes all oslo.config options which may be registered
- at runtime by the library.
-
- Each element of the list is a tuple. The first element is the name of the
- group under which the list of elements in the second element will be
- registered. A group name of None corresponds to the [DEFAULT] group in
- config files.
-
- This function is also discoverable via the 'oslo.middleware' entry point
- under the 'oslo.config.opts' namespace.
-
- The purpose of this is to allow tools like the Oslo sample config file
- generator to discover the options exposed to users by this library.
-
- :returns: a list of (group_name, opts) tuples
- """
- return [
- ('oslo_middleware', copy.deepcopy(ssl.OPTS)),
- ]
-
-
def list_opts_cors():
"""Return a list of oslo.config options for the cors middleware.
@@ -184,7 +157,8 @@
return [
('healthcheck', copy.deepcopy(healthcheck_opts.HEALTHCHECK_OPTS +
healthcheck_opts.DISABLE_BY_FILE_OPTS +
- healthcheck_opts.DISABLE_BY_FILES_OPTS))
+ healthcheck_opts.DISABLE_BY_FILES_OPTS +
+ healthcheck_opts.ENABLE_BY_FILES_OPTS))
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/oslo_middleware/ssl.py
new/oslo.middleware-6.2.0/oslo_middleware/ssl.py
--- old/oslo.middleware-5.2.0/oslo_middleware/ssl.py 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/ssl.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied. See the License for the specific language governing permissions and
-# limitations under the License.
-from debtcollector import removals
-from oslo_config import cfg
-from oslo_middleware import base
-
-
-OPTS = [
- cfg.StrOpt('secure_proxy_ssl_header',
- default='X-Forwarded-Proto',
- deprecated_for_removal=True,
- help="The HTTP Header that will be used to determine what "
- "the original request protocol scheme was, even if it was "
- "hidden by a SSL termination proxy.")
-]
-
-
-class SSLMiddleware(base.ConfigurableMiddleware):
- """SSL termination proxies middleware.
-
- This middleware overloads wsgi.url_scheme with the one provided in
- secure_proxy_ssl_header header. This is useful when behind a SSL
- termination proxy.
- """
-
- def __init__(self, application, *args, **kwargs):
- removals.removed_module(__name__, "oslo_middleware.http_proxy_to_wsgi")
- super(SSLMiddleware, self).__init__(application, *args, **kwargs)
- self.oslo_conf.register_opts(OPTS, group='oslo_middleware')
-
- def process_request(self, req):
- self.header_name = 'HTTP_{0}'.format(
- self._conf_get('secure_proxy_ssl_header').upper()
- .replace('-', '_'))
- req.environ['wsgi.url_scheme'] = req.environ.get(
- self.header_name, req.environ['wsgi.url_scheme'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/tests/test_auth_basic.py
new/oslo.middleware-6.2.0/oslo_middleware/tests/test_auth_basic.py
--- old/oslo.middleware-5.2.0/oslo_middleware/tests/test_auth_basic.py
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/tests/test_auth_basic.py
2024-08-21 17:11:12.000000000 +0200
@@ -21,6 +21,7 @@
import webob
from oslo_middleware import basic_auth as auth
+from oslo_middleware import exceptions as exc
from oslotest import base as test_base
@@ -116,7 +117,7 @@
auth.validate_auth_file(auth_file)
# failed, missing auth file
auth_file = auth_file + '.missing'
- self.assertRaises(auth.ConfigInvalid,
+ self.assertRaises(exc.ConfigInvalid,
auth.validate_auth_file, auth_file)
# failed, invalid entry
auth_file = self.write_auth_file(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/tests/test_entry_points.py
new/oslo.middleware-6.2.0/oslo_middleware/tests/test_entry_points.py
--- old/oslo.middleware-5.2.0/oslo_middleware/tests/test_entry_points.py
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/tests/test_entry_points.py
2024-08-21 17:11:12.000000000 +0200
@@ -27,7 +27,6 @@
'http_proxy_to_wsgi': 'HTTPProxyToWSGI',
'request_id': 'RequestId',
'sizelimit': 'RequestBodySizeLimiter',
- 'ssl': 'SSLMiddleware',
}
em = stevedore.ExtensionManager('paste.filter_factory')
@@ -36,3 +35,17 @@
factory_names = [extension.name for extension in em]
self.assertThat(factory_names,
matchers.ContainsAll(factory_classes))
+
+ def test_healthcheck_entry_points(self):
+ healthcheck_plugins = {
+ 'disable_by_file': 'DisableByFileHealthcheck',
+ 'disable_by_files_ports': 'DisableByFilesPortsHealthcheck',
+ 'enable_by_files': 'EnableByFilesHealthcheck'
+ }
+
+ em = stevedore.ExtensionManager('oslo.middleware.healthcheck')
+
+ # Ensure all the healthcheck plugins are defined by their names
+ plugin_names = [extension.name for extension in em]
+ self.assertThat(plugin_names,
+ matchers.ContainsAll(healthcheck_plugins))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/tests/test_healthcheck.py
new/oslo.middleware-6.2.0/oslo_middleware/tests/test_healthcheck.py
--- old/oslo.middleware-5.2.0/oslo_middleware/tests/test_healthcheck.py
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/tests/test_healthcheck.py
2024-08-21 17:11:12.000000000 +0200
@@ -24,6 +24,7 @@
import webob.dec
import webob.exc
+from oslo_middleware.exceptions import ConfigInvalid
from oslo_middleware import healthcheck
from oslo_middleware.healthcheck import __main__
@@ -63,20 +64,27 @@
def _do_test_request(self, conf={}, path='/healthcheck',
accept='text/plain', method='GET',
- server_port=80):
+ server_port=80, headers=None,
+ remote_addr='127.0.0.1'):
self.app = healthcheck.Healthcheck(self.application, conf)
req = webob.Request.blank(path, accept=accept, method=method)
req.server_port = server_port
+ if headers:
+ req.headers = headers
+ req.remote_addr = remote_addr
res = req.get_response(self.app)
return res
def _do_test(self, conf={}, path='/healthcheck',
expected_code=webob.exc.HTTPOk.code,
expected_body=b'', accept='text/plain',
- method='GET', server_port=80):
+ method='GET', server_port=80, headers=None,
+ remote_addr='127.0.0.1'):
res = self._do_test_request(conf=conf, path=path,
accept=accept, method=method,
- server_port=server_port)
+ server_port=server_port,
+ headers=headers,
+ remote_addr=remote_addr)
self.assertEqual(expected_code, res.status_int)
self.assertEqual(expected_body, res.body)
@@ -194,9 +202,104 @@
server_port=81)
self.assertIn('disable_by_files_ports', self.app._backends.names())
+ def test_enablefile_disablefile_configured(self):
+ conf = {'backends': 'disable_by_file,enable_by_files'}
+ self.assertRaises(ConfigInvalid,
+ healthcheck.Healthcheck, self.application, conf)
+
+ def test_enablefile_unconfigured(self):
+ conf = {'backends': 'enable_by_files'}
+ self._do_test(conf, expected_body=b'OK')
+ self.assertIn('enable_by_files', self.app._backends.names())
+
+ def test_enablefile_enabled(self):
+ filename = self.create_tempfiles([('.test', '.foobar')])[0]
+ conf = {'backends': 'enable_by_files',
+ 'enable_by_file_paths': filename}
+ self._do_test(conf, expected_body=b'OK')
+ self.assertIn('enable_by_files', self.app._backends.names())
+
+ def test_enablefile_enabled_head(self):
+ filename = self.create_tempfiles([('.test', '.foobar')])[0]
+ conf = {'backends': 'enable_by_files',
+ 'enable_by_file_paths': filename}
+ self._do_test(conf, expected_body=b'', method='HEAD',
+ expected_code=webob.exc.HTTPNoContent.code)
+
+ def test_enablefile_enabled_html_detailed(self):
+ filename = self.create_tempfiles([('.test', '.foobar')])[0]
+ conf = {'backends': 'enable_by_files',
+ 'enable_by_file_paths': filename, 'detailed': True}
+ res = self._do_test_request(conf, accept="text/html")
+ self.assertIn(b'Result of 1 checks:', res.body)
+ self.assertIn(b'<TD>OK</TD>', res.body)
+ self.assertEqual(webob.exc.HTTPOk.code, res.status_int)
+
+ def test_enablefile_disabled(self):
+ conf = {'backends': 'enable_by_files',
+ 'enable_by_file_paths': '.foobar'}
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPServiceUnavailable.code,
+ expected_body=b'FILE PATH MISSING')
+ self.assertIn('enable_by_files', self.app._backends.names())
+
+ def test_enablefile_disabled_head(self):
+ conf = {'backends': 'enable_by_files',
+ 'enable_by_file_paths': '.foobar'}
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPServiceUnavailable.code,
+ expected_body=b'', method='HEAD')
+ self.assertIn('enable_by_files', self.app._backends.names())
+
+ def test_enablefile_disabled_html_detailed(self):
+ conf = {'backends': 'enable_by_files',
+ 'enable_by_file_paths': '.foobar', 'detailed': True}
+ res = self._do_test_request(conf, accept="text/html")
+ self.assertIn(b'<TD>FILE PATH MISSING</TD>', res.body)
+ self.assertEqual(webob.exc.HTTPServiceUnavailable.code,
+ res.status_int)
+
def test_json_response(self):
expected_body = jsonutils.dumps({'detailed': False, 'reasons': []},
indent=4,
sort_keys=True).encode('utf-8')
self._do_test(expected_body=expected_body,
accept='application/json')
+
+ def test_source_within_allowed_ranges(self):
+ conf = {'allowed_source_ranges': ['192.168.0.0/24', '192.168.1.0/24']}
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPOk.code,
+ remote_addr='192.168.0.1')
+
+ def test_source_out_of_allowed_ranges(self):
+ conf = {'allowed_source_ranges': ['192.168.0.0/24', '192.168.1.0/24']}
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPOk.code,
+ expected_body=b'Hello, World!!!',
+ remote_addr='192.168.3.1')
+
+ def test_proxied_not_ignored(self):
+ conf = {}
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPOk.code,
+ headers={'Forwarded-For': 'http://localhost'})
+
+ def test_proxied_ignored(self):
+ conf = {'ignore_proxied_requests': True}
+ modern_headers = {
+ 'x-forwarded': 'https://localhost'
+ }
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPOk.code,
+ expected_body=b'Hello, World!!!',
+ headers=modern_headers)
+ legacy_headers = {
+ 'x-forwarded-proto': 'https',
+ 'x-forwarded-host': 'localhost',
+ 'x-forwarded-for': '192.0.2.11',
+ }
+ self._do_test(conf,
+ expected_code=webob.exc.HTTPOk.code,
+ expected_body=b'Hello, World!!!',
+ headers=legacy_headers)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/tests/test_opts.py
new/oslo.middleware-6.2.0/oslo_middleware/tests/test_opts.py
--- old/oslo.middleware-5.2.0/oslo_middleware/tests/test_opts.py
2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/tests/test_opts.py
2024-08-21 17:11:12.000000000 +0200
@@ -26,6 +26,3 @@
def test_cors(self):
opts.list_opts_cors()
-
- def test_ssl(self):
- opts.list_opts_ssl()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/oslo_middleware/tests/test_ssl.py
new/oslo.middleware-6.2.0/oslo_middleware/tests/test_ssl.py
--- old/oslo.middleware-5.2.0/oslo_middleware/tests/test_ssl.py 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/oslo_middleware/tests/test_ssl.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,57 +0,0 @@
-# Copyright (c) 2015 Thales Services SAS
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-from oslo_config import fixture as config
-from oslotest import base
-import webob
-
-from oslo_middleware import ssl
-
-
-class SSLMiddlewareTest(base.BaseTestCase):
-
- def setUp(self):
- super(SSLMiddlewareTest, self).setUp()
- self.useFixture(config.Config())
-
- def _test_scheme(self, expected, headers, secure_proxy_ssl_header=None):
- middleware = ssl.SSLMiddleware(None)
- if secure_proxy_ssl_header:
- middleware.oslo_conf.set_override(
- 'secure_proxy_ssl_header', secure_proxy_ssl_header,
- group='oslo_middleware')
- request = webob.Request.blank('http://example.com/', headers=headers)
-
- # Ensure ssl middleware does not stop pipeline execution
- self.assertIsNone(middleware.process_request(request))
-
- self.assertEqual(expected, request.scheme)
-
- def test_without_forwarded_protocol(self):
- self._test_scheme('http', {})
-
- def test_with_forwarded_protocol(self):
- headers = {'X-Forwarded-Proto': 'https'}
- self._test_scheme('https', headers)
-
- def test_with_custom_header(self):
- headers = {'X-Forwarded-Proto': 'https'}
- self._test_scheme('http', headers,
- secure_proxy_ssl_header='X-My-Header')
-
- def test_with_custom_header_and_forwarded_protocol(self):
- headers = {'X-My-Header': 'https'}
- self._test_scheme('https', headers,
- secure_proxy_ssl_header='X-My-Header')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/notes/enable-by-files-healthcheck-29938e3d6b8e5730.yaml
new/oslo.middleware-6.2.0/releasenotes/notes/enable-by-files-healthcheck-29938e3d6b8e5730.yaml
---
old/oslo.middleware-5.2.0/releasenotes/notes/enable-by-files-healthcheck-29938e3d6b8e5730.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.middleware-6.2.0/releasenotes/notes/enable-by-files-healthcheck-29938e3d6b8e5730.yaml
2024-08-21 17:11:12.000000000 +0200
@@ -0,0 +1,6 @@
+---
+features:
+ - |
+ The new ``enable_by_files`` healthcheck plugin has been added.
+ This plugin will help to check whether specified file paths in
+ ``[healthcheck] enable_by_file_paths`` are present or not.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/notes/healthcheck-allowed_source_ranges-9cbaf89f65914851.yaml
new/oslo.middleware-6.2.0/releasenotes/notes/healthcheck-allowed_source_ranges-9cbaf89f65914851.yaml
---
old/oslo.middleware-5.2.0/releasenotes/notes/healthcheck-allowed_source_ranges-9cbaf89f65914851.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.middleware-6.2.0/releasenotes/notes/healthcheck-allowed_source_ranges-9cbaf89f65914851.yaml
2024-08-21 17:11:12.000000000 +0200
@@ -0,0 +1,6 @@
+---
+features:
+ - |
+ The new ``[healthcheck] allowed_source_ranges`` parameter has been added.
+ This parameter defines a list of network ranges from which access to
+ ``/healthcheck`` endpoint is allowed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/notes/healthcheck-ignore_proxied_requests-d04d1661bd687bc6.yaml
new/oslo.middleware-6.2.0/releasenotes/notes/healthcheck-ignore_proxied_requests-d04d1661bd687bc6.yaml
---
old/oslo.middleware-5.2.0/releasenotes/notes/healthcheck-ignore_proxied_requests-d04d1661bd687bc6.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.middleware-6.2.0/releasenotes/notes/healthcheck-ignore_proxied_requests-d04d1661bd687bc6.yaml
2024-08-21 17:11:12.000000000 +0200
@@ -0,0 +1,13 @@
+---
+features:
+ - |
+ The new ``[healthcheck] ignore_proxied_requests`` option has been added.
+ When this option is set to true, the healthcheck middleware ignores
+ requests with any of the following headers, which indicates that
+ the requests came through a reverse proxy or a load balancer.
+
+ - ``x-forwarded``
+ - ``x-forwarded-proto``
+ - ``x-forwarded-host``
+ - ``x-forwarded-for``
+ - ``x-forwarded-prefix``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/notes/remove-oslo-namespace-b0f050f074d12aff.yaml
new/oslo.middleware-6.2.0/releasenotes/notes/remove-oslo-namespace-b0f050f074d12aff.yaml
---
old/oslo.middleware-5.2.0/releasenotes/notes/remove-oslo-namespace-b0f050f074d12aff.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.middleware-6.2.0/releasenotes/notes/remove-oslo-namespace-b0f050f074d12aff.yaml
2024-08-21 17:11:12.000000000 +0200
@@ -0,0 +1,5 @@
+---
+upgrade:
+ - |
+ The ``olso.middleware`` package has been removed. This package was earlier
+ deprecated to be replaced by the ``oslo_middleware`` package.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/notes/remove-ssl-middleware-0ce922b05f83c447.yaml
new/oslo.middleware-6.2.0/releasenotes/notes/remove-ssl-middleware-0ce922b05f83c447.yaml
---
old/oslo.middleware-5.2.0/releasenotes/notes/remove-ssl-middleware-0ce922b05f83c447.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.middleware-6.2.0/releasenotes/notes/remove-ssl-middleware-0ce922b05f83c447.yaml
2024-08-21 17:11:12.000000000 +0200
@@ -0,0 +1,5 @@
+---
+deprecations:
+ - |
+ The SSL middleware has been removed. It was deprecated in favor of
+ the HTTPProxyToWSGI middleware.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/releasenotes/source/2023.2.rst
new/oslo.middleware-6.2.0/releasenotes/source/2023.2.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/2023.2.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/oslo.middleware-6.2.0/releasenotes/source/2023.2.rst 2024-08-21
17:11:12.000000000 +0200
@@ -0,0 +1,6 @@
+===========================
+2023.2 Series Release Notes
+===========================
+
+.. release-notes::
+ :branch: stable/2023.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/releasenotes/source/2024.1.rst
new/oslo.middleware-6.2.0/releasenotes/source/2024.1.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/2024.1.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/oslo.middleware-6.2.0/releasenotes/source/2024.1.rst 2024-08-21
17:11:12.000000000 +0200
@@ -0,0 +1,6 @@
+===========================
+2024.1 Series Release Notes
+===========================
+
+.. release-notes::
+ :branch: stable/2024.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/releasenotes/source/index.rst
new/oslo.middleware-6.2.0/releasenotes/source/index.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/index.rst 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/releasenotes/source/index.rst 2024-08-21
17:11:12.000000000 +0200
@@ -6,6 +6,8 @@
:maxdepth: 1
unreleased
+ 2024.1
+ 2023.2
2023.1
zed
yoga
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
new/oslo.middleware-6.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
---
old/oslo.middleware-5.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
2023-08-29 14:28:22.000000000 +0200
+++
new/oslo.middleware-6.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
2024-08-21 17:11:12.000000000 +0200
@@ -5,11 +5,11 @@
msgstr ""
"Project-Id-Version: oslo.middleware\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-06-27 13:54+0000\n"
+"POT-Creation-Date: 2023-09-07 13:30+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2023-06-21 08:57+0000\n"
+"PO-Revision-Date: 2023-09-21 01:02+0000\n"
"Last-Translator: Andi Chandler <[email protected]>\n"
"Language-Team: English (United Kingdom)\n"
"Language: en_GB\n"
@@ -19,6 +19,9 @@
msgid "2023.1 Series Release Notes"
msgstr "2023.1 Series Release Notes"
+msgid "2023.2 Series Release Notes"
+msgstr "2023.2 Series Release Notes"
+
msgid "3.20.0"
msgstr "3.20.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/source/victoria.rst
new/oslo.middleware-6.2.0/releasenotes/source/victoria.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/victoria.rst 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/releasenotes/source/victoria.rst 2024-08-21
17:11:12.000000000 +0200
@@ -3,4 +3,4 @@
=============================
.. release-notes::
- :branch: stable/victoria
+ :branch: unmaintained/victoria
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.middleware-5.2.0/releasenotes/source/wallaby.rst
new/oslo.middleware-6.2.0/releasenotes/source/wallaby.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/wallaby.rst 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/releasenotes/source/wallaby.rst 2024-08-21
17:11:12.000000000 +0200
@@ -3,4 +3,4 @@
============================
.. release-notes::
- :branch: stable/wallaby
+ :branch: unmaintained/wallaby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/releasenotes/source/xena.rst
new/oslo.middleware-6.2.0/releasenotes/source/xena.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/xena.rst 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/releasenotes/source/xena.rst 2024-08-21
17:11:12.000000000 +0200
@@ -3,4 +3,4 @@
=========================
.. release-notes::
- :branch: stable/xena
+ :branch: unmaintained/xena
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/releasenotes/source/yoga.rst
new/oslo.middleware-6.2.0/releasenotes/source/yoga.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/yoga.rst 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/releasenotes/source/yoga.rst 2024-08-21
17:11:12.000000000 +0200
@@ -3,4 +3,4 @@
=========================
.. release-notes::
- :branch: stable/yoga
+ :branch: unmaintained/yoga
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/releasenotes/source/zed.rst
new/oslo.middleware-6.2.0/releasenotes/source/zed.rst
--- old/oslo.middleware-5.2.0/releasenotes/source/zed.rst 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/releasenotes/source/zed.rst 2024-08-21
17:11:12.000000000 +0200
@@ -3,4 +3,4 @@
========================
.. release-notes::
- :branch: stable/zed
+ :branch: unmaintained/zed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/requirements.txt
new/oslo.middleware-6.2.0/requirements.txt
--- old/oslo.middleware-5.2.0/requirements.txt 2023-08-29 14:28:22.000000000
+0200
+++ new/oslo.middleware-6.2.0/requirements.txt 2024-08-21 17:11:12.000000000
+0200
@@ -1,8 +1,4 @@
-# The order of packages is significant, because pip processes them in the order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
-
-pbr!=2.1.0,>=2.0.0 # Apache-2.0
+pbr>=2.0.0 # Apache-2.0
Jinja2>=2.10 # BSD License (3 clause)
oslo.config>=5.2.0 # Apache-2.0
oslo.context>=2.19.2 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/setup.cfg
new/oslo.middleware-6.2.0/setup.cfg
--- old/oslo.middleware-5.2.0/setup.cfg 2023-08-29 14:28:51.787379000 +0200
+++ new/oslo.middleware-6.2.0/setup.cfg 2024-08-21 17:11:57.851624300 +0200
@@ -18,6 +18,7 @@
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
+ Programming Language :: Python :: 3.11
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
@@ -30,13 +31,13 @@
oslo.middleware = oslo_middleware.opts:list_opts
oslo.middleware.cors = oslo_middleware.opts:list_opts_cors
oslo.middleware.sizelimit = oslo_middleware.opts:list_opts_sizelimit
- oslo.middleware.ssl = oslo_middleware.opts:list_opts_ssl
oslo.middleware.http_proxy_to_wsgi =
oslo_middleware.opts:list_opts_http_proxy_to_wsgi
oslo.middleware.healthcheck = oslo_middleware.opts:list_opts_healthcheck
oslo.middleware.basic_auth = oslo_middleware.opts:list_opts_basic_auth
oslo.middleware.healthcheck =
disable_by_file =
oslo_middleware.healthcheck.disable_by_file:DisableByFileHealthcheck
disable_by_files_ports =
oslo_middleware.healthcheck.disable_by_file:DisableByFilesPortsHealthcheck
+ enable_by_files =
oslo_middleware.healthcheck.enable_by_files:EnableByFilesHealthcheck
paste.app_factory =
healthcheck = oslo_middleware:Healthcheck.app_factory
paste.filter_factory =
@@ -49,7 +50,6 @@
http_proxy_to_wsgi = oslo_middleware:HTTPProxyToWSGI.factory
request_id = oslo_middleware:RequestId.factory
sizelimit = oslo_middleware:RequestBodySizeLimiter.factory
- ssl = oslo_middleware:SSLMiddleware.factory
[egg_info]
tag_build =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/test-requirements.txt
new/oslo.middleware-6.2.0/test-requirements.txt
--- old/oslo.middleware-5.2.0/test-requirements.txt 2023-08-29
14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/test-requirements.txt 2024-08-21
17:11:12.000000000 +0200
@@ -1,15 +1,6 @@
-# The order of packages is significant, because pip processes them in the order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
-
fixtures>=3.0.0 # Apache-2.0/BSD
-hacking>=3.0.1,<3.1.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testtools>=2.2.0 # MIT
-coverage!=4.4,>=4.0 # Apache-2.0
-oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
-# Bandit security code scanner
-bandit>=1.7.0,<1.8.0 # Apache-2.0
+coverage>=4.0 # Apache-2.0
+oslo.serialization>=2.18.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
-
-pre-commit>=2.6.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.middleware-5.2.0/tox.ini
new/oslo.middleware-6.2.0/tox.ini
--- old/oslo.middleware-5.2.0/tox.ini 2023-08-29 14:28:22.000000000 +0200
+++ new/oslo.middleware-6.2.0/tox.ini 2024-08-21 17:11:12.000000000 +0200
@@ -11,10 +11,10 @@
commands = stestr run --slowest {posargs}
[testenv:pep8]
+deps =
+ pre-commit
commands =
pre-commit run -a
- # Run security linter
- bandit -r oslo_middleware -x tests -n5
[testenv:venv]
commands = {posargs}