Commit Graph

11 Commits

Author SHA1 Message Date
Takashi Kajinami 7b8a72d2c5 Add oslo.config.opts entrypoint for audit middleware options
... so that each service using the audit middleware can include these
parameters in .conf file generated by oslo-config-generator by adding
that entrypoint to the command.

Closes-Bug: #1939632
Change-Id: Ied954c633570c51af9504514ffed18e12de8caac
2021-08-12 11:17:13 +09:00
Leehom Li (feli5) 82707e15a5 Make sure audit middleware use own context
Keystone audit middleware requires to iterate req.context as dict,
but Glance requires to access req.context.read_only.
When glance enabled audit, they are conflict with each other.
This patch fix this issue by store audit context in
req.environ['audit.context']

Change-Id: Ib9a62a4cd0b7b9ffb9fa2d6440e8072d45ee0fee
Closes-Bug: #1809101
Signed-off-by: Leehom Li <feli5@cisco.com>
2018-12-24 02:02:17 +00:00
Stefan Nica e83bd0bc3c Add option to disable using oslo_message notifier
Add a configuration option, 'use_oslo_messaging', to indicate whether
to use oslo_messaging notifier. It is set to true for backwards
compatibility.
We can't use audit middleware with services like Swift, which have no
dependency on Oslo and does not work well with oslo_log. Swift uses rsyslog.
Currently, audit middleware indiscriminately chooses oslo_messaging if the
package is installed. This is problematic if Swift proxy is on the same
controller as any service which consumes oslo_messaging. With this new option,
Swift can now safely consume audit middleware by electing to use local
log notifier instead of oslo_messaging.

Change-Id: I87bf857c20e4b78e97d40dcc51a1b4ff0014abb2
Closes-Bug: #1695038
2018-02-20 11:26:22 +01:00
Hangdong Zhang 4a72cd6c3b Update URLs in documentation
Update URLs according to OpenStack document migration.

Change-Id: Icb4232fcce79bb1ea121489122e578e3109b5e90
2017-07-20 16:38:16 +08: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
Eric Brown 96dac98364 Use https for *.openstack.org references
The openstack.org pages now support https and our references to
the site should by default be one signed by the organization.

Change-Id: I8521461203fe40e4576f4de7cfb500bd64027d6d
2017-02-05 20:36:42 -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 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 515a990dce Extract a common notifier pattern
Create a notifier pattern that abstracts the message notification. This
should make it easier to test.

Change-Id: Ifbe3be434c304f1d3d4d570d645937a72c3503c8
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
Jamie Lennox 9c67feedb6 Move audit into its own folder
This is the start of a cleanup of some of the audit middleware code.

The test changes are because this reorders the test execution order and
some of the global project tests were setting long lasting state.

Change-Id: I7a5576c1f497b9a43420f66c9e511cf6f280b62e
2016-06-24 13:47:47 +00:00