dfpc-coe / CloudTAK

Full Featured in-browser TAK Client powered by AWS
GNU Affero General Public License v3.0
13 stars 1 forks source link

When deleting a connection, some housekeeping needs to be done on the COTAK side #378

Open cheesegrits opened 1 week ago

cheesegrits commented 1 week ago

When a "connection" is deleted on the CloudTAK side, there needs to be some housekeeping that deletes the associated "integration" on the COTAK side, and either detaches the machine user from the associated channel(s), or deletes the machine user entirely.

Note that when creating an integration, either through the ./machine-users when creating a new machine user, or directly through the ./integrations APIs, you can include an 'external_identifier' for the integration, which you can then use to fetch it later with the api/v1/proxy/integrations/etl/identifier/{identifier} call. My assumption is that you would use your Connection ID. That way you don't have to store my ID's, you can just use your own to fetch the COTAK integration record for a given CloudTAK connection ID.

We could simplify the process for you by adding query string options on the integration /delete endpoint to either "delete associated machine users" or "detach associated machine users from channels".