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

ETag Resource Checksum #540

Merged
merged 1 commit into from
Oct 23, 2023
Merged

ETag Resource Checksum #540

merged 1 commit into from
Oct 23, 2023

Conversation

Danielius1922
Copy link
Member

No description provided.

@ocf-conformance-test-tool
Copy link

🎉 Thank you for your code contribution! To guarantee the change/addition is conformant to the OCF Specification, we would like to ask you to execute OCF Conformance Testing of your change ☝️ when your work is ready to be reviewed.


ℹ️ To verify your latest change (ac363dc), label this PR with OCF Conformance Testing.

⚠️ Label is removed with every code change.

@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 4 times, most recently from 2c2ae64 to cc7024f Compare October 4, 2023 11:56
util/unittest/crc64test.cpp Outdated Show resolved Hide resolved
api/oc_server_api.c Outdated Show resolved Hide resolved
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 3 times, most recently from 79ff17c to 81065c8 Compare October 11, 2023 16:54
api/oc_rep_encode_crc.c Outdated Show resolved Hide resolved
@Danielius1922 Danielius1922 changed the base branch from master to adam/feature/extend-encoders October 12, 2023 06:36
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch from 81065c8 to a165000 Compare October 12, 2023 08:17
Base automatically changed from adam/feature/extend-encoders to master October 12, 2023 13:20
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 9 times, most recently from e328fa7 to 7fc87d9 Compare October 16, 2023 08:49
api/oc_rep_encode.c Outdated Show resolved Hide resolved
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 4 times, most recently from b97c13b to 5fb6efc Compare October 16, 2023 11:31
@Danielius1922 Danielius1922 changed the title Add CRC64 (ECMA-182, reflected form polynomial) calculation ETag Resource Checksum Oct 18, 2023
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch from 5fb6efc to cb48100 Compare October 18, 2023 09:51
@Danielius1922 Danielius1922 force-pushed the adam/feature/crc-encoder branch from eb0e576 to 6972b9f Compare October 19, 2023 11:03
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 2 times, most recently from fb2d062 to 4e153e8 Compare October 19, 2023 14:12
Base automatically changed from adam/feature/crc-encoder to master October 19, 2023 15:37
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 3 times, most recently from 4a50340 to ec7bf9c Compare October 20, 2023 13:57
@Danielius1922 Danielius1922 changed the base branch from master to adam/feature/oc-rep-updates October 20, 2023 13:57
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch from ec7bf9c to 6b3da68 Compare October 20, 2023 16:07
Base automatically changed from adam/feature/oc-rep-updates to master October 20, 2023 19:38
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch from 6b3da68 to b8d40af Compare October 20, 2023 22:23
include/oc_ri.h Outdated Show resolved Hide resolved
api/oc_etag_internal.h Outdated Show resolved Hide resolved
@Danielius1922 Danielius1922 marked this pull request as ready for review October 21, 2023 14:16
@Danielius1922 Danielius1922 requested a review from jkralik October 21, 2023 14:16
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch from f0e87d6 to 662dcb2 Compare October 21, 2023 17:29
@jkralik
Copy link
Member

jkralik commented Oct 21, 2023

Good job 👍

@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch 2 times, most recently from 743bcc7 to 170dab4 Compare October 21, 2023 19:25
@Danielius1922 Danielius1922 added the OCF Conformance Testing OCF Conformance Testing required label Oct 21, 2023
@jkralik
Copy link
Member

jkralik commented Oct 22, 2023

@Danielius1922 Pls could you integrate load and dump etag to cloud_server ?

- Implemented the calculation of a CRC64 checksum for each resource
payload.
- By default, the GET payload with the "oic.if.baseline" interface
is used for a resource.
- Special handling is added for resources `/x.plgd.dev/time` and
`/oic/res`, which contain properties that might change on each GET
request. For these resources, an internal "x.plgd.if.etag"
interface is used to filter out problematic properties from the
payload.
- Updated the ETag storage payload to include not only the ETag
of the given resource but also the checksum for the resource.
- When data is loaded from storage, it now verifies the checksum
before processing, ensuring data integrity.
@Danielius1922 Danielius1922 force-pushed the adam/feature/etag-hash branch from 170dab4 to 8382744 Compare October 22, 2023 20:05
@ocf-conformance-test-tool ocf-conformance-test-tool bot removed the OCF Conformance Testing OCF Conformance Testing required label Oct 22, 2023
@Danielius1922 Danielius1922 added the OCF Conformance Testing OCF Conformance Testing required label Oct 22, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

92.2% 92.2% Coverage
0.3% 0.3% Duplication

@Danielius1922 Danielius1922 merged commit afb52af into master Oct 23, 2023
121 checks passed
@Danielius1922 Danielius1922 deleted the adam/feature/etag-hash branch October 23, 2023 10:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
OCF Conformance Testing OCF Conformance Testing required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants