Closed jjeroch closed 3 months ago
@Phil91 can you please check once how the iatp and issuer id is getting created as part of GET /api/administration/companydata/decentralidentity/urls? ideally we use the same for this endpoint.
@sachinargade123 @ciprianherciu it's ready for testing
Description: Our current system, which integrates Self-Sovereign Identity (SSI) and Enterprise Data Centers (EDCs), lacks a crucial feature that allows app/service providers who manage an EDC on behalf of a customer, to verify that the EDC is accurately configured to the customer's wallet rather than the service/app provider's wallet. To address this, we need to enhance the endpoint
GET /api/apps/{appId}/subscription/{subscriptionId}/provider
to return additional configuration details.Acceptance Criteria:
externalService
.externalService
section should contain the following fields with their respective data types:trusted_issuer
(string)participant_id
(string)iatp_id
(string)did_resolver
(string)decentralIdentityManagementAuthUrl
(string)decentralIdentityManagementServiceUrl
(string)"trusted_issuer"
iatp address of the issuer (e.g. did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp)"participant_id"
Subscription customer BPNL"iatp_id"
iatp address of the holder (e.g. did:web:dim-static-prod.dis-cloud-prod.cfapps.eu10-004.hana.ondemand.com:dim-hosted:2f45795c-d6cc-4038-96c9-63cedc0cd266:holder-iatp)"did_resolver"
URL of the didResolver available inside the env. variables (e.g. https://bpn-did-resolution-service.int.demo.catena-x.net/api/directory)"DecentralIdentityManagementAuthURL"
is configured inside the environment variables and displays the DIM e.g.https://dis-integration-service-prod.eu10.dim.cloud.sap/api/v2.0.0/iatp/catena-x-portal"DecentralIdentityManagementServiceURL"
should be fetched from the portal backend which displays the customer wallet instance url - e.g. https://bpnl0000000001j2-j2.authentication.eu10.hana.ondemand.com/externalService
section with an explanation of each field.Tasks:
externalService
section.Proposed new response body details:
Test Case 1: Retrieve Subscription Provider with EDC Configuration Details
Objective: Ensure the endpoint returns the enhanced response including the
externalService
section.Steps:
/api/apps/{appId}/subscription/{subscriptionId}/provider
.externalService
section.externalService
fields contain expected data types and values.Expected Result: The response includes the
externalService
section with correct details fetched from the subscription customer's configuration.Test Case 2: Validate Field Data Types in
externalService
Objective: Confirm that all fields in the
externalService
section have the correct data types.Steps:
/api/apps/{appId}/subscription/{subscriptionId}/provider
.externalService
section is of type string.Expected Result: All fields in the
externalService
response are strings.Test Case 3: Backward Compatibility
Objective: Ensure that the enhancement does not break existing functionality.
Steps:
/api/apps/{appId}/subscription/{subscriptionId}/provider
using an API version that predates the enhancement.externalService
section.Expected Result: The response is as per the original schema and functionality remains unaffected for the old API version.
Test Case 4: Error Handling for Non-Existent Subscription
Objective: Verify that the endpoint handles requests for non-existent subscriptions correctly.
Steps:
/api/apps/{appId}/subscription/{nonExistentSubscriptionId}/provider
.Expected Result: The endpoint returns a 404 Not Found for non-existent subscriptions.
Test Case 5: Security and Authorization Check
Objective: Ensure that only authorized users can access the EDC configuration details.
Steps:
/api/apps/{appId}/subscription/{subscriptionId}/provider
without proper authorization.Expected Result: Unauthorized users cannot retrieve EDC configuration details from the endpoint.
Test Case 6: Documentation and Schema Validation
Objective: Confirm that the endpoint documentation has been updated and the schema is valid.
Steps:
externalService
section and its fields.Expected Result: The documentation accurately reflects the endpoint's updated schema and functionality.
Test Case 7: Field Presence Validation
Objective: Check that all new fields in the
externalService
section are always present in the response.Steps:
/api/apps/{appId}/subscription/{subscriptionId}/provider
.externalService
section are present, regardless of whether they are populated or null.Expected Result: The response always contains the
externalService
section with all expected fields.