GithubHelp home page GithubHelp logo

givimad / nginx-ldap-auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tiagoapimenta/nginx-ldap-auth

0.0 2.0 0.0 29 KB

Nginx authentication backend for LDAP

License: zlib License

Dockerfile 3.52% Go 89.97% Shell 6.51%

nginx-ldap-auth's Introduction

Nginx LDAP Auth

Use this in order to provide a ingress authentication over LDAP for Kubernetes, change the Secret inside config.sample.yaml to match your LDAP server and run:

kubectl create secret generic nginx-ldap-auth --from-file=config.yaml=config.sample.yaml

kubectl apply -f k8s.yaml

For RBAC enabled cluster use the k8s-rbac.yaml manifest instead:

kubectl apply -f k8s-rbac.yaml

Configure your ingress with annotation nginx.ingress.kubernetes.io/auth-url: http://nginx-ldap-auth.default.svc.cluster.local:5555 as described on nginx documentation.

Configuration

The actual version choose a random server, in future version it is intended to have a pool of them, that is why it is a list, not a single one, but you can fill only one if you wish.

The prefix tell the program which protocol to use, if ldaps:// it will try LDAP over SSL, if ldap:// it will try plain LDAP with STARTTLS, case no prefix is given it will try to guess based on port, 636 for SSL and 389 for plain.

If the user.requiredGroups list is omited or empty all LDAP users will be allowed regardless the group, if not empty all groups will be required, the next version will have more flexible configuration.

If you are not sure what filter, bindDN or baseDN to use, here is a tip:

ldapsearch -H ${servers[*]} -D ${auth.bindDN} -w ${auth.bindPW} -b ${user.baseDN|group.baseDN} ${user.filter|group.filter}

Replace the values between ${...} to the ones on config.yaml, when you succeed you can fill the final configuration.

Timeouts are configurable, but it is recommended not to use values less than some seconds, it was planned to prevent several identical requests to LDAP servers.

nginx-ldap-auth's People

Contributors

gered avatar givimad avatar icicimov avatar tiagoapimenta avatar

Watchers

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