-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HLRC] Ensure that response parsers support unknown fields #36938
Comments
Pinging @elastic/es-core-features |
Ive gone thru all of our APIs and updated the list above with the full list of parsers (or nested parsers) that sets Please note I have added a bit of I dont know how we could check that we are using the |
DeleteWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. Relates elastic#36938
DeleteWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. Relates #36938
DeleteWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. Relates #36938
PutWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. Relates elastic#36938
ExecuteWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. It also creates a new client side test for the response. Relates elastic#36938
PutWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. Relates #36938
The EmptyResponse is essentially the same as returning a boolean, which is done in other places. This commit deprecates all the existing EmptyResponse methods and creates new boolean methods that have method params reordered so they can exist with the deprecated methods. A followup PR in master will remove the existing deprecated methods, fix the parameter ordering and deprecate the incorrectly ordered parameter methods. Relates elastic#36938
This commit deprecates the few methods that had their parameters reordered to facilitate the move from EmptyResponse to boolean. This commit also readds the boolean based methods with the proper signatures. Relates elastic#37540 Relates elastic#36938
PutWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. Relates #36938
The subparser in get users allows for unknown fields. This commit sets the value to true for the parser and modifies the test such that it accurately tests it. Relates elastic#36938
ExecuteWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. It also creates a new client side test for the response. Relates #36938
ExecuteWatchResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it does now allow unknown fields. It also creates a new client side test for the response. Relates #36938
The subparser in verify repository allows for unknown fields. This commit sets the value to true for the parser and modifies the test such that it accurately tests it. Relates elastic#36938
We already support unknown objects in the list of pipelines, this changes the `PipelineConfiguration` to support fields other than just `id` and `config`. Relates to elastic#36938
IndexLifecycleExplainResponse did not allow unknown fields. This commit fixes the test and ConstructingObjectParser such that it allows unknown fields. Relates elastic#36938 Backport of elastic#38054
The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates elastic#36938
We already support unknown objects in the list of pipelines, this changes the `PipelineConfiguration` to support fields other than just `id` and `config`. Relates to #36938
…38352) We already support unknown objects in the list of pipelines, this changes the `PipelineConfiguration` to support fields other than just `id` and `config`. Relates to elastic#36938
This commit ensures that the parts of rollup caps that can allow unknown fields will allow them. It also modifies the test such that we can use the features we need for disallowing fields in spots where they would not be allowed. Relates #36938
This commit ensures that the parts of rollup caps that can allow unknown fields will allow them. It also modifies the test such that we can use the features we need for disallowing fields in spots where they would not be allowed. Relates elastic#36938 Backport of elastic#38339
Updated IndexTemplateMetaData to use ObjectParser. The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates #36938 Co-authored-by: Michael Basnight <[email protected]> Co-authored-by: Martijn van Groningen <[email protected]>
Updated IndexTemplateMetaData to use ObjectParser. The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates elastic#36938 Co-authored-by: Michael Basnight <[email protected]> Co-authored-by: Martijn van Groningen <[email protected]>
Updated IndexTemplateMetaData to use ObjectParser. The IndexTemplateMetaData class used old parsing logic and was not resiliant to new fields. This commit updates it to use the ConstructingObjectParser and allow unknown fields. Relates #36938 Co-authored-by: Michael Basnight <[email protected]> Co-authored-by: Martijn van Groningen <[email protected]>
I wonder if we can close this. Im leaning toward yes. @martijnvg what do you think? |
7.10 HLRC fails to parse an |
Closing this as we've removed the high level rest client in favor of the Java client. |
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
withignoreUnknownFields
flag 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)
The text was updated successfully, but these errors were encountered: