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

[ 19º ] - Release/v2.1.0 backend agree: Enabled policy selection and handling of more than one contract in the backend #205

Merged

Conversation

matbmoser
Copy link
Contributor

@matbmoser matbmoser commented Feb 2, 2024

Why we create this PR?

IMPORTANT: This a functionality that needed to be included in the version v2.0.0 (included in the documentation) from the DPP however was posponed for v2.1.0

Because of data compliance the user needs to be able to "sign" or "agree" the contract and be able to choose which policy he wants to accept.

In case there are more than one policy the application uses to take the first one. However that can cause problems when the Policies contain agreements that can not be fellfield by the user.

What we want to achieve with this PR?

We want to add a "policy selection" feature to the application so that the user can say which policy he wants to choose.
We want to allow the backend to handle more than one policy and more contracts for data soverenighty.
Allow the frontend to handle the new changes without loosing its functionality.

What is new?

Added

  • Added policyId parameter to "/agree" api.
  • Added mechanism to get a policy by id from a catalog contract
  • Added frontend logic to call the "/decline" and "/cancel" backend APIs
  • Added reload option in case of error
  • Added/fixed logging of the Digital Twin Registry Contracts and which policy was selected (Data Souverenighty improve)
  • Added util method to move files from one path to another
  • Added functionality to treat more than one policy and more than one contract, allowing user to decide
  • Added safety functionalities to make sure that the contract selected is correct.

Update

  • [BRAKING CHANGE] Renamed API "sign" to negotiate "/agree"
  • Bumped Vite to version >=4.5.2
  • Updated the frontend to allow the "AutoSigning" of contracts.
  • Optimized temporary directory logging of the DTR negotiation

Issues Fixed

  • Fixed issue related to "sleepy" EDCs, allowing the backend to re-request the contract negotiation when the EDC does not respond.

saudkhan116 and others added 30 commits June 26, 2023 13:36
@matbmoser matbmoser added the backend Issue or PR connected to the backend application label Feb 2, 2024
@matbmoser matbmoser modified the milestones: v2.1.0, v2.0.0 Feb 2, 2024

- name: Upload Trivy scan results to GitHub Security tab
if: always()
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3

Check notice

Code scanning / KICS

Unpinned Actions Full Length Commit SHA Note

Action is not pinned to a full length commit SHA.

- name: Upload Trivy scan results to GitHub Security tab
if: always()
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3

Check notice

Code scanning / KICS

Unpinned Actions Full Length Commit SHA Note

Action is not pinned to a full length commit SHA.

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3

Check notice

Code scanning / KICS

Unpinned Actions Full Length Commit SHA Note

Action is not pinned to a full length commit SHA.
.github/workflows/publish-dpp-backend-docker-image.yml Dismissed Show dismissed Hide dismissed
.github/workflows/publish-dpp-backend-docker-image.yml Dismissed Show dismissed Hide dismissed
.github/workflows/publish-dpp-frontend-docker-image.yml Dismissed Show dismissed Hide dismissed
.github/workflows/publish-dpp-backend-docker-image.yml Dismissed Show dismissed Hide dismissed
.github/workflows/publish-dpp-backend-docker-image.yml Dismissed Show dismissed Hide dismissed
.github/workflows/publish-dpp-backend-docker-image.yml Dismissed Show dismissed Hide dismissed
Dockerfile Outdated
@@ -62,15 +63,15 @@
HEALTHCHECK NONE

# add permissions for a user
RUN chown -R 10000:3000 /app && chmod -R 775 /app/
RUN chown 10000:3000 /entrypoint.sh && chmod -R 775 /entrypoint.sh
RUN chown -R 1000:3000 /app && chmod -R 775 /app/

Check notice

Code scanning / KICS

Multiple RUN, ADD, COPY, Instructions Listed Note

There are RUN instructions that could be grouped
@matbmoser matbmoser changed the title Release/v2.1.0 backend agree: Enabled policy selection and handling of more than one contract in the backend [ 19º] - Release/v2.1.0 backend agree: Enabled policy selection and handling of more than one contract in the backend Feb 2, 2024
@matbmoser matbmoser modified the milestones: v2.0.0, v2.1.0 Feb 2, 2024
@matbmoser matbmoser requested a review from saudkhan116 February 2, 2024 18:27
@matbmoser matbmoser changed the title [ 19º] - Release/v2.1.0 backend agree: Enabled policy selection and handling of more than one contract in the backend [ 19º ] - Release/v2.1.0 backend agree: Enabled policy selection and handling of more than one contract in the backend Feb 2, 2024
@matbmoser matbmoser merged commit b60f636 into eclipse-tractusx:main Feb 2, 2024
6 of 7 checks passed
@matbmoser matbmoser deleted the release/v2.1.0-backend-agree branch February 2, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issue or PR connected to the backend application
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants