In the HLRC code response parsers using object parsers need to support handeling of unknown field. Otherwise a released HLRC may fail parsing responses from ES nodes released after it. All HLRC areas need to be checked.
After a quick check the follow hlrc areas use ConstructingObjectParser with ignoreUnknownFields flag set to false:
The following use old school parsing and will (likely) fail with unknown fields. FWIW, some of these are just a guess as to how bad they will behave.
Disclaimer: It is possible that other old school parsers will quite easily bomb out given unknown fields. This list is likely not exhaustive depending on where the json fields are added.
Maybe we need make an automated check for this? (maybe forbidden apis that checks response classes in hlrc module only)
In the HLRC code response parsers using object parsers need to support handeling of unknown field. Otherwise a released HLRC may fail parsing responses from ES nodes released after it. All HLRC areas need to be checked.
After a quick check the follow hlrc areas use
ConstructingObjectParserwithignoreUnknownFieldsflag set tofalse:security.getUserPrivilegeswont fix re [HLRC] Ensure that response parsers support unknown fields #36938 (comment)security.clearRealmCachewont fix re [HLRC] Ensure that response parsers support unknown fields #36938 (comment)security.clearRolesCachewont fix re [HLRC] Ensure that response parsers support unknown fields #36938 (comment)security.getRoleswont fix re [HLRC] Ensure that response parsers support unknown fields #36938 (comment)The following use old school parsing and will (likely) fail with unknown fields. FWIW, some of these are just a guess as to how bad they will behave.
Disclaimer: It is possible that other old school parsers will quite easily bomb out given unknown fields. This list is likely not exhaustive depending on where the json fields are added.
Maybe we need make an automated check for this? (maybe forbidden apis that checks response classes in hlrc module only)