{"id":30170,"date":"2019-03-22T12:00:43","date_gmt":"2019-03-22T18:00:43","guid":{"rendered":"https:\/\/jumpcloud.com\/?p=30170"},"modified":"2022-11-03T17:51:54","modified_gmt":"2022-11-03T21:51:54","slug":"kubernetes-auth-dex-ldap","status":"publish","type":"post","link":"https:\/\/jumpcloud.com\/blog\/kubernetes-auth-dex-ldap","title":{"rendered":"Kubernetes Authentication using Dex and LDAP"},"content":{"rendered":"\n
You\u2019re working with containers or orchestration environments, but that doesn\u2019t mean that you want to manage user identities from your Kubernetes (k8s) cluster. Whether you\u2019re a DevOps engineer or a software developer, you may have good reason to use an external source of identity for authentication instead.<\/p>\n\n\n\n
By authenticating using an external source of identity, organizations can sync Kubernetes identities with their core credentials or simply use their identity provider to auth into K8s services. This streamlines access for users and enables IT to manage everything from one pane of glass. These external identity providers can range from standard directory services (e.g. LDAP<\/a>) to social platforms leveraging OAuth such as Google.<\/p>\n\n\n\n In this article, we will briefly explain the integration paths and provide examples for integrating the Dex open-source service with JumpCloud\u2019s cloud LDAP endpoint. <\/p>\n\n\n\n Before we begin, the reader should familiarize themselves with two key external resources which will underpin this brief article. The first is related to\u00a0Dex\u00a0itself. Dex is an open source OIDC (OpenID Connect) authentication service\u00a0launched by CoreOS<\/a>. This service provides an essential abstraction layer between other services (e.g. an app, microservice or a Kubernetes cluster itself) and sources of identity such as LDAP, Google, Linkedin, etc. \u00a0<\/p>\n\n\n\n The second is a great piece by\u00a0Medium author, Krishna<\/a>, who was the inspiration for our piece and a deep dive on integrating a Kubernetes-based service with\u00a0JumpCloud\u2019s Cloud LDAP<\/a>.<\/p>\n\n\n\n In Krishna\u2019s article, he lays out an extremely simple model to follow. His tutorial, offered on his GitHub repo, \u201cKubernetes \u2013 LDAP authentication with Dex<\/a>\u201d, establishes a Kubernetes environment, lays down a simple app and associated services, \u201cloginapp\u201d, in addition to all of the Dex infrastructure required to integrate the app to authenticate with an LDAP service (JumpCloud in this case).<\/p>\n\n\n\n The simple interaction that is unpacked is generally, not precisely, as you see below in this sequence diagram:<\/p>\n\n\nOverview<\/h2>\n\n\n\n
Configuring Kubernetes to LDAP<\/h2>\n\n\n\n