digital-credentials icon indicating copy to clipboard operation
digital-credentials copied to clipboard

Managing request format extensibility without sacrificing security

Open marcoscaceres opened this issue 1 year ago • 3 comments

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.

marcoscaceres avatar Apr 16 '24 17:04 marcoscaceres

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.

OR13 avatar Apr 16 '24 18:04 OR13

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?

RByers avatar Apr 17 '24 00:04 RByers

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

tplooker avatar Apr 17 '24 05:04 tplooker

Closing as too broad.

marcoscaceres avatar Feb 19 '25 23:02 marcoscaceres