-
Notifications
You must be signed in to change notification settings - Fork 47
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
Clarification on endpoints style for issuance , verification and derivation #343
Comments
The group discussed this on the 2023-08-22 telecon: @jandrieu noted that the question might be because we don't specify how a Holder Coordinator might get a VC from an Issuer Coordinator. @PatStLouis noted that exchange of credential is done through an exchange... define a workflow, exchange is created for purpose of getting VC from Issuer to Holder. @dlongley noted that we just wrote down Workflows -- how a Holder Coordinator gets a VC through Issuer Coordinator, which is through an exchange. The @jandrieu noted on previous call about resulting functionality of an exchange happens through other API endpoints, result was "yes" -- what is separate underlying API that issuance is going to use? Ambiguity about "your credentials" -- "Issuer Coordinator" would talk to Issuer Service to get VCs for Holder... but Holder isn't talking to service to get their VCs. Still should go to endpoint gated by the Holder. @PatStLouis In examples provided above, Why not use Regarding the The group requested feedback from @jruizaranguren on the above to determine what some actionable next steps could be taken next. |
Thanks for your reply, and I apologize for the long time to answer. I think there are two sources of confussion on my side. The first one is related to the API definition style. It is not clear for me whether a RESTish or RPCish style is proposed due to the mix of verbs and nouns in resource definitions. It is a minor thing, but It could be nice to explicitly describe or link the API style guide.
That can be the case. Instead of reconstructing the use cases from the API, it would be great to document some sort of specification, where participants (controllers, etc.) are defined along with usage examples. A bunch of examples would probably help in understanding the proposed abstractions (such as |
The group discussed this on the call on 2023-11-07 and agreed that things you asked for need to be documented more clearly in the specification. @dlongley agreed that we need to fix the things you identify in the specification and having a test suite for exchanges would help as well. @jandrieu noted that @eschuh and he have made a pass on endpoint issues -- spreadsheet that identifies most of the endpoints/issues -- one reference for everything being documented here and then get it into the OAS specifications. @PatStLouis noted that REST APIs and verbs/nouns -- is this supposed to be a REST API? @BigBlueHat noted that he can go through API and "make it more RESTful" - we should have an intention as a group. @dlongley noted that we had an API style guide that the group came to an agreement on and designed the API after. @msporny noted that we did follow an industry standard pattern, can't remember what that was at the moment, but @PatStLouis noted that we should link to that design pattern. |
Style guide related issue: #35 |
FWIW, actually making any API "more RESTful" really has nothing to do with what human readable stuff goes in the URL. To truly be "RESTful", the key missing thing in the vast majority of any API (including this one--for better or worse) is hypermedia: the use of links provided in the body of the message (vs. URL construction). Essentially, if we were to obfuscate all the URLs in some way, would client code still work / "find it's way around" starting from one (or more) message body? If not, it's not a "RESTful" API...no matter how pedantic the API designers were about using nouns in the URL design. So, quoting from the Fielding quote quoted on https://restfulapi.net/resource-naming/ plus some added emphasis:
Switching the VC API to be a hypermedia API is likely a bridge too far at this point in history, but somewhere in the |
Thank you @msporny for the answer. Regarding API style guides, there are a bunch of them. I find https://apistylebook.com/ a great place for inspiration and smart copy-paste 😄 . For instance, the zalando API style guide is a superb example covering most typical needs. @BigBlueHat, you can find in zalando API style guide strong arguments against pursuing the REST architectural style (i.e. R. Fielding original ideas), in the line you are pointing out. I find those arguments pretty reasonable, and up-front contract is great for most APIs. It is unlikely that we are about to design a new internet 😄 I introduced the problem of naming just because the verb/noun mix confused me. That can be solved simply with documentation, explaining the API profile (digital capabilities / use cases with participants), and the rationale behind. That said, like opinions in github are free (for the time being), I would vote for a naming convention where names are used for http resources, with the simplest flat structure that you can find, and those can represent assets or processes ( |
The group discussed this on the 2024-03-12 call: The PR should, in a section called "Design Guidelines", specify that the restfulapi.net guidelines were used as a basis for the specification, specifically the use of the 'controller' style from the guidelines was used for endpoints. JSON Schema is used to define the acceptable inputs to the APIs. |
I apologize if this topic has already been covered or if there are any misunderstandings, but I'm finding it a bit challenging to grasp the underlying reasoning behind the specifications for
/credentials/issue
,/presentations/verify
and/credentials/derive
:/credentials/issue
is designed as a resource for facilitating the creation of verifiable credentials (new resources) by the issuer coordinator.presentations/verify
and/credentials/verify
are resources intended for validating presentations or credentials, also handled by a coordinator./credentials/derive
endpoint is invoked by the holder coordination to effectively generate a new credential based on an existing one.I assume the objective is to delegate the complete issuance and verification processes to the coordinators, hence this API appears to mainly address the cryptographic aspects of these tasks.
Nevertheless, as a coordinator, I would anticipate having primary support for independent
issuance
andverification
steps or processes, rather than being coupled with other resources. This approach could enable scenarios like the following:Furthermore, considering the 202 scenarios for asynchronous generation and the PRG pattern, similar principles can be applied to
/verifications
, which might necessitate a means of traceability.Turning to the matter of /
credentials/derive
, I'm curious about the rationale for introducing a distinct endpoint instead of consolidating this functionality within/credentials/issue
, thereby accommodating different types of requests. This also brings up the aforementioned points if derivations are fundamental concepts warranting aPOST /derivations
resource.The text was updated successfully, but these errors were encountered: