Add /load or /parse endpoint that returns the full License message
Closed this issue · 1 comments
Is your feature request related to a problem? Please describe.
Client code for pywidevine serve functionality currently has no way of getting information like required security level, or other misc information contained within licenses.
Describe the solution you'd like
We should add a /load endpoint that parses a License Response SignedMessage and stores the parsed License message with the keys decrypted in the session.
From there /keys could load the parsed and decrypted License message from the session, and return the keys as JSON. Realistically we don't need /keys endpoint in this scenario as the code should handle the response from /load to get keys.
Describe alternatives you've considered
One alternative to all this is if the client needs that information it could just parse the license message it sent to /keys itself, and then read that information as it isn't protected.
Additional context
In a secure Cdm implementation, this misc information would be required. In fact, returning the keys in plain text at all, or even passing alone a decryption key would not be safe.
Closing this for now as I feel like this won't really be needed or wanted.
In a Python environment and scenario, there's no true way to be secure, so having these endpoints to return effectively unnecessary information is not worth the time and effort.
The information would only be useful in a secure Cdm environment (hardware-backed).