# How to use keycloak to sign into JupyterHub?

**URL:** <https://discourse.jupyter.org/t/how-to-use-keycloak-to-sign-into-jupyterhub/7539>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** help-wanted\
**Created:** [January 15, 2021, 2:21pm UTC](https://discourse.jupyter.org/t/how-to-use-keycloak-to-sign-into-jupyterhub/7539 "2021-01-15T14:21:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![un1named](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/un1named/32/3518_2.png) [@un1named](https://discourse.jupyter.org/u/un1named)\
**Post date:** [January 15, 2021, 2:21pm UTC](https://discourse.jupyter.org/t/how-to-use-keycloak-to-sign-into-jupyterhub/7539/1 "2021-01-15T14:21:00Z")

</div>

I’m trying to configure JupyterHub, to enable Keycloak authorization method. I’m looking at doc here ([Authentication and authorization — Zero to JupyterHub with Kubernetes documentation](https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/authentication.html#keycloak)). The thing that is confusing to me is `username_key` and `userdata_params` . What should I specify here, and how should I configure Keycloak client named jupyterhub that correspond to it? (The role and mapper I guess)

Currently I’m getting successful redirect to my Keycloak, but am getting 400 error. Any help?

---

<div class="post-metadata">

**Author:** ![1kastner](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/1kastner/32/1537_2.png) [@1kastner](https://discourse.jupyter.org/u/1kastner)\
**Post date:** [February 7, 2021, 12:02pm UTC](https://discourse.jupyter.org/t/how-to-use-keycloak-to-sign-into-jupyterhub/7539/2 "2021-02-07T12:02:46Z")

</div>

At the end of [https://discourse.jupyter.org/t/setup-oauth2-locally-tornado-curl-httpclient-curlerror-http-599-server-certificate-verification-failed-cafile-none-crlfile-none/](https://discourse.jupyter.org/t/setup-oauth2-locally-tornado-curl-httpclient-curlerror-http-599-server-certificate-verification-failed-cafile-none-crlfile-none/) I shared my working config.
