Authorization + Keycloak + Spring Boot

400 views
Skip to first unread message

chatura mohotti

unread,
Oct 6, 2021, 2:31:08 PM10/6/21
to Keycloak User
Hi,

I'm using Keycloak to authorize resources. I have configured resources, permissions and policies in the intended client(in my case "app-client"). And below is my spring boot configuration.

keycloak.realm=rbac-test
keycloak.resource=app-client
keycloak.auth-server-url=http://localhost:8180/auth
keycloak.credentials.secret=3fa72f1b-9fbd-4301-af0c-0a6796a3d6d2
keycloak.use-resource-role-mappings = true
keycloak.cors=true

keycloak.policy-enforcer-config.enforcement-mode=ENFORCING

I'm using "eycloak-spring-boot-starter" 15.0.2.

When I access the rest endpoint through postman using access-token, it throws 403 forbidden message. 

Can anyone help me on that?

Cheers,
Chathura Mohotti.

Steven Ooi

unread,
Oct 11, 2021, 2:29:21 AM10/11/21
to Keycloak User
Is the logs shows that policy enforcer path config retrieved from keycloak server?

you can print org.keycloak = TRACE for more debugging info.
Reply all
Reply to author
Forward
0 new messages