I'm going to change my mind about the root cause. It appears that we simply forgot to check if the authorization has set the flag request.user_token_valid, which keystonemiddleware checks in AuthProtocol.process_request(). I copied the missing chunk to AuthContextMiddleware.process_request() and it cleared the problem.
I'm going to change my mind about the root cause. It appears that we simply forgot to check if the authorization has set the flag request. user_token_ valid, which keystonemiddleware checks in AuthProtocol. process_ request( ). I copied the missing chunk to AuthContextMidd leware. process_ request( ) and it cleared the problem.
See WIP patch https:/ /review. opendev. org/c/openstack /keystone/ +/874346