I have a Keycloak server and my web application. When I try login into the app, always
Keycloak returns a 403 - Forbidden.
This is my configuration from the web project,
application.properties
server.port = 38080
keycloak.realm=FocusocKeycloak
keycloak.auth-server-url=http://localhost:8080/auth
keycloak.ssl-required=external
keycloak.resource=login-provider-web
keycloak.public-client=false
keycloak.credentials.secret=XXXX
keycloak.securityConstraints[0].authRoles[0] = USER
keycloak.securityConstraints[0].securityCollections[0].patterns[0] = /*
# Turn off the logs
logging.level.root=OFF
logging.level.org.springframework.boot=OFF
spring.main.banner-mode=OFF
keycloak.json
{
"realm": "FocusocKeycloak",
"auth-server-url": "http://127.0.0.1:8080/auth",
"ssl-required": "external",
"resource": "login-app",
"verify-token-audience": true,
"credentials": {
"secret": "XXXX"
},
"use-resource-role-mappings": true,
"confidential-port": 0
}
Here is the configuration of the Client,
[enter image description
here]<https://i.stack.imgur.com/fOWub.png>
And I only have registered the role ROLE_USER.
Anyone knows what it is happening?
P Please consider the environment before printing this e-mail.