go-nginx-auth

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2018 License: AGPL-3.0 Imports: 14 Imported by: 0

README

cboxauthd daemon

This daemon performs authentication against LDAP for basic auth requests.

$ ./cboxauthd -h
Usage of ./cboxauthd:
      --applog string             File to log application data (default "stderr")
      --config string             Configuration file to use
      --httplog string            File to log HTTP requests (default "stderr")
      --ldapbasedn string         The base dn to use to talk to LDAP (default "OU=Users,OU=Organic Units,DC=cern,DC=ch")
      --ldapbindpassword string   The password to bind to LDAP (default "testpassword")
      --ldapbindusername string   The user to bind to LDAP (default "CERN\\testuser")
      --ldapfilter string         The filter to use in LDAP queries (default "(samaccountname=%s)")
      --ldaphostname string       Hostname of the LDAP server (default "cerndc.cern.ch")
      --ldapport int              Port of LDAP server (default 636)
      --port int                  Port to listen for connections (default 2020)
      --version                   Show version

Some example requests

curl -i localhost:2020/api/v1/auth -u "testuser"

HTTP/1.1 200 OK
Set-Cookie: oc_sessionpassphrase=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDg5NDcxOTczMTk0MzgzOTAsInVzZXJuYW1lIjoiZ29uemFsaHUifQ.nmozCjrSZmuY79CNa4kDoQFLcANrlWDDlMz_8S0b-GY
Date: Wed, 25 Oct 2017 14:59:57 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8


curl -i localhost:2020/api/v1/auth -b "oc_sessionpassphrase=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDg5NDcxOTczMTk0MzgzOTAsInVzZXJuYW1lIjoiZ29uemFsaHUifQ.nmozCjrSZmuY79CNa4kDoQFLcANrlWDDlMz_8S0b-GY"

HTTP/1.1 200 OK
Date: Wed, 25 Oct 2017 15:01:18 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL