Skip to content

Commit

Permalink
feat: stable contract offer id in DspCatalogService (sovity#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Loiseau authored and dhommen committed Mar 26, 2024
1 parent d5c5a84 commit 0be4127
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md).
- API Wrapper: TS Client Library now supports OAuth Client Credentials

#### Patch Changes
- DspCatalogService: Contract Offer IDs are now stable

- Add e2e test for double encoding of query parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class DspContractOfferUtils {
* @return A base64 string that can be used as an id for the {@code contract}
*/
public static String buildStableId(JsonObject contract) {
// NOTE: This doesn't enforce any property order and may cause trouble if the returned policy schema is not consistent.
// FIXME: This doesn't enforce any property order and may cause trouble if the returned policy schema is not consistent.
// Use canonical form if needed later.
val noId = Json.createObjectBuilder(contract).remove(Prop.ID).build();
val policyId = hash(noId);
Expand Down

0 comments on commit 0be4127

Please sign in to comment.