Configure Keycloak
Set up the Keycloak realm, OAuth2 client, and test users for local development.
Keycloak runs at http://localhost:5433.
1. Log in to the Admin Console
- URL: http://localhost:5433
- Username:
admin - Password:
admin
2. Create the Realm
- Click the dropdown next to Master realm → Create realm
- Set Realm name:
event-based-banking-application - Click Create
3. Create the OAuth2 Client
- Go to Clients → Create client
- Client ID:
banking-service-client - Client authentication: On
- Standard flow: Enabled
- Valid redirect URIs:
http://localhost:8085/* - Click Save
4. Copy the Client Secret
- Go to the Credentials tab of
banking-service-client - Copy the Client secret
- Save it — you will need it when configuring the API Gateway and when testing authenticated endpoints
5. Create Test Users
- Go to Users → Add user
- Fill in Username (e.g.
testuser) - Click Create
- Go to the Credentials tab
- Set a password (turn Temporary off)
- Click Set password
Repeat for any additional test users you need.