Commit Graph

11 Commits

Author SHA1 Message Date
Stephen Finucane 22408f8da0 Remove six
Change-Id: Ib3edfdd087ed1d954f1ecf72a191138f8f1c46a1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-06-27 18:03:31 +01:00
Stephen Finucane 0f48ff3e8d Bump hacking to 6.0.x
A note about dependency ordering is removed from the requirements file:
this is no longer true with the dependency resolver introduced with pip
20.3.

Change-Id: I615be3453db37588edf98a46ce484efc5e051f11
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-06-27 18:03:30 +01:00
Artem Vasilyev f2f5820c5f Added request_id and global_request_id to CADF notifications
Change-Id: I8d571d3414071c68b4fa565dec46cc2d2941331c
Closes-Bug: #1803940
2018-11-19 11:49:24 +03:00
Michael Johnson 782729b6e9 Fix audit target service selection
The keystonemiddleware audit code would select the wrong OpenStack service
endpoint for a request if the cloud is not using unique TCP ports for each
service endpoint. As most services are no longer using a port per service,
but instead using unique paths, this caused the audit to select the wrong
target service. This leads to incorrect audit logging due to the wrong
audit map being used.

This patch checks the request to see if a TCP port was present in the request,
and if not, fall back to using the target_endpoint_type configured in the
audit map file.

Change-Id: Ie2e0bf74ecca485d599a4041bb770bd6e296bc99
Closes-bug: 1797584
2018-10-29 11:08:34 -07:00
Guang Yee 6779838a24 Skip the services with no endpoints when parsing service catalog
When parsing the service catalog to find the source, audit middleware
should skip over the services which have no endpoints instead of
assuming they will have at least one endpoint.

Change-Id: I287873e99338d95baaf20d52ecb3a43763a401fc
Closes-Bug: #1800017
2018-10-26 08:13:39 -07:00
D G Lee 50fcc70df1 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I73ca5fc046ad04505b52ca93c9bbdbfd72405aed
2017-05-02 09:58:02 +08:00
Janonymous f4d453ec30 use oslo.log instead of logging
The constants of log levels were added in the 1.8 version
of the oslo.log library.
So we can replace all usage of system logging module
with log module from oslo.log

Change-Id: I97a1d913b543dc9dbd4d228b04adbdf7ee320df5
2017-01-13 03:24:18 +00:00
Jamie Lennox 0d1fc6c81f Use jsonutils instead of ast for loading the service catalog
AST! Never AST!

The service catalog set from auth_token middleware is a json blob not a
python blob and should be decoded as such.

This brings up the problem that the service catalog specified in the
tests is not actually valid JSON. In future I'll attempt to change this
over to using the auth_token fixture instead of a custom environment
dictionary.

Change-Id: Ic9ab68f7d41d19d3595a3ddbbb2e233f57ef52c8
2016-07-09 02:34:20 +00:00
Jamie Lennox 3ee96f1cb7 Refactor API tests to not run middleware
The API tests don't really use the API, they just test the creation of
an event so focus them on that.

There are two tests that are in the API class that really do test
middleware so they are moved back.

Change-Id: I345fe4f4c2a0d8f98ba1ff10491802002d590fa6
2016-06-28 10:06:11 +10:00
Jamie Lennox bf80779ee0 Refactor create_event onto the api object.
There are a number of methods on the api object that already handle
request specifics. Move the create_event method over to the api so that
it can be tested independantly of the middleware.

Change-Id: I60e524f1e03bfa4592756fc1da861b687ba2ee85
2016-06-27 12:15:26 +10:00
Jamie Lennox aa2cde7f9f Break out the API piece into its own file
Refactor the API object out of the audit middleware into its own file.

Change-Id: Iddeb91db48c718d749d878ebfbe09f6a3a143229
2016-06-27 09:45:57 +10:00