1.0.2 • Published 3 years ago

express-gateway-plugin-keycloak-connect v1.0.2

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
3 years ago

express-gateway-plugin-keycloak-connect

Keycloak wrapper plugin for Express Gateway

Getting Started:

$ eg plugin install express-gateway-plugin-keycloak-connect

Usage:

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

Detailed documentation:

Express Gateway Overview

Express Gateway plugin explanation: Plugin Documentation

Guidlines how to write your custom plugin: Plugin Development Guide

Keycloak Connect - Node.js Keycloak Adapter