-
Notifications
You must be signed in to change notification settings - Fork 80
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
SecurityRealm type in SecurityPutRoleMappingRequest results in a parsing error. #2344
Comments
This issue is stale because it has been open 90 days with no activity. Remove the |
@kristianthorsen I've moved this issue to the specification repo, where we manage the spec used to generate API functions for all Elasticsearch clients. Started taking a look, but this one is a bit hard to trace back for me. Hope to get to it more seriously soon. |
Hi @JoshMock Thank you very much. Let me know if you want me to have a look at it. |
🐛 Bug Report
The SecurityPutRoleMappingRequest type expects to specify a SecurityRealm in a SecurityFieldRule of a SecurityRule as:
However doing this results in the following parsing error:
Error: parsing_exception
Caused by:
x_content_parse_exception: [1:77] [role-mapping] failed to parse field [rules]
Root causes:
parsing_exception: [1:77] [role-mapping] failed to parse field [rules]
I have played a bit around with it and got the desired behaviour by changing the input to:
It seems that the type SecurityRealm type should either be changed to use "realm.name" or handle the behaviour before forwarding the body to the api.
To Reproduce
Attempt to call the elasticsearch client with .security.putRoleMapping() containing the input described above
Expected behavior
I expected the elasticsearch client to map the specified type to an accepted api request before forwarding the apicall.
Your Environment
@elastic/elasticsearch
version: "^8.7.0"The text was updated successfully, but these errors were encountered: