-
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: add anoncreds interface #2276
feat: add anoncreds interface #2276
Conversation
And use it in Issue Credential v2 and Present Proof v2 Signed-off-by: Daniel Bluhm <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
FYI - @usingtechnology @dbluhm — thanks for the documentation! |
@usingtechnology — once you have looked at #2233, jump to this to get to a point we can merge it into a dev branch? We don’t have to worry right now about the tests passing. Don’t worry if you can’t do that today, and don’t let it interfere with your Friday. I’ll work on a meeting for (hopefully) Monday so we can go over this and plan next steps. |
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.
A couple of minor cleanup/tweaks, then let's get this into its own branch.
|
||
RUN mkdir aries_cloudagent && touch aries_cloudagent/__init__.py | ||
ADD aries_cloudagent/version.py aries_cloudagent/version.py | ||
ADD bin ./bin | ||
ADD README.md ./ | ||
ADD setup.py ./ | ||
ADD healthcheck.py ./ |
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.
can we remove this line? i think that's a file in the gist?
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.
Good catch; yes, this line needs to be removed
-r requirements.bbs.txt \ | ||
-r requirements.dev.txt \ | ||
-r requirements.anoncreds.txt | ||
RUN curl -sL https://github.com/Indicio-tech/anoncreds-rs/releases/download/v0.1.0-dev.9/library-linux-x86_64.tar.gz | tar -xz -C /usr/local/lib/python3.9/site-packages/anoncreds/ |
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.
can we replace these Indicio-tech urls with hyperledger labs? https://github.com/hyperledger/anoncreds-rs/releases/download/
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.
Yes, we can point to the link you provided -- we needed to use a build we made early on due to incompatibilities in glibc version but those issues have been fixed on the main releases. We updated the other dockerfiles; looks like we just missed a reference.
i think we can merge and i can do those little touch ups. |
And use it in Issue Credential v2 and Present Proof v2.
This PR supersedes #2191. As compared to #2191, this PR includes the required changes to use revocation with the generic anoncreds interface. Additionally, I've cleaned up this branch quite a bit. We had some unsuccessful detours (led by me lol) that resulted in both a messy history and changes in places that didn't need changes in the end.
Due to the need to clean up history, the contributions of my collaborators have unfortunately been obscured. Thank you @burdettadam and @cjhowland for all of your work on this!
As discussed with @swcurran, the intent of this PR is to have it merged to a feature branch (as in not merged to main) and for work to continue on the feature branch. I will create a number of issues reflecting things we hadn't gotten to yet or explicitly set aside for later as well as calling out discoveries that warrant further discussion.
Here is a brief summary of the changes that are included in this PR:
Changes
Added AnonCreds Registry and plugin interface
aries_cloudagent.anoncreds.registry
aries_cloudagent.anoncreds.base
aries_cloudagent.anoncreds.models
Added default registry for "legacy indy"
aries_cloudagent.anoncreds.default.legacy_indy
aries_cloudagent.ledger
to send transactions to indy networks.Added stubs for did:web and did:indy
legacy_indy
registry but are just stubbed out for now.Added AnonCreds Issuer, Verifier, and Holder interfaces
aries_cloudagent.anoncreds.{issuer,verifier,holder}
IndyIssuer
,IndyVerifier
andIndyHolder
interfaces that existed previously.Added AnonCreds Revocation interface
aries_cloudagent.anoncreds.revocation
IssuerRevRegRecord
,RevocationRegistry
, andIndyRevocation
.create_credential
method similar toAnonCredsIssuer.create_credential
. The issuer version supports credentials for cred defs that do not support revocation. The revocation version supports credentials for cred defs that do support revocation. The separation results in a cleaner implementation on both sides and cleaner split in responsibilities.Update Issue Credential v2 indy format handler to use AnonCreds interface
issue_credential
; previously, this method made calls directly to the ledger with Indy specific revocation details being handled at this layer. These details have been moved down the stack toAnonCredsRevocation.create_credential
.Update Present Proof v2 indy format handler to use AnonCreds interface
Update Revocation Manager
IssuerCredRevRecord
s and AnonCreds details.update_rev_reg_revoked_state
. I believe this can be translated to a more generic operation but I haven't had a chance to take a closer look at the revocation recovery pieces yet.Added AnonCredsTailsServer and updated BaseTailsServer
Added Admin endpoints for AnonCreds operations
/schemas
,/credential-definitions
,/revocation/*
, etc.Updated
BaseLedger
to behave as needed for the legacy indy registryIndyIssuer
to both create and publish anoncreds artifacts. The responsibility of the ledger has been reduced to only publishing.aries_cloudagent.ledger.error
)Updates to Dockerfiles, requirements, setup to add anoncreds dep
Notably missing changes
IssuerRevRegRecord
; we need a migration plan here, tooaries_cloudagent.ledger
; several should be moved to somewhere inanoncreds.default.indy
or similararies_cloudagent.indy
-- moving these components was omitted for a cleaner set of changes in this PR (not moving these reduced the number of lines changed by half)options
to the existing registry