Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate "OtaChecksum" is base64 encoded when adding a Model-Version entry #570

Closed
jcps07 opened this issue May 1, 2024 · 1 comment
Closed
Assignees
Projects

Comments

@jcps07
Copy link
Contributor

jcps07 commented May 1, 2024

From conversation in PR #33256:

May 1, 2024

We've seen a few cases where a software update is posted in the DCL and the OtaChecksum is not base64 encoded. What do you think about adding a test that verifies at least that all the software versions for this device model have a correctly formatted checksum? Could potentially also verify other fields as well but this one in particular feels especially important.

I'd be good to add this validation at dcld stage, as it's a requirement by the Matter Spec:

OtaChecksum
OtaChecksum SHALL contain the digest of the entire contents of the associated OTA Software
Update Image under the OtaUrl field, encoded in base64 string representation. The digest SHALL
have been computed using the algorithm specified in OtaChecksumType. This field SHALL be provided
if the OtaUrl field is populated.

@akarabashov akarabashov added this to To do in DCL 1.4 May 22, 2024
Abdulbois added a commit that referenced this issue May 22, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
Abdulbois added a commit that referenced this issue May 22, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
@akarabashov akarabashov moved this from To do to In progress in DCL 1.4 May 22, 2024
Abdulbois added a commit that referenced this issue May 22, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
Abdulbois added a commit that referenced this issue May 23, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
Abdulbois added a commit that referenced this issue May 23, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
@akarabashov akarabashov moved this from In progress to In Review in DCL 1.4 May 24, 2024
akarabashov added a commit that referenced this issue May 24, 2024
Abdulbois added a commit that referenced this issue May 27, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
@akarabashov
Copy link
Collaborator

akarabashov commented May 27, 2024

PR: #572

  • Added validation to ensure that 'OtaChecksum' field is base64 encoded data
  • Unit and integration tests are added
  • Docs are updated

@akarabashov akarabashov moved this from In Review to Done in DCL 1.4 May 27, 2024
@akarabashov akarabashov moved this from In Review to Done in DCL 1.4 May 27, 2024
@akarabashov akarabashov moved this from In Review to Done in DCL 1.4 May 27, 2024
Abdulbois added a commit that referenced this issue May 31, 2024
- Bump schemaVersion of PKI Distribution Point model
- Add base64 format validation for OTAChecksum of Model Version model

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants