thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
221 stars 54 forks source link

Delete uploaded certificates #1089

Closed abelikt closed 1 year ago

abelikt commented 2 years ago

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

rina23q commented 2 years ago
rina23q commented 2 years ago

This issue is still valid.

reubenmiller commented 1 year ago

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
rina23q commented 1 year ago

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.

didier-wenzek commented 1 year ago

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

reubenmiller commented 1 year ago

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