-
Notifications
You must be signed in to change notification settings - Fork 232
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
feat(dsp): implement GET /id negotiation endpoint #3212
feat(dsp): implement GET /id negotiation endpoint #3212
Conversation
private ServiceResult<ContractNegotiation> validateGetRequest(ClaimToken claimToken, String id, ContractNegotiation negotiation) { | ||
var result = validationService.validateRequest(claimToken, negotiation); | ||
if (result.failed()) { | ||
// should return not found if counter-party not authorized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that this is stated in the specs, but shouldn't be more http-like to return 403?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea behind returning the 404 is to not give out information about the existence of processes to unauthorized parties.
...clipse/edc/connector/service/contractnegotiation/ContractNegotiationProtocolServiceImpl.java
Outdated
Show resolved
Hide resolved
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #3212 +/- ##
=======================================
Coverage 65.60% 65.60%
=======================================
Files 844 844
Lines 16902 16914 +12
Branches 931 933 +2
=======================================
+ Hits 11089 11097 +8
- Misses 5441 5444 +3
- Partials 372 373 +1
☔ View full report in Codecov by Sentry. |
What this PR changes/adds
Adds a method
findById
to theContractNegotiationProtocolService
, that takes aClaimToken
as parameter and returns a negotiation only if the requesting party is authorized. Using this method, implements theGET /id
endpoint in theDspNegotiationApiController
.Why it does that
To support the protocol specification
Linked Issue(s)
Closes #2795