Coder Social home page Coder Social logo

2ult4n / docker-kerberos-with-ldap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nugaon/docker-kerberos-with-ldap

0.0 0.0 0.0 4 KB

Ubuntu based Kerberos server which is compatible with LDAP (even in Docker network).

Shell 76.19% Makefile 16.73% Dockerfile 7.08%

docker-kerberos-with-ldap's Introduction

Docker kerberos

This image is for testing purposes for Kerberos/LDAP environments. With this Kerberos image you can initialize an Ubuntu based Kerberos server with LDAP connections. The whole project based on mrenouf/docker-images repository, but this codebase is not compatible with that.

Quick start

docker run -d --net docker_overlay -v /dev/urandom:/dev/random --name kerberos nugaon/kerberos-with-ldap

The containers have a pretty bad entropy level so the KDC won't start because of this. We can overcome this by using /dev/urandom which is less secure but does not care about entropy. Obviously, this Kerberos container has to be run on the same network as the ldap container or make it possible to reach the outsider LDAP server. For the former case, I suggest for you to use my compatible LDAP docker with Kerberos image nugaon/openldap-with-kerberos, that you can find on GitHub as well.

Useful environment variables:

Environment variables Description Default value
REALM the Kerberos realm EXAMPLE.COM
DOMAIN_REALM the DNS domain for the realm example.com
KERB_MASTER_KEY master key for the KDC masterkey
KERB_ADMIN_USER administrator account name admin
KERB_ADMIN_PASS administrator's password admin
SEARCH_DOMAINS domain suffix search list example.com
LDAP_DC domain suffix search list dc=example,dc=com
LDAP_USER ldap service user admin
LDAP_PASS ldap service pass admin
LDAP_URL ldap url ldap://ldap

Bind LDAP user to Kerberos DB

If you add new users in LDAP you have to register them in Kerberos as well in order to utilize Kerberos authentication. It is possible by the following command:

docker exec -ti $KERBEROS_CONTAINER kadmin.local -q 'addprinc -x dn=$USER_DN $USER_KERB_NAME'

example

docker exec -ti kerberos kadmin.local -q 'addprinc -x dn=cn=Teszt" "Elek,cn=users,dc=ldap,dc=hiflylabs,dc=hu telek'

Test

Once kerberos is enabled you need a ticket to execute any job on the cluster. Here's an example to get a ticket:

docker exec -ti kerberos sh -c "kinit admin && klist"

It authenticates the LDAP associated admin user by the Kerberos server.

docker-kerberos-with-ldap's People

Contributors

nugaon 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.