-
Notifications
You must be signed in to change notification settings - Fork 72
device.id should be derived from device certificates when in use #3369
Copy link
Copy link
Closed
Description
Is your feature improvement request related to a problem? Please describe.
If the cloud connection uses a certificate, then the device.id used for any cloud communication should be derived from the certificate's Common Name (CN).
Describe the solution you'd like
- When using certificates, the
device.idshould only be used as a default value when creating a certificate via thetedge cert createcommand if the--device-idflag is not provided by the user. - Cloud connections should only use the device.id from the certificate being used for the connection
The change in behaviour is best highlighted in the follow cases:
Case 1: Use explicit device id during cert creation
tedge config set device.id foo
tedge cert create --device-id bar
# => CN=barCase 2: Use default device.id
tedge config set device.id foo
tedge cert create
# => CN=fooCase 3: Use default device.id
tedge cert create --device-id foo
tedge config set device.id bar
tedge connect c8y
# => connect: device.id=fooCase 4: Use default device.id to create the cert
tedge config set device.id foo
tedge cert create
# CN=foo
tedge config set device.id bar
tedge connect c8y
# => connect: device.id=fooDescribe alternatives you've considered
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
improvementUser valueUser value