WICG / digital-credentials

Digital Credentials, like driver's licenses
https://wicg.github.io/digital-credentials/
Other
82 stars 9 forks source link

Managing request format extensibility without sacrificing security #102

Open marcoscaceres opened 7 months ago

marcoscaceres commented 7 months ago

We need to figure out how to allow extensions to the .request object without sacrificing security and putting users at risk by passing any random data to wallets or an OS. This may be a technical solution or standards solution.

It would be good to enumerate the risks, challenges, requirements, and different possible solutions.

OR13 commented 7 months ago

By default in JSON, properties that are not understood are ignored (and preserved).

You could use JSON Schema to define an object structure where additional properties that are not recognized cause an error to be raised.

You could use normative text to say that for this specific object, any properties not defined in WebIDL, will cause an error to be raised, and name the error.

In case you want to remove a required property in the future, you might need to consider versioning the object structure.

RByers commented 7 months ago

As now stated in our explainer, I think it's important that we find a solution which doesn't block the rapidly evolving identity ecosystem (especially EUDI) on browser updates.

Maybe our protocol registry could point to JSON schema definitions which the browser could fetch and use to validate the request format?

tplooker commented 7 months ago

Just cross linking #100 which is one possible solution to this particular problem.