-
Notifications
You must be signed in to change notification settings - Fork 72
tedge connect c8y should display the auth method used (certificates or basic auth) #3380
Copy link
Copy link
Closed
Labels
improvementUser valueUser valuetheme:c8yTheme: Cumulocity related topicsTheme: Cumulocity related topics
Milestone
Description
Is your feature improvement request related to a problem? Please describe.
When using tedge connect c8y and setting the c8y.auth_method to basic, the command output displays incorrect information about the certificate.
Below shows an example of the output when using a username/password MQTT connection to Cumulocity.
$ sudo tedge connect c8y
Connecting to Cumulocity with config:
device id: TST_mute_thundering_agent
cloud profile: <none>
cloud host: thin-edge-io.eu-latest.cumulocity.com:8883
certificate file: /etc/tedge/device-certs/tedge-certificate.pem
bridge: mosquitto
service manager: systemd
mosquitto version: 2.0.11
Creating device in Cumulocity cloud... ✓
Restarting mosquitto... ✓
Waiting for mosquitto to be listening for connections... ✓
Verifying device is connected to cloud... ✓
Enabling tedge-mapper-c8y... ✓
Enabling tedge-agent... ✓The certificate file: /etc/tedge/device-certs/tedge-certificate.pem line suggestions that a certificate is being used when in-fact it isn't. This causes the user to question their configuration.
Describe the solution you'd like
The tedge connect c8y commands (including the --test option), should display
- Show the certificate path only if a certificate is being used (note
c8y.auth_methodcan be set to eitherbasicorauto(wherebasicauth is used only if the given path (c8y.credentials_path) exists)
When using a certificate
$ sudo tedge connect c8y --test
Testing Cumulocity connection with config:
device id: TST_mute_thundering_agent
cloud profile: <none>
cloud host: thin-edge-io.eu-latest.cumulocity.com:8883
auth method: certificate <=== new
certificate file: /etc/tedge/device-certs/tedge-certificate.pem
bridge: mosquitto
service manager: systemd
mosquitto version: 2.0.11
Verifying device is connected to cloud... ✓
Connection check to c8y cloud is successful.When using basic auth
$ sudo tedge connect c8y --test
Testing Cumulocity connection with config:
device id: TST_mute_thundering_agent
cloud profile: <none>
cloud host: thin-edge-io.eu-latest.cumulocity.com:8883
auth method: basic <=== new
credentials path: /etc/tedge/credentials.toml <=== new
bridge: mosquitto
service manager: systemd
mosquitto version: 2.0.11
Verifying device is connected to cloud... ✓
Connection check to c8y cloud is successful.Describe alternatives you've considered
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
improvementUser valueUser valuetheme:c8yTheme: Cumulocity related topicsTheme: Cumulocity related topics