If you're using Kuberentes, I would strongly encourage you to read this blog post that describes how to use Keycloak in a manner that secures APIs independently of the application. For code samples see https://github.com/hkiang01/keycloak-demo
-
Log into keycloak admin console (see docker compose)
-
Create "Clients" realm (upper left)
-
Within "Clients" realm, create a client called "app" with the following URLs
-
Create a user with username and password set to "test"
-
docker-compose down && docker-compose build && docker-compose up
-
Navigate to
localhost:8000/login