Move contractId from EDR authcode back to a dedicated header field #3472
-
ProblemWithin EDC the When generating an JWT using a custom generator, the field This causes the contractId retrieval to crash as the given value is not equal to the expected contractId. Additionally, there is currently extra effort to get the contractId out of the token. The JWT needs to be unwrapped and decoded first to get the contractId out of it. We placed the information under an additional attributes section for our token, which differs from the EDC implementation and is therefore not a working solution. Proposed SolutionThe proposed solution would be to move the ExampleCurrent state when using a custom token generator: {
"jti": "",
"az_attr": {
"exp": 1692132629,
"dad": "lYovmpLe5.........",
"cid":"ZGR0ci1jeG1lbWJlcnMtY29udHJhY3Q=:ZGlnaXRhbC10d2luLXJlZ2lzdHJ5:MWYzYjJhMjktMTEzMi00MTg4LTlhOWQtMWY0MmY2MGU1Nzk"
},
"ext_attr": {
"": "",
"": "",
"": "",
"": ""
},
"sub": "",
"authorities": [
"",
""
],
"scope": [
"",
""
],
"client_id": "",
"cid": "ClientId for which the token was issued not contractId is expected here. EDC expects the contractId here",
"azp": "",
"grant_type": "",
"rev_sig": "",
"iat": "",
"exp": "",
"iss": "",
"zid": "",
"aud": [
"",
"",
""
]
}
Current EDC state: {
"exp": 1692132629,
"dad": "lYovmpLe5.........",
"cid":"ZGR0ci1jeG1lbWJlcnMtY29udHJhY3Q=:ZGlnaXRhbC10d2luLXJlZ2lzdHJ5:MWYzYjJhMjktMTEzMi00MTg4LTlhOWQtMWY0MmY2MGU1Nzk"
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
What about bringing the ContractId back in here?
|
Beta Was this translation helpful? Give feedback.
-
Since changing this would constitute a breaking change, it was discussed in the Technical Committers meeting on Sept 27, 2023, and here's the outcome:
So we'll create two issues, one to add the |
Beta Was this translation helpful? Give feedback.
Since changing this would constitute a breaking change, it was discussed in the Technical Committers meeting on Sept 27, 2023, and here's the outcome:
contractId
to the body (not the header), which will contain the contract IDcid
field will remain unchanged for a transitional period, for compatibility reasons, so both thecid
andcontractId
fields will contain the contract ID.cid
field starting with0.4.0
(Milestone 12)So we'll create two issues, one to add the
contractId
field, one to stop populating thecid
field.