-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openstack: add keystone audit middleware support #808
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and thanks for including a good set of unit tests.
One minor style point that is not important, but may make the code a little easier to read.
Only thing needed prior to merging is a gerrit review that exercises the change so we can verify that the change is good. Please could you link a review to the PR's description? Thanks.
4c4dc89
to
57bac9a
Compare
Updated the PR
I've added the first review and the LP bug in the description. The review still needs rebasing once this PR is merged so that I can remove the location off the charmhelpers sync. There are several other charms that need doing too, so once this PR is merged we can crack on with the others |
just found an issue with this, while testing, so marking it as a draft seems like that |
To avoid the issues encountered by using an optional field, I think this should likely just be a new Context object with the explicit needs of enabling the Audit Middleware. This way, the service will explicitly opt into it via a config option as well as leveraging the new Context. |
@arif-ali if the additional items are pulled out into a new context, as @wolsen suggests, it would look something like: class KeystoneAuditMiddleware(OSContextGenerator):
def __init__(self, service_name):
self.service_name = service_name
def __call__(self):
ctxt = {
'audit_middleware': config('audit-middleware) or False,
'service_name': service_name,
}
return ctxt And then it can just be used by including the new Context in the |
This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. Related-Pr: juju/charm-helpers#893 func-test-pr: openstack-charmers/zaza-openstack-tests#1200 Closes-Bug: 1856555 Change-Id: Ia7dbd6af2305e92eaa9a65890644c4a324ab2c65
* Update charm-cinder from branch 'master' to e25b5d38fbb0692e5fab6e7f562c974316d61abe - Add keystone audit middleware API logging This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. Related-Pr: juju/charm-helpers#893 func-test-pr: openstack-charmers/zaza-openstack-tests#1200 Closes-Bug: 1856555 Change-Id: Ia7dbd6af2305e92eaa9a65890644c4a324ab2c65
As Myles is now working on this, I'm closing this PR |
This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Related-Pr: juju/charm-helpers#893 func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b
* Update charm-glance from branch 'master' to 66a167eb42d53f8e12a856c9f0b2d888e57b1742 - Add keystone audit middleware API logging This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Related-Pr: juju/charm-helpers#893 func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b
This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9
* Update charm-neutron-api from branch 'master' to 84aec48548154a1db0c420200926b2bc1b111fcc - Add keystone audit middleware API logging This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9
* Update charm-nova-cloud-controller from branch 'master' to 6b03c1a46f3b59b2e972cd348a1895086138e817 - Merge "Add keystone audit middleware API logging" - Add keystone audit middleware API logging This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Related-Pr: juju/charm-helpers#893 func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8
This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Related-Pr: juju/charm-helpers#893 func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8
This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7
* Update charm-heat from branch 'master' to 69886c1bcd7a5a8e5c92478c9ea1d45801fc8d38 - Add keystone audit middleware API logging This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7
This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9 (cherry picked from commit 84aec48)
This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b (cherry picked from commit 66a167e)
This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1236 Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b (cherry picked from commit 66a167e)
This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b (cherry picked from commit 66a167e)
This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7 (cherry picked from commit 69886c1)
This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9 (cherry picked from commit 84aec48)
This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9 (cherry picked from commit 84aec48)
This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1236 Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9 (cherry picked from commit 84aec48)
This commit adds Keystone audit middleware API logging to the Neutron-API charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/neutron/neutron-server.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: I6d4f471607b11c2a0450d74c8fd68385486ec8d9 (cherry picked from commit 84aec48)
This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8 (cherry picked from commit 723515f)
This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8 (cherry picked from commit 723515f)
This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8 (cherry picked from commit 723515f)
This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8 (cherry picked from commit 723515f)
This commit adds Keystone audit middleware API logging to the Nova- Cloud-Contoller charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/nova/nova-api-wsgi.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ie09cc6775c13a2dba6a0f3d69a4a080f9fc484c8 (cherry picked from commit 723515f)
This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b (cherry picked from commit 66a167e)
This commit adds Keystone audit middleware API logging to the Glance charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output writes to /var/log/glance/glance-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ied08b56cf3c4fa30827d43a50ca7b552db0fa82b (cherry picked from commit 66a167e)
This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1212 Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7 (cherry picked from commit 69886c1)
This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7 (cherry picked from commit 69886c1)
This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1236 Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7 (cherry picked from commit 69886c1)
This commit adds Keystone audit middleware API logging to the Heat charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/heat/heat-api.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ic611b68f35a36489673e3430dd1abbd5aa752fa7 (cherry picked from commit 69886c1)
This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 (cherry picked from commit e25b5d3) Change-Id: I9ff224e4f5c48221fbdb5e42696d0f8f21fca91d
This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ia7dbd6af2305e92eaa9a65890644c4a324ab2c65 (cherry picked from commit e25b5d3)
This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ia7dbd6af2305e92eaa9a65890644c4a324ab2c65 (cherry picked from commit e25b5d3)
This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. Closes-Bug: 1856555 Change-Id: Ia7dbd6af2305e92eaa9a65890644c4a324ab2c65 (cherry picked from commit e25b5d3)
This commit adds Keystone audit middleware API logging to the Cinder charm in versions Yoga and newer to allow users to configure their environment for CADF compliance. This feature can be enabled/disabled and is set to 'disabled' by default to avoid bloat in log files. The logging output is configured to /var/log/apache2/cinder_error.log. This commit builds on previous discussions: juju/charm-helpers#808. func-test-pr: openstack-charmers/zaza-openstack-tests#1236 Closes-Bug: 1856555 Change-Id: Ia7dbd6af2305e92eaa9a65890644c4a324ab2c65 (cherry picked from commit e25b5d3)
This PR is in preparation to fulfil the audit middleware specification as documented in
https://specs.openstack.org/openstack/charm-specs/specs/2023.1/backlog/audit-middleware.html
First review for nova-cloud-controller charm
https://review.opendev.org/c/openstack/charm-nova-cloud-controller/+/887213
Once this is merged, we can then do the rest of the charms in LP#1856555