[MS-894] Add a custom CoSync deserializer that accounts for past versions of EnrolmentRecordCreationEvent#1116
Conversation
|
@BurningAXE is this manadatory ? do we have any project that uses cosync and SID < 2023.3.3 ? |
The question is do we have any project that has saved CoSync enrolments from SID < 2023.3.3? And the answer is unfortunately yes! |
…ions of EnrolmentRecordCreationEvent
443e1d9 to
3c5a15f
Compare
| val moduleId = try { | ||
| ctxt.readTreeAsValue(payload["moduleId"], TokenizableString::class.java) | ||
| } catch (_: Exception) { | ||
| TokenizableString.Raw(payload["moduleId"].asText()) |
There was a problem hiding this comment.
I assume it would not be possible to see if the value is tokenized just without the appropriate meta-data, right?
There was a problem hiding this comment.
Unfortunately, no. We have the same problem for the "middle case" where we serilized TokenizableString without explicitly specifying the class (Raw or Tokenized). What we do downstream is try to decrypt Raw values to check whether they are actually encrypted or not. For Tokenized we are sure they are actually what they say they are.
|



When using CoSync as data source SID fails to parse enrolments made with version < 2023.3.3 (first version that introduces tokenization). This is because in older versions
moduleIdandattendantIdinEnrolmentRecordCreationPayloadwere plainStrings instead ofTokenizableStrings.