basic auth middleware can't be loaded by the python egg

Bug #1940738 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.middleware
Fix Released
Undecided
Takashi Kajinami

Bug Description

The basic auth middleware was recently added[1] to implement simple auth mechanism, but this middleware is not listed in paste.filter_factory entrypoints. While we can use this middleware by defining its direct path,
we can't use the python egg as we can do for the other middleware.

[1] https://review.opendev.org/c/openstack/oslo.middleware/+/802234

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.middleware (master)
Changed in oslo.middleware:
status: New → In Progress
description: updated
Changed in oslo.middleware:
assignee: nobody → Takashi Kajinami (kajinamit)
summary: - paste.filter_factory endpoint for basic auth middleware is missing
+ Can't use basic auth middleware by paste deploy mechanism
summary: - Can't use basic auth middleware by paste deploy mechanism
+ basic auth middleware can't be used by paste deploy mechanism
Revision history for this message
Rabi Mishra (rabi) wrote : Re: basic auth middleware can't be used by paste deploy mechanism

I don't think entrypoint is necessary, unless you want something like [1].

We use following in api-paste.ini and it would work.

[filter:basic_auth]
paste.filter_factory = oslo_middleware:oslo_middleware.basic_auth:BasicAuthMiddleware.factory.factory

[1] https://bugs.launchpad.net/oslo.middleware/+bug/1500509

Revision history for this message
Takashi Kajinami (kajinamit) wrote (last edit ):

Thanks, Rabi.

You are totally correct and I wrongly explained the current situation.

I think this bug is still valid though, because we have entry points for the other middleware defined. However as you pointed this is not quite mandatory now.

I have updated the bug description and the commit message of my fix proposed. Please let me know if you find anything wrong...

description: updated
summary: - basic auth middleware can't be used by paste deploy mechanism
+ basic auth middleware can't be loaded by the python egg
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.middleware (master)

Reviewed: https://review.opendev.org/c/openstack/oslo.middleware/+/805479
Committed: https://opendev.org/openstack/oslo.middleware/commit/8e47bfc77c37610e0da577f13d7a3eb7894139a0
Submitter: "Zuul (22348)"
Branch: master

commit 8e47bfc77c37610e0da577f13d7a3eb7894139a0
Author: Takashi Kajinami <email address hidden>
Date: Sat Aug 21 20:19:48 2021 +0900

    Add paste.filter_factory entrypoint for basic auth middleware

    ... so that the middleware can be loaded using the python egg instead
    of the direct path.

    Closes-Bug: #1940738
    Change-Id: I57408766c120d2c9784f3886457e91ee7d30de1b

Changed in oslo.middleware:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.middleware 4.5.0

This issue was fixed in the openstack/oslo.middleware 4.5.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.