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

feat(prism-agent): implement AnonCreds issuance flow #693

Merged
merged 156 commits into from
Oct 9, 2023

Conversation

FabioPinheiro
Copy link
Contributor

Overview

feat: new IssuedCredentialFormat for anoncred

Pat Losoponkul and others added 30 commits July 26, 2023 11:12
* fix: use uuid for WalletId

* fix: use uuid postgres col type
* [wip] shared trasactorlayer

* [wip] shared trasactorlayer

* [wip] shared trasactorlayer

* experiment with wallet-aware transactor

* fix compilation error

* chore: use name transact

* chore: minor rename

* set local variable and move wallet implicits to shared

* use doobie.free.connection.createStatement for set statement

* feat: introduce db app user

* feat: add policy to all tables

* revert sql and rely on RLS

* fix: fix query expecting wallet_id column

* move transactor layer to shared

* fix: fix test layers

* pr cleanup

* unify transactor layer for all bbs

* create db app user from script

* lint sql files
* fix: dynamic seed instead of global seed for walletapi

* test: add WalletManagementService tests

* [wip] dummy test for WalletSecretStorage

* test: implement WalletSecretStorage spec

* test: make test db aware of app user and migration user

* [wip]: multitenancy spec for managed DID

* test: add multitenant managed DID index test
Signed-off-by: Shailesh Patil <[email protected]>
Signed-off-by: Shailesh Patil <[email protected]>
Signed-off-by: Shailesh Patil <[email protected]>
@bvoiturier bvoiturier changed the title [WIP] feat: new IssuedCredentialFormat for anoncred feat(prism-agent): implement AnonCreds issuance flow Oct 4, 2023
@bvoiturier bvoiturier requested review from shotexa and removed request for BS-IO and a user October 5, 2023 14:40
Comment on lines +64 to +66
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all these formats similar?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent is similar, and the holder uses it to specify characteristics of the VC during the propose phase of the issue flow. Each format is specific to a standardisation body (DIF, W3C, HL). By the way, we have not implemented this phase yet.

@@ -40,15 +40,19 @@ class UtilsCredentialSpec extends ZSuite {
.build(
fromDID = DidId("did:prism:test123from"),
toDID = DidId("did:prism:test123to"),
credentials = Map(nameCredentialType -> credential.asJson.noSpaces.getBytes()),
credentials =
Seq(IssueCredentialIssuedFormat.Unsupported(nameCredentialType) -> credential.asJson.noSpaces.getBytes()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible improvement: the code has many .asJson.noSpaces.getBytes() entries.
It might be good to implement the general decoder/encoder for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have (this is a test for that if I'm not mistaken)

| "to" : "did:prism:test123",
| "from" : "did:prism:test123"
|}""".stripMargin).getOrElse(Json.Null)
// FIXME !!! THIS WILL FAIL!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to create a tech-debt for every FIXME entry?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a tech debt ticket for it that was created some time ago. IMO, someone should go through all of those FIXME and TODO found in the codebase, then sort out/clean up and create specific tickets when deemed necessary.

credential_manifest: CredentialManifestObject,
)

type CredentialManifestObject = Any
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to define the set of possible types here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see what @FabioPinheiro thinks about this, but do we spend time on this, knowing that we do not support the propose phase for now?

Copy link
Member

@yshyn-iohk yshyn-iohk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@yshyn-iohk
Copy link
Member

DCO has failed. Probably, someone needs to squash everything into a single commit or override all commits without DCO.
:(

@bvoiturier bvoiturier merged commit 9165a6f into main Oct 9, 2023
9 checks passed
@bvoiturier bvoiturier deleted the feat/new-anoncred-endpoints branch October 9, 2023 13:36
atala-dev added a commit that referenced this pull request Oct 14, 2023
# [1.17.0](prism-agent-v1.16.4...prism-agent-v1.17.0) (2023-10-14)

### Bug Fixes

* change repository and name for rest api clients ([#745](#745)) ([0f84e28](0f84e28))
* improve performance for background jobs in multitenancy mode ([#749](#749)) ([17def3f](17def3f))
* **prism-agent:** agent should read DIDComm port from config ([#757](#757)) ([cda908c](cda908c))
* **prism-agent:** configure APISIX to return CORS headers from Prism Agent endpoints ([#746](#746)) ([a579aa9](a579aa9))
* **prism-agent:** fix docker env variables interpolation issue ([#751](#751)) ([110eb2d](110eb2d))
* **prism-agent:** return relevant errors on offer creation ([#754](#754)) ([d36533f](d36533f))
* prohibit tenants to use equal or revoked api keys ([#742](#742)) ([4b10c3a](4b10c3a))
* upgrade vault and quill versions ([#739](#739)) ([c140857](c140857))

### Features

* **prism-agent:** check issuing DID validity when creating a VC offer + return 'metaRetries' ([#740](#740)) ([f2e2fd3](f2e2fd3))
* **prism-agent:** implement AnonCreds issuance flow ([#693](#693)) ([9165a6f](9165a6f))

Signed-off-by: Anton Baliasnikov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants