Skip to content
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

Concurrency issue: Users are logged in as other users #8

Open
zzikkzzakk opened this issue Dec 15, 2023 · 0 comments
Open

Concurrency issue: Users are logged in as other users #8

zzikkzzakk opened this issue Dec 15, 2023 · 0 comments

Comments

@zzikkzzakk
Copy link

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

When multiple users accessed our webpage at once and (successfully logged in via this library). After a while some of them got logged in as other users in the backend. This was apparent as we show the username in the Frontend which we get from _id_token_claims['name'] . Also other requests e.g. for user history accessed data of the wrong user.
We tried to reproduce it in a controlled development environment with multiple users and simulated requests at once and checked if the MS user oid we set manually in the request matched the one acquired via _id_token_claims but couldn't reproduce the issue so far. This happened on release to a wider audience

Any log messages given by the failure

No errors seen

Expected/desired behavior

No concurrency issue

OS and Version?

Azure App Services, Python Stack

Versions

latest i.e. 0.16.6

Mention any other details that might be useful

Is this line

self.ms_identity_web.set_adapter(django_context_adapter)

which sets the adapter for the Middleware but the adapter is initialized with the current request, really thread safe, i.e. for multiple users at once?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant