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

Use /1.0/events when under OpenFGA #691

Merged
merged 10 commits into from
Mar 28, 2024
Merged

Use /1.0/events when under OpenFGA #691

merged 10 commits into from
Mar 28, 2024

Conversation

stgraber
Copy link
Member

So I expected that this would need a bunch of work in the event handler and operation handler, but after doing a bit of poking, it looks like we've actually added all the needed filtering already and one can actually call /1.0/events?all-projects=true today and only get the events that they should be getting (no logging, only operation and lifecycle for projects that they have access to).

I've done a bunch of testing both from the CLI and UI and can indeed only see the expected events.

Closes #292

…onditionally revert to events API."

This reverts commit 78f993c.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
…ration."

This reverts commit ab919e1.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
…ion."

This reverts commit fd1c147.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This reverts commit 5fac326.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This reverts commit 2d2fb7d.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This reverts commit c27d5d7.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This reverts commit 961157d.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
…ration."

This reverts commit 99aab48.

Part of lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Part of lxc#292

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

Let's see if the tests catch anything I didn't consider...

@stgraber
Copy link
Member Author

Ah right, I tested project-wide permissions, object-specific ones are the problem, will look into that soon.

…ccessible

If we're not allowed to get a project-wide event stream, fallback to the
operations wait API. This is to accomodate the rare situation where a
user is given access to specific instances within a project but without
any other project-wide permissions.

Closes lxc#292

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@tych0 tych0 merged commit 0ba8d1e into lxc:main Mar 28, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Rework event permission handling to be compatible with OpenFGA
2 participants