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

Anoncreds post api object handling #3411

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

jamshale
Copy link
Contributor

The required values in the anoncreds POST object need to declare them as required explicitly to get the desired response.

{
  "json": {
    "schema": {
      "issuerId": [
        "Missing data for required field."
      ]
    }
  }
}

Signed-off-by: jamshale <jamiehalebc@gmail.com>
@jamshale jamshale linked an issue Dec 19, 2024 that may be closed by this pull request
Signed-off-by: jamshale <jamiehalebc@gmail.com>
@jamshale jamshale requested review from ianco and esune December 20, 2024 17:49
@jamshale
Copy link
Contributor Author

This ones pretty small but would be good to get in.

@swcurran
Copy link
Contributor

The restart test failed. @jamshale @ianco -- are you looking at it?

@ianco
Copy link
Contributor

ianco commented Dec 20, 2024

The restart test failed. @jamshale @ianco -- are you looking at it?

I'll take a look

@ianco
Copy link
Contributor

ianco commented Dec 20, 2024

I get this error running on my local (askar issuer to anoncreds holder):

alice-1           | 2024-12-20 18:13:15,476 acapy_agent.core.conductor ERROR DON'T shutdown on AnonCredsResolutionError No resolver available for identifier JmrNFeu93SVLXD511k26An:2:minimal-f9cd7740562fb7b3:1.0
alice-1           | 2024-12-20 18:13:15,476 acapy_agent.core.dispatcher ERROR Handler error: Dispatcher.handle_v1_message
alice-1           | Traceback (most recent call last):
alice-1           |   File "/usr/local/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
alice-1           |     result = coro.send(None)
alice-1           |              ^^^^^^^^^^^^^^^
alice-1           |   File "/usr/src/app/acapy_agent/core/dispatcher.py", line 258, in handle_v1_message
alice-1           |     await handler(context, responder)
alice-1           |   File "/usr/src/app/acapy_agent/protocols/present_proof/v2_0/handlers/pres_handler.py", line 53, in handle
alice-1           |     pres_ex_record = await pres_manager.receive_pres(
alice-1           |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
alice-1           |   File "/usr/src/app/acapy_agent/protocols/present_proof/v2_0/manager.py", line 354, in receive_pres
alice-1           |     receive_pres_return = await pres_format.handler(
alice-1           |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
alice-1           |   File "/usr/src/app/acapy_agent/protocols/present_proof/v2_0/formats/anoncreds/handler.py", line 332, in receive_pres
alice-1           |     await _check_proof_vs_proposal()
alice-1           |   File "/usr/src/app/acapy_agent/protocols/present_proof/v2_0/formats/anoncreds/handler.py", line 203, in _check_proof_vs_proposal
alice-1           |     schema = await registry.get_schema(self.profile, schema_id)
alice-1           |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
alice-1           |   File "/usr/src/app/acapy_agent/anoncreds/registry.py", line 80, in get_schema
alice-1           |     resolver = await self._resolver_for_identifier(schema_id)
alice-1           |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
alice-1           |   File "/usr/src/app/acapy_agent/anoncreds/registry.py", line 52, in _resolver_for_identifier
alice-1           |     raise AnonCredsResolutionError(
alice-1           | acapy_agent.anoncreds.base.AnonCredsResolutionError: No resolver available for identifier JmrNFeu93SVLXD511k26An:2:minimal-f9cd7740562fb7b3:1.0

@jamshale
Copy link
Contributor Author

I get this error running on my local:

Has something to do with the anoncreds issuance PR that got merged just before this... Not sure why yet.

@jamshale
Copy link
Contributor Author

Ahh. I didn't think the holder hit this code. Not sure why it wasn't caught by the other tests.

I think I know how to fix it.

@jamshale
Copy link
Contributor Author

Hmm. It's not what I thought originally. The askar issuer (alice) is sending an indy presentation request but getting back a presentation in anoncreds format from bob_anoncreds. It should be sending it in indy format. Not sure where it's happening though. This was tested in the anoncreds_issuance_and_revocation scenario as well.

@jamshale jamshale merged commit fe87db7 into openwallet-foundation:main Dec 20, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/anoncreds/schema param handling
3 participants