-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add support for deleting data when publishing data updates #430
Comments
Thanks for opening this @maurice-freitag . If you're willing to open a PR - that would be even more appreciated. 💪🙏 How about we keep 'save_method' as is for backward compatibly, and add something else (e.g. 'operation') that if included igonres save-method. |
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is currently not possible to delete data in OPA once it has been added. The REST API supports this, the OPAL server's API does not. A workaround is to set the affected document to null or an empty array but, depending on the use-case, this is not ideal.
Example:
Given this data:
I would like to send a data update to the OPAL server that tempts the OPAL clients to call the aforementioned DELETE api in OPA:
This is currently not an option and we're stuck with updating the data to reflect the change:
We're left with the following data:
...which in our case inadvertently has an impact on our policies as we check for a user's mere existence within a tenant.
Requested changes to the public API:
save_method
values should include "DELETE"DataSourceEntry.url
is required. Should be optional when usingsave_method="DELETE"
save_method
anddst_path
don't really make sense in the context of deleting dataPlus whatever is necessary internally to have the OPAL clients request deletion of the affected data in OPA. I'd be willing to open a PR if this change makes sense to you.
The text was updated successfully, but these errors were encountered: