-
Notifications
You must be signed in to change notification settings - Fork 115
Description
🐛 Bug Report
The SecurityPutRoleMappingRequest type expects to specify a SecurityRealm in a SecurityFieldRule of a SecurityRule as:
{
field: {
realm: {
name: "RealmName"
}
}
}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:
{
field: {
"realm.name": "RealmName"
}
}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
- node version: ">=18.0.0"
@elastic/elasticsearchversion: "^8.7.0"- os: Linux