Repository navigation
|
Hello, everyone! I'm quite new to Keycloak and I still have some beginner doubts and questions. Specially regarding Keycloak's capabilities and how it works as an Authorizer.
We have one API, that's configured under a client inside our Realm. For better understanding, I will call it Suppose only the user and people at Even with these filled up, I can access User API without authentication. I know the authentication works because I can get my tokens, do a browser login and validate my token via my API's backend. My goal would be to block any access before the backend is reached at that route, like when we try to authenticate with an invalid token:
Bonus: Where the Thank you in advance! |
Replies: 1 comment 3 replies
|
Hello, you should check the keycloak quistarters repo. Example: https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-authz-spring-security There they show you exactly how to protect a resource (URL) based on couple of different criteria - either policy, owner attribute or role. I also recently worked on a POC of this and I have created a terraform script that prepared keycloak, so if you want you can check my repo: https://github.com/sashokbg/keycloak-authorization |
Hello, you should check the keycloak quistarters repo.
Example: https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-authz-spring-security
There they show you exactly how to protect a resource (URL) based on couple of different criteria - either policy, owner attribute or role.
I also recently worked on a POC of this and I have created a terraform script that prepared keycloak, so if you want you can check my repo: https://github.com/sashokbg/keycloak-authorization