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

OCSP responder for v3 documents #243

Closed
morgatron opened this issue Jan 20, 2023 · 7 comments · Fixed by #245
Closed

OCSP responder for v3 documents #243

morgatron opened this issue Jan 20, 2023 · 7 comments · Fixed by #245
Labels

Comments

@morgatron
Copy link

The OCSP responder looks great for DID-signed documents, especially those for v3. However it seems that v3 documents aren't currently supported:

      case v3.RevocationType.OcspResponder:
        throw new Error("Ocsp revocation type not yet supported for v3");

(from didSignedDocumentStatus.ts)
This seems pretty straightforward to add however, using the v2 code as a guide.

Are there any plans to add this?

@HJunyuan
Copy link
Member

Hi @morgatron, thanks for the suggestion! We'll add this into our backlog and keep you updated here when it gets implemented.

@morgatron
Copy link
Author

Thanks @HJunyuan !
I'm guessing you can't give us a time estimate? ;)

@morgatron
Copy link
Author

To be clear, it's looking like this will be important for our customer. We'll be needing the feature in the next couple of months...

any clarity you can provide would be fantastic.

@morgatron
Copy link
Author

morgatron commented Feb 1, 2023

I could be wrong, but it looks as simple as replacing

  case v3.RevocationType.OcspResponder:
    throw new Error("Ocsp revocation type not yet supported for v3");

with

  case v3.RevocationType.OcspResponder:
    if (typeof location === "string") {
      return isRevokedByOcspResponder2({
        merkleRoot,
        targetHash,
        proofs,
        location,
      })
    }

in didSignedDocumentStatus.ts

I can raise a PR if desired, but I'm not sure I understand how tests work for this currently so I'm not sure I can update them.

Let me know!

@HJunyuan
Copy link
Member

HJunyuan commented Feb 1, 2023

Yes you are right! We'll just need to focus on creating the tests and it should be done. Will get started on this around this or next week or when the new sprint starts.

HJunyuan added a commit that referenced this issue Feb 6, 2023
- Implement handling of `OCSP_RESPONDER` type of revocation for OA v3 documents
- Add tests for DID-issued OA v3 documents with OCSP_RESPONDER type of revocation
- Housekeeping of filenames for fixtures

BREAKING CHANGE: the old OCSP Responder implementation (where it checks by by document id instead of merkle root & intermediate hashes) is now deprecated

It is no longer possible to perform OCSP revocation by document id as mentioned in #228


Fixes #243
@john-dot-oa
Copy link
Contributor

🎉 This issue has been resolved in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@morgatron
Copy link
Author

Great!!

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

Successfully merging a pull request may close this issue.

3 participants