thin-edge.io icon indicating copy to clipboard operation
thin-edge.io copied to clipboard

Delete uploaded certificates

Open abelikt opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Every once in a while we should delete uploaded certificates from C8y.

Describe the solution you'd like

Have a small script in the QA repo that does the job with the c8y_api. Unsure if we should just delete all certificates or avoid some that are in use.

Describe alternatives you've considered

It was mentioned that even millions of certificates shouldn't matter. So the alternative is to do nothing :)

Additional context

context

abelikt avatar Apr 19 '22 07:04 abelikt

  • Prepare a script to remove all certificates from the eu-latest tenant in the QA repo.
  • We run the script manually from time to time.

rina23q avatar Apr 19 '22 10:04 rina23q

This issue is still valid.

  • We still run smoke tests to Cumulocity.
  • The script configure_bridge.sh creates a device certificate on every run and upload it to our Cumulocity tenant.

rina23q avatar Jul 27 '22 13:07 rina23q

If this is just for the CI/CD runner, then we could use my open source tool go-c8y-cli

After setting the required environment variables for the url, username, password etc, deleting all of the certificates can be done using:

c8y devicemanagement certificates list --includeAll  | c8y devicemanagement certificates delete

reubenmiller avatar Nov 04 '22 15:11 reubenmiller

If this is just for the CI/CD runner, then we could use my open source tool go-c8y-cli

After setting the required environment variables for the url, username, password etc, deleting all of the certificates can be done using:

c8y devicemanagement certificates list --includeAll  | c8y devicemanagement certificates delete

After I saw your demo, I came back to this issue as I really think this is the solution :) It is just for the CI/CD runner.

rina23q avatar Nov 15 '22 13:11 rina23q

Is this still relevant? I don't think so.

didier-wenzek avatar Mar 03 '23 10:03 didier-wenzek

The new integration test setup does an automatic cleanup of any uploaded device certificates to Cumulocity IoT.

reubenmiller avatar Mar 10 '23 08:03 reubenmiller