I am working on an experiment on localhost with JWT Authentication.
I set the ‘jwks_endpoint’ and ‘jwks_username_field’ as mentioned in the docs. (The picture below shows my current config)
I can retrieve tokens from the JWKS endpoint using Postman. I tried to use the token to authenticate the Data API request but apparently, the SingleStore instance does not recognize my ‘jwks_username_field’ config and uses the username in the ‘sub’ field of my JWT. (The picture below shows my Postman attempt)
My token body is as follows.
{
"realmName": "cloudIdentityRealm",
"preferred_username": "jwt_user",
"acr": "urn:ibm:security:policy:id:1",
"userType": "regular",
"uniqueSecurityName": "643002D3K3",
"auth_time": 1700619543,
"jti": "zGJ0TkumCrUzTALgUN65wyHA4yYMjI",
"at_hash": "3Bxelkc9b9Tc33ACX5sw9g",
"amr": [
"password"
],
"ext": {
"tenantId": "singlestore.verify.ibm.com"
},
"iss": "https://singlestore.verify.ibm.com/oidc/endpoint/default",
"aud": "c30ae195-5065-4bb6-a915-51a9b2a034e5",
"sub": "643002D3K3",
"iat": 1700619544,
"exp": 1700626744
}
I am sure that my JWT token is correctly validated against JWKS endpoint (using online verify tools JSON Web Token Verifier (davetonge.co.uk). Please tell me what I am doing wrong?
Thank you in advance.