GithubHelp home page GithubHelp logo

nightowlengineer / haproxy-client-dn-format Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

A simple Lua module for HAProxy to fetch the subject name of a client-side certificate as an RFC4514-compliant string

License: GNU General Public License v3.0

Lua 100.00%
haproxy

haproxy-client-dn-format's Introduction

This module is no longer required after HAProxy released 2.2-dev1 which added "MINOR: ssl: Add support for returning the dn samples from ssl_(c|f)_(i|s)_dn in LDAP v3 (RFC2253) format." - see https://cbonte.github.io/haproxy-dconv/2.2/configuration.html#7.3.4-ssl_c_s_dn for further information


haproxy-client-dn-format

A simple Lua module for HAProxy to fetch the subject name of a client-side certificate as an RFC4514-compliant string

Fetches the DN from the presented client certificate in the original OpenSSL-style, slash-separated format, reverses the order, and returns the DN in a comma separated format, e.g:

/C=GB/O=Example Corp/OU=People/CN=John Smith (jsmith)

becomes:

CN=John Smith (jsmith),OU=People,O=Example Corp,C=GB

Usage

Within HAProxy (>=1.6), load the Lua script and use it where appropriate:

global
    lua-load rfc_client_dn.lua
frontend www
    http-request set-header "X-SSL-Client-DN" %{+Q}[lua.rfc_client_dn()]

haproxy-client-dn-format's People

Contributors

nightowlengineer avatar

Stargazers

 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.