# Keycloak integration with community edition

**URL:** <https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712>\
**Category:** General\
**Tags:** kubernetes, kong-gateway\
**Created:** [June 10, 2019, 2:01pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712 "2019-06-10T14:01:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Shandilya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/prashant_shandilya/32/805_2.png) [@Prashant\_Shandilya](https://discuss.konghq.com/u/Prashant_Shandilya)\
**Post date:** [June 10, 2019, 2:01pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/1 "2019-06-10T14:01:10Z")

</div>

I understand tht KeyCloak can be integrated with OPENID connect plugin. However it is enterprise ONLY. Do we have any option for community edition.

---

<div class="post-metadata">

**Author:** ![jeremyjpj0916](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jeremyjpj0916/32/1388_2.png) [@jeremyjpj0916](https://discuss.konghq.com/u/jeremyjpj0916)\
**Post date:** [June 10, 2019, 2:30pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/2 "2019-06-10T14:30:57Z")

</div>

Best OIDC open-source Kong plugin IMO is this: [https://github.com/nokia/kong-oidc](https://github.com/nokia/kong-oidc)

---

<div class="post-metadata">

**Author:** ![Prashant\_Shandilya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/prashant_shandilya/32/805_2.png) [@Prashant\_Shandilya](https://discuss.konghq.com/u/Prashant_Shandilya)\
**Post date:** [June 10, 2019, 2:48pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/3 "2019-06-10T14:48:58Z")

</div>

Thanks Jeremy ! But I am alien to `luarocks`. Right now installed community edition on k8s cluster. Would appreciate if you can guide me how to add this plugin to the k8s image.

---

<div class="post-metadata">

**Author:** ![jeremyjpj0916](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jeremyjpj0916/32/1388_2.png) [@jeremyjpj0916](https://discuss.konghq.com/u/jeremyjpj0916)\
**Post date:** [June 10, 2019, 4:12pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/4 "2019-06-10T16:12:32Z")

</div>

@Prashant_Shandilya I have only worked with Kong as an API Gateway in cloud architecture deployed and configured in a dockerfile. As for native k8s deployment I am not sure how Kong is configured for 3rd party plugins. Obviously their YAML configurations mentions where standard plugins live but I suppose to actually leverage 3rd party plugins you could make a custom image with the plugin put into it and then add the plugin conf to the yaml configuration. See here for some discussion on it:

> [@Apply custom plugin via KongIngress](https://discuss.konghq.com/t/apply-custom-plugin-via-kongingress/2698/2):
>
> Custom plugins can be added to the ingress controller via volume mounts and environment variable configuration. Note that these need to be added to both the [kong Deployment](https://github.com/Kong/kubernetes-ingress-controller/blob/0.3.0/deploy/single/all-in-one-postgres.yaml#L637-L641) and the ingress-kong Deployment, as the ingress controller uses a split deployment with separate Kong nodes for the admin API and proxy. You’ll need to first create a [configMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) to hold your plugin source with something like kubectl create configmap custom-plugins --from-file=/path/to/kong-plugin-hello/ --namespace kong . Af…

---

<div class="post-metadata">

**Author:** ![hutchic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hutchic/32/122_2.png) [@hutchic](https://discuss.konghq.com/u/hutchic)\
**Post date:** [June 11, 2019, 4:13pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/5 "2019-06-11T16:13:39Z")

</div>

I haven’t tried this personally but am aware of [https://github.com/ivangfr/kubernetes-environment/tree/master/bookservice-kong-keycloak](https://github.com/ivangfr/kubernetes-environment/tree/master/bookservice-kong-keycloak)

---

<div class="post-metadata">

**Author:** ![Prashant\_Shandilya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/prashant_shandilya/32/805_2.png) [@Prashant\_Shandilya](https://discuss.konghq.com/u/Prashant_Shandilya)\
**Post date:** [June 12, 2019, 7:04am UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/6 "2019-06-12T07:04:48Z")

</div>

@hutchic In the example shared, the integration with keycloak is done at service layer and not at API GATEWAY (kong). This option would always be there but would mean tight coupling between service and security layer.

---

<div class="post-metadata">

**Author:** ![Prashant\_Shandilya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/prashant_shandilya/32/805_2.png) [@Prashant\_Shandilya](https://discuss.konghq.com/u/Prashant_Shandilya)\
**Post date:** [June 12, 2019, 7:09am UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/7 "2019-06-12T07:09:41Z")

</div>

Thanks ! would try this one. However would appreciate if kong can provide some std way to encorporate custom plugin…

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [June 13, 2019, 9:28pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/8 "2019-06-13T21:28:29Z")

</div>

@Tieske might have some insights here as he has been working in this area.

---

<div class="post-metadata">

**Author:** ![Tieske](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/tieske/32/54_2.png) [@Tieske](https://discuss.konghq.com/u/Tieske)\
**Post date:** [June 13, 2019, 9:41pm UTC](https://discuss.konghq.com/t/keycloak-integration-with-community-edition/3712/9 "2019-06-13T21:41:34Z")

</div>

use this to generate a Kong image that includes a custom plugin: [https://github.com/Kong/docker-kong/tree/master/customize](https://github.com/Kong/docker-kong/tree/master/customize)
