Open didier-wenzek opened 1 week ago
Looks good. It isn't explicitly mentioned in the example, but it would be good to support setting the the cli's flags (e.g. --device-id and --token) from environment variables as well (useful for automating the container use-case)
A planned PKI feature of Cumulocity IoT will allow a tenant to act as a Certificate Authority (CA) for its fleet of connected devices. Once enabled, this feature:
To leverage this feature, thin-edge must be extended along the following lines.
Device Registration
Security tokens are used to prove the legitimacy of certificate requests issued by the devices.
Technically, thin-edge could provide a command combining these steps. However,
Hence:
Certificate Creation
A new
tedge cert download c8y
cli sub-command is introduced, designed along similar lines as fortedge cert upload c8y
.Certificate Renewal
As long as a device is actually connected to Cumulocity with a valid certificate, the device can renew its certificate using the
tedge cert renew c8y
command.Note that a certificate renewal should not erase the current certificate that is still in use.
Several points need to be clarified:
tedge reconnect c8y
be triggered?Some helpers have to be added:
tedge cert show
command will be extended with an--expire-in
to display the number of days after which the certificate will expire.tedge config
has to be extended with: