I was able to hunt down the origin of this issue to the fact that we patch django auth middleware's get_user method too late.
It looks like the AuthenticationMiddleware called before loading openstack_auth's urls module (where the patching happens) and this leads to the first request being associated with the original get_user method and crashing if accessing to the user attribute.
I was able to hunt down the origin of this issue to the fact that we patch django auth middleware's get_user method too late.
It looks like the AuthenticationM iddleware called before loading openstack_auth's urls module (where the patching happens) and this leads to the first request being associated with the original get_user method and crashing if accessing to the user attribute.
This is where the middleware gets patched now: /github. com/openstack/ django_ openstack_ auth/blob/ master/ openstack_ auth/urls. py#L5
https:/
If instead it is patched from the settings module, the issue is fixed. I don't know if that's the correct place to patch it though.