I have an application divided into frontend and backend services. The frontend has public acces, while the backend is confidential. When I'm trying to authorize to get response from my backend I'm getting the following error:
cache-control: no-cache, no-store, max-age=0, must-revalidate
content-length: 0
date: Fri, 06 Dec 2019 09:16:16 GMT
expires: 0
pragma: no-cache
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
www-authenticate: Bearer realm="my_realm", error="invalid_token", error_description="Didn't
find publicKey for specified kid", Bearer realm="my_realm", error="invalid_token",
error_description="Didn't find publicKey for specified kid"
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block
Here's my configuration for both services:
Backend:
keycloak:
auth-server-url: http://localhost:8081/auth
realm: my_realm
resource: your-client-id
ssl-required: external
credentials.secret: your-client-secret
Frontend:
sso: {
url: 'http://localhost:8081/auth',
realm: 'my_realm',
clientId: 'your-frontend-client'
}
I'm using keycloak 7.0.1 along with Spring Security.
Am I missing any additional config for allowing authorization from public client?