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

v2.1 validation doesn't seem to be working correctly #21

Open
akodate opened this issue Apr 29, 2020 · 4 comments
Open

v2.1 validation doesn't seem to be working correctly #21

akodate opened this issue Apr 29, 2020 · 4 comments

Comments

@akodate
Copy link

akodate commented Apr 29, 2020

First, a quick fix: V2_1_SCHEMA_LOCAL_PATH points to v2.0, as shown here:

V2_1_SCHEMA_LOCAL_PATH = '2.0/schema.json'

However, this doesn't seem to solve the whole problem. Certificates I tested still seem to pass v2.1 validation only to cause the blockcerts-verifier verification dialog (with the checkmark) to throw an error and not display at all.

Let me know if I'm overlooking something here since I'm not familiar with v2.1 (haven't seen it in cert-tools etc.) and am issuing using the usual v2 tools.

@lemoustachiste
Copy link
Member

lemoustachiste commented Apr 29, 2020

Hi @akodate,

Could you tell me which blockcerts-verifier version (or where on the web) did you try for verifying? I have seen that indeed it breaks on blockcerts.org, and I know this one is not up to date, but I am trying to scope the issue.

My local version does not verify (unable to get issuer profile) the v2.1 example of this repo, but does not yield a js error either. If I try to access the issuer profile manually it indeed is not there: https://www.blockcerts.org/blockcerts_v2_alpha/samples/issuer_testnet.json.

However, this doesn't seem to solve the whole problem.

Are you saying that you are having problems with other v2.1 certificates? or 2.0? or both?
Could you provide examples of failing ones? Are those always JS errors, or "just" validation errors? You may also be able to debug (seeing clearer errors in the console) by running https://github.com/blockchain-certificates/blockcerts-verifier locally.

@akodate
Copy link
Author

akodate commented Apr 29, 2020

@lemoustachiste
Thanks for the quick response and good questions.
I'm using blockcerts-verifier v1.31.0 on valid v2.0 Blockcerts that I issue (I haven't tested this repo's v2.1 examples since I assumed they would work).

So far I'm only concerned about JS errors; no validation errors yet.
I can prepare an example of a failing certificate if you think that would be helpful.
Your suggestion to try debugging blockcerts-verifier locally to get clearer error messages is a good idea; hopefully I can get it running locally.

I was hoping to use the validator to find out if and how my v2.0 Blockcerts are incompatible with v2.1 since I can't find information on how to issue v2.1 Blockcerts or what's different about them.
I did a JSON diff on the v2.0 and v2.1 schema files but the only differences I could find were all references to "2.0" being changed to "2.1".
Nothing really seems to have changed in the v2.1 schema.
Does that seem correct?

@akodate
Copy link
Author

akodate commented Apr 29, 2020

I just checked the 2.1 example from this repo (sample_valid.json); it throws a JS error on my blockcerts-verifier.

The biggest difference between the 2.0 and 2.1 example certificates seems to be the RecipientProfile structure.
2.0 has recipient separate from recipientProfile
2.1 has recipientProfile inside recipient
The 2.0 and 2.1 schemas are the same though... (they use the 2.1 structure)
This seems like it would cause some problems.

I don't have all of this figured out, but this hint seems like it could be very useful for tracking the problem down.

@akodate
Copy link
Author

akodate commented Apr 29, 2020

Just one more thing:
https://www.blockcerts.org/schema/2.0/context.json is different from
cert_schema/2.0/context.json (this repo)

This looks like a useful hint as well.
I'll stop commenting for now; please let me know if you find anything or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants