Hi, is this format correct for readonlyrest yml file, I am getting error 401, forbidden operation not allowed, also please suggest a way to access elasticsearch api using jwt token in postman
I have
{
“email”: “user1”,
“role”: “viewer”,
“exp”: 1616239022
}
this as payload to my json web token,
Is the format for readonlyrest correct for this particular payload?
What should I give in as “secret” in https://jwt.io/ website’s token generator? Is it “signature_key” value mentioned in above yaml or its base64 encoded value?
What can I give as bearer token while requesting api response from elasticsearch? Is it JWT token directly or its base64 encoded value?
You should remove the whole jwt user2 block as it does not make sense to have it. The configuration is clearly the same as the jwt user1 above it.
The user1 and user2 should not be defined in two distinct jwt connectors. Instead, the usernames should be extracted by ReadonlyREST from the “email” claim in the JWT object as soon as it is decyphered and the signature verified.