HI Experts,
I have configured and Integrated Elasticsearch and Keycloak via Xpack. Previously I used Searchguard Instead of Xpack. In that We used role level security and it was working fine till now. But in Xpack I dont know how to work like that. I will Share my Searchguard Queries
PUT _searchguard/api/roles/SGS_addressnumber
{
"index_permissions": [
{
"index_patterns": [
"indexname"
],
"dls": """{"terms" : { "attribute1.svalue" : [${user.roles}]}}"""
}
]
}
PUT _searchguard/api/rolesmapping/SGS_addressnumber
{
"backend_roles" : [
"addressnumber"
]
}
PUT _searchguard/api/rolesmapping/SGS_ALL_ACCESS
{
"backend_roles" : [
"admin",
"addressnumber"
]
}
We Post these queries and Add a addressnumber and addressnumber value like(1001) in client role in keycloak and it should fetch that exact value .
My question is "How to Post a query in xpack like this? and how to set keycloak client role as a condition to search?"