aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

Bug: No Error when writing Schema When Not in Endorser Role

Open wip-abramson opened this issue 4 years ago • 1 comments

When attempting to write a schema to the indy ledger without the appropriate role ACA-Py agent should throw error message.

Instead the schema appears to be created, including a schema_id added to list returned from "/schemas/created" endpoint.

As expected, schema is not added to ledger.

wip-abramson avatar Jul 09 '21 17:07 wip-abramson

@wip-abramson, thanks for reporting! It helped me to solve my problem :)

Maybe what I have seen makes this issue a little bit clear:

First scenario: The agent doesn't have a DID which its role is Endorser. The agent can call POST /schemas, and a schema_id will be returned. Then, if the agent calls GET /schemas/created, it can see the schema_id of the schema that it just created. Therefore, it seems that the schema actually will be stored somewhere. However, if the agent call GET /schema/{schema_id} it doesn't show anything like the schema_id doesn't exist at all.

Second scenario: The agent has a DID that its role is Endorser. Everything is the same as the first scenario except the GET /schema/{schema_id} that works properly.

feknall avatar Jul 09 '22 02:07 feknall

I haven't been able to re-produce this. I tried by creating and registering a did with endorser role and another with user or none role. When using the endorser I can create a schema. When using the did with user role I get a 400 error.

400: Ledger request error. Request failed: client request invalid: UnauthorizedClientRequest('ULXCbVUxWT6ydSzZPS7YQ4', 1702925602425814479, 'Rule for this action is: 1 TRUSTEE signature is required OR 1 STEWARD signature is required OR 1 ENDORSER signature is required\nFailed checks:\nConstraint: 1 TRUSTEE signature is required, Error: Not enough TRUSTEE signatures\nConstraint: 1 STEWARD signature is required, Error: Not enough STEWARD signatures\nConstraint: 1 ENDORSER signature is required, Error: Not enough ENDORSER signatures').

Either I need more description about the ledger and steps to reproduce or I'm going to close as won't fix.

jamshale avatar Dec 18 '23 18:12 jamshale

Going to close. If this gets reported again or the steps to reproduce are updated we can open it back up.

jamshale avatar Dec 18 '23 19:12 jamshale