astarte-platform / astarte-platform/astarte-device-sdk-cpp
Better structure the config and credentials files/classes
- Dominant language
- C++
- Stars
- 2
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
There are various issues with the current credential/configuration classes and headers.
Here are some:
- The credentials class should manage all credentials-related operations. Such as storing and retrieving the credentials from persistence storage. However, since the Credentials class is a private member of the configuration class, it's impossible to access the credentials instance where it is needed. For example, in the device class.
- Currently, the credentials class is structured so it can be either a credential secret or a pairing token. This is fixed and remains unchanged within the lifetime of the object. However, this conceptually makes little sense. The pairing token is a temporary credential that is always replaced with the credential secret shortly after the creation of the device. A suggestion would be to make the credentials class able to register the device.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named. Start by tracing the configuration and credentials classes and their use from the Device class, then document how credentials are persisted and transition from pairing token to credential secret. Done should mean the ownership, access, and lifecycle responsibilities are clearly restructured without leaving the current credential operations ambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100