-
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
Document Instance Configuration in the VC API #267
Comments
A rough outline of the issuing API: Create an issuer instance
POST an issuer configuration to create an issuer instance:
The issuer server must auto-generate an Result:
Update an issuer instance
POST an issuer configuration to update an issuer instance. Same as above but the Get an issuer instance config
GET an issuer configuration. Returns the config mentioned above. Add a context to an issuer instance
POST a JSON-LD context document to add it to the set of contexts that the issuer instance will securely load when issuing VCs. The issuer instance will only load standard contexts (VC data model context v1, cryptosuite contexts) by default; this endpoint allows it to securely load any other context it is configured to load.
Update a context in an issuer instance
POST a JSON-LD context document to update one of the contexts that the issuer instance will securely load when issuing VCs.
Get a context from an issuer instance
GET a JSON-LD context stored with an issuer instance. Issue a VC from an issuer instance
POST the VC to issue. This is similar to existing API but without parameterized options. Change the status of a VC issued from an issuer instance
POST the new credential status for a VC. This is similar to existing API. |
A rough outline of the verifying API: Create a verifier instance
POST a verifier configuration to create a verifier instance:
The verifier server must auto-generate an Result:
Update a verifier instance
POST a verifier configuration to update a verifier instance. Same as above but the Get a verifier instance config
GET a verifier configuration. Returns the config mentioned above. Add a context to a verifier instance
POST a JSON-LD context document to add it to the set of contexts that the verifier instance will securely load when issuing VCs. The verifier instance will only load standard contexts (VC data model context v1, cryptosuite contexts) by default; this endpoint allows it to securely load any other context it is configured to load.
Update a context in a verifier instance
POST a JSON-LD context document to update one of the contexts that the verifier instance will securely load when verifying VCs.
Get a context from a verifier instance
GET a JSON-LD context stored with an issuer instance. Get a challenge from a verifier instance
POST an empty object to get a new challenge for use in a presentation. This feature should be made available to users of the API so that they do not need to securely create and maintain their own challenges. Result:
Verify a single VC via a verifier instance
POST the VC to verify. This is similar to existing API. Verify a VP via a verifier instance
POST the VP to verify. This should include a challenge created via the challenge API to prevent replay attacks. |
The above APIs are expected to be fully compatible with both (concurrently or separately) zcaps and oauth2. The zcaps model involves setting a root controller via the configuration of each instance. The root zcap is The oauth2 model involves setting an authz server for the issuer / verifier instance to use to perform authz checks. Scopes should be based on the API endpoints and, ideally, access tokens would be limited to one per scope, but this is not the usual oauth2 model (which tends to have more ambient authority w/single access tokens containing all accessible scopes). Oauth2 credentials and / or access tokens could be set in the instance configuration to allow instances themselves to gain access to keys / storage as needed. Implementations may decide to provide access to keys / storage for particular instances however they like, the above just outlines that it's also possible to delegate these things out to particular instances. This design allows issuer instances, for example, to be given limited or fit-for-purpose authority and for blast damage to be limited. The way the capabilities are given to instances above (or through oauth2) may not be a target for standardization at this time depending on implementer interest. |
TrustBloc supports a similar concept of registering 'profiles' for issuer/verifier VC API implementation, but it is very rudimentary. And the {profileID} is included in the API path. I'm not 100% sure the two are aligned, just drawing out some similarities. |
@OR13, added |
We may want a separate set of endpoints for setting / getting oauth2 client credentials / access tokens for the instance to access keys / storage (similar to how contexts are handled above) rather than storing them in the configuration object to allow client applications to read the config (without security issues). The zcap approach doesn't have the same problem as they require proof of possession to invoke. We may also just want to express "client only" configuration information in a separate endpoint and just grant client apps the ability to read that. |
The following updates need to be made to the spec:
|
A note on my last comment:
An OAuth2 Authorization Server Issuer Base or Config (w/well-known path) URL can be provided in the instance config to enable OAuth2 support for using the APIs exposed off of that particular instance. |
I suggest closing this issue, the APIs seem to have ossified beyond the value of a greenfield exercise. |
The group discussed this in 2023-03-21: @dlongley noted that the endpoints that we have today are expected to hang off of instances and those instances have a configuration associated with them that has information/state associated with them to do their jobs. Not all that information can be provided as parameters from client, so concept of instances should be explained in spec, here are APIs that you can use, then we can point to text that was noted in this issue. We are not looking at changing API significantly, we already depend on these instances, but make a bad job of making that clear to people. This is about clarifying that APIs hang off of instances that have been configured so the endpoints can achieve certain use cases. Not all parameters can be passed by a client. Raise a PR that:
|
@dlongley I get the impression from your comments that it might be easier to see your perspective if we could see what you wish the VC API Issuer endpoints looked like, if we were to build them from scratch, focused only on your "business use cases" and not at all focused on "demonstrating interop".
Would you be willing to sketch out in comments what you would build if we could start over here?
Addressing issues like:
We might be able to leap frog the current APIs with a clearer picture of your complete vision, and I am concerned we won't be able to make good progress trying incrementally adjust from where we are today.
The text was updated successfully, but these errors were encountered: