Giter VIP home page Giter VIP logo

kong-oidc-keycloak-boilerplate's Introduction

Introduction

Boilerplate for Kong OIDC and KeyCloak.

This repo will show the samples to baked a base Kong image with the Open-Source OIDC Plugin maintained by revomatico, and some sample Kubernetes deployment manifest for Kong and KeyCloak

Building and Publishing

Steps to build and publish the container with base Kong Image

# Build the container with any new changes
docker build -t <<private-registry>>/kong-oidc:<tag> -f Dockerfile . 

# Run the container in detached mode
docker run -d --name kong-oidc <<private-registry>>/kong-oidc:<tag>       

# Pushing the container image to a registry
docker push <<private-registry>>/kong-oidc:<tag>   

Understanding the Kong Plugins

To enjoy features by Kong API Gateway with its Ingress controller, we need to consider the following Kong Plugins.

  1. odic - This plugin is used to communicate with the Keycloak Identity provider and is required if you'd like to enable (recommended) SSO for your ingress.

  2. request-transformer - To strip off unnecessary headers upon authentication with the identity platform

  3. cors - Allow cors at global level

KeyCloak Configuration Overview

  1. Add a new Kong Realm

  2. Create a new Kong Client in the realm , eg kong-oidc, and make the necessary changes

  3. Go to Clients, and then click on Settings. Make the following changes:

Access Type: Confidential Valid Redirect URIs: * Web Origin: localhost (Allowed CORS origin)

  1. Retrieve Client ID, and then go to Credentials to get the Secret value.
  2. Retrieve OpenID Endpoint Configuration for the discovery path
  3. Passed the values to the oidc crds parameters discovery, client_id and client_secret

Credits

License

MIT © Robin Cher

References

kong-oidc-keycloak-boilerplate's People

Contributors

robincher avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.