tagbase / tagbase-server

tagbase-server is a data management web service for working with eTUFF and nc-eTAG files.
https://oiip.jpl.nasa.gov/doc/OIIP_Deliverable7.4_TagbasePostgreSQLeTUFF_UserGuide.pdf
Apache License 2.0
7 stars 2 forks source link

ISSUE-180 Implement DELETE admin tasks for tags and submissions #228

Closed lewismc closed 1 year ago

lewismc commented 1 year ago

@renato2099 this is merely for the OpenAPI spec... not the implementation. Let's talk more. I submit this for design only. You can fetch openapi.yaml and load it into https://editor.swagger.io/ We can sort out response objects later. Thinking ahead to implementation, we need to perform a cascade on tables. This can be tricky when target tables have been written to by the TRIGGER and we need to ultimately 'rollback' those transactions to other tables and even materialized views. This needs to be treated with caution.

lewismc commented 1 year ago

@tagtuna @tagbase/owners we can use this as the basis for implementing a real authentication mechanism for tagbase. This REST API design (without accompanying authentication) means that tom, dick or harry could delete data if they had access to the docker network.

lewismc commented 1 year ago

@renato2099 the updated PR implement the DELETE /tags i.e. delete all tags. Simple

TRUNCATE submission CASCADE;

I'll keep adding the other implementations and we can test.

lewismc commented 1 year ago

@renato2099 this is ready for review.

lewismc commented 1 year ago

Any comments @renato2099 ?