EWC-consortium / ewc-wallet-conformance-backend

This is the EWC Interoperability Test Bed (ITB) and implements the conformance towards EWC RFCs; build towards the Large Scale Pilot (LSP) usecases. The project is co-funded by the European Union.
3 stars 1 forks source link

Getting error while testing - Test case 22: Verify Educational and Alliance ID #7

Closed georgepadayatti closed 3 months ago

georgepadayatti commented 3 months ago

It was working perfectly just half an hour before.

Log

[2024-06-03 09:03:23] INFO  - Starting session
[2024-06-03 09:03:23] DEBUG - Status update - step [Sequence] - ID [1]: PROCESSING
[2024-06-03 09:03:23] DEBUG - Status update - step [Process] - ID [1.1]: PROCESSING
[2024-06-03 09:03:23] INFO  - Requesting validation of session ID [7c1b3a9e-f2b3-4678-a614-68dc34ccb63f] from endpoint [https://dss.aegean.gr/rfc-issuer/vp-request/erua-id].
[2024-06-03 09:03:23] DEBUG - Status update - step [Process] - ID [1.1]: COMPLETED
[2024-06-03 09:03:23] DEBUG - Status update - step [Request validation] - ID [1.2]: PROCESSING
[2024-06-03 09:03:23] DEBUG - Status update - step [Request credential validation] - ID [1.2.1]: PROCESSING
[2024-06-03 09:03:23] DEBUG - Status update - step [Request credential validation] - ID [1.2.1]: COMPLETED
[2024-06-03 09:03:23] DEBUG - Status update - step [Check status code] - ID [1.2.2]: PROCESSING
[2024-06-03 09:03:23] DEBUG - Status update - step [Request validation] - ID [1.2]: ERROR
[2024-06-03 09:03:23] DEBUG - Status update - step [Check response] - ID [step2]: SKIPPED
[2024-06-03 09:03:23] DEBUG - Status update - step [Sequence] - ID [1]: ERROR
[2024-06-03 09:03:23] DEBUG - Status update - step [Call] - ID [1]: ERROR
[2024-06-03 09:03:23] DEBUG - Status update - step [Check status code] - ID [1.2.2]: ERROR
[2024-06-03 09:03:23] DEBUG - Preparing to stop
[2024-06-03 09:03:24] INFO  - Session finished with result [ERROR]

Screenshot:

Screenshot 2024-06-03 143709

endimion commented 3 months ago

there was an error handling missing in the backend service regarding the authorization endpoint. Specifically, if the parameter authorizatiton_details was missing the service would crash.

As this is only a testing service specific validations are not implemented for the authorization details requested (which should include the credential that the authorizatiton code should apply to). For this reason a simple check was added so that the service doesn't crash in this case:

const authorizationDetails = req.query.authorization_details ? JSON.parse( decodeURIComponent(req.query.authorization_details) //TODO this contains the credentials requested ) : null;