You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have identified some unexpected behavior with any django cache (db or redis) enabled.
Our Ressource-Servers are using the userinfo endpoint to resolve users from the previously shipped Bearer Token (on login)
We are calling the /userinfo/ endpoint with GET and have the token in the header e.g.
curl -X GET https://accounts.xxxxx.org/oidc/userinfo
-H 'Authorization: Bearer 3c698d49ef13460b9e3933318430c733'
-H 'cache-control: no-cache'
On the first request the userdata (sub, email etc.) is returned as expected.
However, if in the meantime any other user calls the endpoint it can happen that userinfo returns another user which does not own the Bearer token on a second request.
With cache disabled everything works e.g.
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
I have looked in the code but could not figure out how the default django cache should affect the response behavior. Maybe some of you guys got an idea.
Funny sidenote: Using POST indead of GET everything works, but most libs dont support that.
The text was updated successfully, but these errors were encountered:
We have identified some unexpected behavior with any django cache (db or redis) enabled.
Our Ressource-Servers are using the userinfo endpoint to resolve users from the previously shipped Bearer Token (on login)
We are calling the /userinfo/ endpoint with GET and have the token in the header e.g.
curl -X GET
https://accounts.xxxxx.org/oidc/userinfo
-H 'Authorization: Bearer 3c698d49ef13460b9e3933318430c733'
-H 'cache-control: no-cache'
On the first request the userdata (sub, email etc.) is returned as expected.
However, if in the meantime any other user calls the endpoint it can happen that userinfo returns another user which does not own the Bearer token on a second request.
With cache disabled everything works e.g.
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
I have looked in the code but could not figure out how the default django cache should affect the response behavior. Maybe some of you guys got an idea.
Funny sidenote: Using POST indead of GET everything works, but most libs dont support that.
The text was updated successfully, but these errors were encountered: