-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Add anchor and profile to anchor credential subject #1403
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1403 +/- ##
==========================================
- Coverage 88.08% 88.04% -0.05%
==========================================
Files 205 205
Lines 19092 19157 +65
==========================================
+ Hits 16818 16867 +49
- Misses 1459 1468 +9
- Partials 815 822 +7
Continue to review full report at Codecov.
|
d430707
to
590ed25
Compare
The credialSubject field in the anchor credential now has: - id - hashlink of the original content - anchor - the core index file hashlink - profile - the ID of the generator that generated the content When an anchor event is processed, the anchor credential subject is validated against the content. closes trustbloc#1348 Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@@ -139,6 +149,31 @@ func (h *AnchorEventHandler) HandleAnchorEvent(actor, anchorRef, source *url.URL | |||
} | |||
|
|||
func (h *AnchorEventHandler) processAnchorEvent(anchorInfo *anchorInfo) error { | |||
anchorLink := anchorInfo.anchorLink |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if this code should have been in observer.go line 340 This is where we parse VC with checking signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the checks in this spot since this is where anchor events from other domains are processed. The Observer also receives anchors from the local domain and these are assumed to be valid (since the local domain created it).
The credialSubject field in the anchor credential now has:
When an anchor event is processed, the anchor credential subject is validated against the content.
closes #1348
Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com