-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
client_id + client_secret are inaccessible to modify if associated consumer object is deleted #438
Comments
cc: @lucamaraschi |
@thibaultcha this is the consistency problem that we have been discussing a couple of times. Somehow related to #107. |
Context: Cassandra has no concept of foreign keys and cascade operations. To solve this the Cassandra DAO Factory could trigger an event such as function my_dao:on_delete_consumer(consumer_id)
end
function my_dao:on_delete_api(api_id)
end More work for developers but tied to the Cassandra DAO so no need to apply it to the future Postgres DAO which can use proper cascade deletes. |
This implements a "delete hook" system to trigger cascade deletion of foreign rows in Cassandra. To do so, all foreign columns (representing foreign keys) must now be queryable (which means be indexed by Cassandra). A "delete hook" is added to a parent DAO if any other DAO has foreign rows to that DAO. Ex: APIs are parents to plugins_credentials, hence the `apis` DAO will have a delete hook on the deletion of a row, to also delete any related `plugins_configurations`. - Move cascade delete tests to another file, with all use cases of current cascade deletion. - Add a migration for oauth2 plugin to index the `consumer_id` field. - Remove obsolete overridden delete methods of apis and consumers DAOs. This should be a solution to #438 and is an improved implementation of #107
scenario:
oauth2
plugin with APIclient_id
+client_secret
client_id
+client_secret
as beforein addition, there is no possible way to modify the plugin configrations, or attempt to reset the
client_id
andclient_secret
, so the result is that those values are stored forever in the database with no chance of ever re-using them.The text was updated successfully, but these errors were encountered: