Keycloak wrapper plugin for Express Gateway
$ eg plugin install express-gateway-plugin-keycloak-connect
You can use the default keycloak-connect config method with a 'keycloak.json' file at the root directory or you can specify the config under the system config variable.
- add to
system.config.yml
plugins:
keycloak-connect:
package: express-gateway-plugin-keycloak-connect
kcConfigParams:
realm: "my-realm"
auth-server-url: "https://kc-server.kc-domain.com/auth/"
ssl-required: "external"
bearer-only: true
resource: "client-id"
confidential-port: 0
realm-public-key: "G5w44344..."
- add to
gateway.config.yml
policies:
- keycloak-protect
...
pipelines:
my-awesome-api:
apiEndpoints:
- api
policies:
- keycloak-protect:
- action:
roles: 'admin' #optional
Express Gateway plugin explanation: Plugin Documentation
Guidlines how to write your custom plugin: Plugin Development Guide