This example repo describe how to access whoami/any service securely via APISIX OIDC with keycloak.
-
Map
foo.example.com
andbar.example.com
against127.0.0.1
in/etc/hosts
file -
Then
docker-compose up -d
-
Then visit http://foo.example.com/
-
Login using username:
[email protected]
password:welcome123
-
Now the whoami page will load
-
Goto http://bar.example.com/ . It will redirect to keycloak login page
-
To logout from foo http://foo.example.com/logout
TBD
Load the keycloak config into the keycloak using their API. We used this only to create realm, clients and users.
This is just a shell script with curl command against APISIX admin API.
This will create
-
Service
-
Routes
-
Plugins