Closed bogtieba closed 3 months ago
If this is a problem of headers, then why the reg-pilot-api is is not rejecting the request with headers error?
The error is thrown by the verifier, so why the verifier do not accept the headers while the api accepts them? Don't these 2 services use the same verification mechanism for headers?
If this is a problem of headers, then why the reg-pilot-api is is not rejecting the request with headers error?
The error is thrown by the verifier, so why the verifier do not accept the headers while the api accepts them? Don't these 2 services use the same verification mechanism for headers?
Thank you for posting here @bogtieba ! Thats a good question.
The API only parses the headers to make sure they were provided as expected, but the actual verification of the signature over the headers is the responsibility of the verifier: https://github.com/GLEIF-IT/reg-pilot-api/blob/main/src/regps/app/api/signed_headers_verifier.py#L27-L30
which calls the verifier: https://github.com/GLEIF-IT/vlei-verifier/blob/c28678ab97a77e7ff5fc7c3c7f1b704dee4bb4c7/src/verifier/core/verifying.py#L283
[ ] When you get a chance, it would help to see the logs for /login since the verifier is indicating that the ECR cred you presented wasn't accepted.
Note that we can simulate your same login using this test environment setup: https://github.com/GLEIF-IT/reg-pilot/blob/main/signify-ts-test/test/utils/resolve-env.ts#L148 And this integration test: https://github.com/GLEIF-IT/reg-pilot/blob/main/signify-ts-test/test/vlei-verification.test.ts#L133
Waiting for @bogtieba to test the changes/command provided https://github.com/GLEIF-IT/reg-pilot/pull/50#discussion_r1722142514
Hey @2byrds !
I was able to manually run the tests I was looking for using SIGNIFY_SECRETS="A7DKYPya4oi6uDnvBmjjp" TEST_ENVIRONMENT="nordlei_demo" ROLE_NAME="unicredit-datasubmitter" REG_PILOT_API="https://reg-api-dev.rootsid.cloud" npx jest ./vlei-verification.test.ts -t "reg-pilot-api"
Currently I'm adjusting my implementation to confirm that the flow is working within our application. Hope I have a answer by tomorrow.
Hey @2byrds ! I was able to manually run the tests I was looking for using
SIGNIFY_SECRETS="A7DKYPya4oi6uDnvBmjjp" TEST_ENVIRONMENT="nordlei_demo" ROLE_NAME="unicredit-datasubmitter" REG_PILOT_API="https://reg-api-dev.rootsid.cloud" npx jest ./vlei-verification.test.ts -t "reg-pilot-api"
Currently I'm adjusting my implementation to confirm that the flow is working within our application. Hope I have a answer by tomorrow.
Thank you for the update @bogtieba . Sounds good and happy to help if you run into anything. We will be pushing out some new updates soon (in a day or so) with the SHA-256 digest validation per https://github.com/GLEIF-IT/reg-pilot/discussions/41
We are now able to send files to the verifier using signed requests. I used the test files as examples.
We had 2 problems
application/zip
with the body as the zip binary. The right way is to send an POST request and file
field should be the body of the zip file. We can close this now and I will raise a new one for point 1.
We are now able to send files to the verifier using signed requests. I used the test files as examples. We had 2 problems
- We used a different aid (not the same as the signer)
- On the POST request, I was sending a
application/zip
with the body as the zip binary. The right way is to send an POST request andfile
field should be the body of the zip file.We can close this now and I will raise a new one for point 1.
Thats great @bogtieba lets continue to improve it for easy use for you and others.
Upload: Exception: 404: {'msg': 'unknown EFE8-Km32lJzOa51K3IWMcctJCX8Ifu5f4BaUWdfgSbw used to sign header'}
Is something we do wrong on our side? I know that couple of weeks ago, Daniel Lenksjö (Guest) mentioned the register endpoint, we tried that PUT presentations/EFE8-Km32lJzOa51K3IWMcctJCX8Ifu5f4BaUWdfgSbw with the cesr as body but got "msg": "credential EFE8-Km32lJzOa51K3IWMcctJCX8Ifu5f4BaUWdfgSbw from body of request was not found
fyi: Tiberiu Covaci
Details from an internal conversation with @2byrds