-
Notifications
You must be signed in to change notification settings - Fork 37
Description
I am trying to understand how the responses of Batch and Deferred Endpoints should work in case encryption is required
Batch Endpoint
Spec defines that a batch credential response is (besides c_nonce info) a list of single credential responses (credential_responses attribute).
What happens though if the individual credential requests (or even worse only some of them) require encrypted responses (credential_response_encryption included in the requests)?
One could assume that since batch credential response is an accumulator of multiple single credential responses it could be as follows
{
"credential_responses": [
"eyJraWQiOiI2.....retJxnnPyaeUzNbwPZZAiA", // JWE encrypted response of a request X that demands encrypted response
"OiI2NjBmNjQx.....ahTLjjEidA_V6g2u-ppGg", // JWE encrypted response of a request Y that demands encrypted response
{
"credential": "LUpixVCWJk0eOt4CXQe1NXK....WZwmhmn9OQp6YxX0a2L", // Non encrypted response of request Z that does not demand encryption
}
],
"c_nonce": "ERE%@^TGWYEYWEY",
"c_nonce_expires_in": 34
}
This seems thought rather complicated. Why need separate encryption per individual response instead of having the whole batch credential response encrypted.
In the case that the whole batch credential response should be encrypted, we are missing from batch credetial request a way to define the encryption information. Property credential_response_encryption can be used in batch credential requests as in single ones:
{
"credential_requests":[ ... ],
"credential_response_encryption": {
"jwk": { ... },
"alg": "ES256",
"enc": "A128GCM"
}
}
Deferred Endpoint
In Section 9.2 spec defines that
"Credential Response MUST be sent using the application/json media type"
This does not align with the case where the corresponding credential request defines that encrypted response is needed. In this case response media type should be application/jwt. Section 9.2 needs to be enriched to reflect how case of encrypted responses should be handled.