astarte-platform / astarte-platform/astarte-device-sdk-cpp

When implicitly registering the credential secret is not stored

Open
#178 1 comment 0 reactions 0 assignees View on GitHub
bug MQTT
Dominant language
C++
Stars
2
Forks
4
PR merge metrics
No merged PRs in 30d

Description

In the create for the MQTT connection when using the pairing token, the device is registered, but the credential secret is not stored in persistent memory.
This will create an error upon reconnection of the same device to Astarte. As the credential secret will not be found, a second registration will be attempted. Resulting in an error from Astarte.

https://github.com/astarte-platform/astarte-device-sdk-cpp/blob/6734124e25edc80c8706247f421ce93aa2b4fd8d/src/mqtt/connection.cpp#L269-L277

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/mqtt/connection.cpp lines 269-277 and trace the create flow when an MQTT connection uses a pairing token. Reconnect the same device and verify that the credential secret is persisted and reused, without attempting a second registration with Astarte.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.