Open RomainLofaso opened 2 years ago
FWIW Here's why JWT were not used in SWAN.
Thank you. If we quote the OWID document:
JSON Web Tokens
OWID was inspired by JWT and adopted some similar conventions and names such as payload and signature.
JWT were considered as a basis for OWIDs but do not meet all the design goals. Specifically, JWT provides flexibility concerning a choice of algorithm and uses JSON for data storage. JSON as a data structure is less efficient than binary data structures. Using a single algorithm reduces implementation complexity.
Agree on the efficiency of a binary format compared to JWT. However, the implementation of JWT can be less complex because it is a standard: most of the programming languages have a library that encapsulates the complexity of JWT for you and you may have already used it (i.e you are already at the top of the learning curve).
We consider JWT because it addresses the signature, the encryption, and the communications in a standard way. However, some blocking points are:
For now, the design solution provides "source" metadata instead of OWID or JWT. The pros are:
The cons are:
We should also consider the benefits and draw backs of PEM (and the like) for certificates and keys where the data is similarly immutable. How important is human inspection without a library to perform the transformation versus reducing bytes?
Like certificates a defined and prescriptive format helps eliminate defects and interoperability issues. It is either bit level correct, or not. Testing is simple and performed against a defined bit level format.
Overall, as soon as there are more OR branches then the complexity increases. Therefore as a policy do we value flexibility of implementation in the future over reducing complexity for the majority of implementers today?
I like the way you put it, James:
How important is human inspection without a library to perform the transformation versus reducing bytes? I think this is a key question. Maybe reducing bytes while providing online tools to inspect data is a good happy middle?
However, I'm not sure to follow what you refer to when saying:
Overall, as soon as there are more OR branches then the complexity increases I understand the debate is around flexibility, but I'm not sure exactly what we are comparing (sorry 😊) Is it about the algorithm used by JWT? Can we not propose to use JWT, but forcing the encryption scheme that is supported?
As for the general discussion on a real "envelope" that includes data and signature, I think it's worth it to challenge a solution (JWT, OWID or other), where all data is present in the payload that is signed. After more thinking, I believe the only change that it would require is:
I think reducing the general "weight" of the solution is a topic on its own (where timestamp is part of the question, but also using short names if we use JSON, for example). WDYT about creating a dedicated issue for it?
Regarding my more "OR" branches comment. "You can have any colour you want as long as its black" - Henry Ford. The point being that the fewer options there are the easier it is to understand. It's a general principle where I think the project should be seeking to focus on a tight and defined deployed that reduces risk of mistakes or divergence. This is important given the industry has a lot to deal with and isn't historically great at all doing the same thing at once. Therefore this is a principle for the project first and foremost. I don't think we've set out those principles yet.
I'm still reading into the work here. I'd need to understand the wider set of different IDs, where they come from, and their relationship with the Model Terms.
Thanks, I get the point. I agree there should be a clear project direction if we target high flexibility or, to the opposite, a single and strongly defined option. I'll let other people from the Prebid committees take position.
It is already a few weeks that we consider JWT. Here are a few arguments:
JWT can be used in different ways in our solutions. It can:
Each point must be challenged. Ideally, we would like to use JWT for all of them by simplicity and consistency but we are worried about twisting the solution and getting a not flexible architecture due to a tool (the cognitive bias of the Hammer Law).