-
Notifications
You must be signed in to change notification settings - Fork 516
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/revocation notification v2 #1734
Feat/revocation notification v2 #1734
Conversation
I believe this has been implemented as per RFC 0721 from this PR hyperledger/aries-rfcs#721 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Fix the output message for Revocation Notification V2 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
@andrewwhitehead are the tests that are failing related to the Askar update you mentioned on the ACA-PUG call today? |
As part of openwallet-foundation#1734, I found that the Revocation Notification V2 code failed to properly run due to the fact that the V1 code was deleting the DB objects before V2 could get to it. @dbluhm and I decided that adding an option to deny specific plugins from loading was one of the better solutions to the problem. Before the plugin has been initialized, any plugins listed within `--deny-plugins` will be unregistered to prevent them from initializing and potentially interferring with other plugins that have conflicts. Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
As part of openwallet-foundation#1734, I found that the Revocation Notification V2 code failed to properly run due to the fact that the V1 code was deleting the DB objects before V2 could get to it. @dbluhm and I decided that adding an option to deny specific plugins from loading was one of the better solutions to the problem. Before the plugin has been initialized, any plugins listed within `--deny-plugins` will be unregistered to prevent them from initializing and potentially interferring with other plugins that have conflicts. Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
So, just to clarify, the V1 revocation notification will run by default (and the V2 revocation notification won't get sent) unless the V1 notification protocol is disabled using this PR? #1737 |
That is correct. The reason for this is that revocation notification loads in first (due to the definition.py), and they both work off the same DB entries from revocation notifications. V1 deletes the DB entry before V2 can get to it, and thus, is essentially disabled |
Codecov Report
@@ Coverage Diff @@
## main #1734 +/- ##
==========================================
+ Coverage 95.19% 95.21% +0.01%
==========================================
Files 525 530 +5
Lines 33091 33235 +144
==========================================
+ Hits 31502 31644 +142
- Misses 1589 1591 +2 |
Per the discussion in this PR: #1737
I vote we add these options to the revocation v2 PR (#1734) This solves the immediate problem where revocation notification V1 and V2 don't work together:
This is consistent with how we've done this kind of thing in other endpoints. |
I'm not exactly happy with adding another CLI argument for this, but I don't have any real problems with it either. If agreed upon that these changes are to be made then I'll get started on making these changes. |
We should come up with a rule that if you add a new CLI argument you have to remove one as well :-D |
Would a GUI generator be possible to allow for interactively creating a the config? Or would we just need a config for that? :-) |
We have the capability to use config files ( ... and I don't think it's a real issue to have lots and lots of CLI parameters, as long as they all have reasonable defaults |
Discussed in the aca-pug call today and the consensus was to:
(Eventually we expect the notification version to be determined through feature discovery) @frostyfrog |
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.
See comment re adding a version parameter to the endpoint
Sounds good! I'll get those changes made. |
…notification-v2 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Based upon discussion in openwallet-foundation#1734, a new required parameter for revocations has been added to the revocation API Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
…notification-v2 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
Just as a remark, I tested this and it is not backwards compatible. I was using the config from aca-py 0.7.3, meaning: notify-revocation: true
monitor-revocation-notification: true and also in the rest api After upgrading to the latest revision from main revocation notifications were not sent any more until I set a version either v1 or v2 in the rest api. Meaning for anyone who is not aware of this revocation notifications will stop working. |
I wonder why that's happening. My last commit was supposed to set a default value if nothing was provided in the API call. What you're suggesting, however, is that the |
Could be setting the attribute to an empty string vs null value? |
I'll see if I can take a look at that. I feel that we should not be getting an empty string when the key does not exist. |
If I use the following payload the issuer will not send the revocation notification: {
"connection_id": "3a0060a9-2774-42a5-b5bd-80bb65f8538e",
"cred_rev_id": "20",
"notify": true,
"publish": true,
"rev_reg_id": "F6dB7dMVHUQSC64qemnBi7:4:F6dB7dMVHUQSC64qemnBi7:3:CL:571:phil-test-83-multi:CL_ACCUM:65514d6b-9c4a-473b-869a-c22b9fc21b24"
} Together with config flags: notify-revocation: true
monitor-revocation-notification: true If I use the same payload but add the |
I think you can say |
This PR implements Revocation Notification V2, as described in hyperledger/aries-rfcs#721. At this time, V1 takes precedence over V2 when a revocation occurs and V2 never gets fired off. After talking with @dbluhm, I plan to implement a config option to disable/exclude the loading of specific plugins so that, in terms of configuration, one can disable V1 notifications to allow V2 notifications to be triggered. Since Indy-Anoncreds are currently the only standard to be implemented at this time, there are a few hard coded values pointing to "indy-anoncreds" until such a time where a second credential revocation format needs to be implemented.