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

Request context of background operations shouldn't be used for OpenFGA authorizer #275

Closed
stgraber opened this issue Dec 5, 2023 · 1 comment
Assignees
Labels
Bug Confirmed to be a bug Easy Good for new contributors

Comments

@stgraber
Copy link
Member

stgraber commented Dec 5, 2023

Pretty much all calls to authorizer functions use r.Context() as their context.

The problem is that many operations inside of Incus run in the background, basically immediately returning to the client while continuing to process the request in the background.

In that scenario, as soon as the client is sent the background operation response, the request context is canceled, which then makes anything else using that context fail.

@stgraber stgraber added Bug Confirmed to be a bug Easy Good for new contributors labels Dec 5, 2023
@stgraber stgraber self-assigned this Dec 5, 2023
stgraber added a commit to stgraber/incus that referenced this issue Dec 5, 2023
…nd operations

Closes lxc#275

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber
Copy link
Member Author

stgraber commented Dec 5, 2023

Fixed that one too

@tych0 tych0 closed this as completed in 2ba8cf5 Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug Easy Good for new contributors
Development

No branches or pull requests

1 participant