-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Is your feature improvement request related to a problem? Please describe.
If someone creates a device certificate outside of thin-edge.io with a Common Name that is not Cumulocity compliant, then the device will fail to connect to Cumulocity, but the error message is not obvious to the user that the Common Name is valid.
Describe the solution you'd like
Add a warning message which is printed during the tedge connect c8y command that warns the user when an invalid Common Name is detected (the same validation which is already done when using tedge cert create --device-id "myinvalid:name")
The validation is already present in the tedge cert create c8y command, however if users are creating their own device certificates (via some custom PKI integration), then they don't go through the same validation process, and hence it makes it harder for the users to spot the invalid common name.
$ tedge cert create c8y --device-id "myinvalid:name"
Error: failed to create a test certificate for the device myinvalid:name.
Caused by:
0: DeviceID Error
1: The string '"myinvalid:name"' contains characters which cannot be used in a name [use only A-Z, a-z, 0-9, ' = ( ) , - . ? % * _ ! @]Describe alternatives you've considered
Additional context