Skip to content

Commit

Permalink
add initial files to successfully build and install authproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
jumanjiman committed Dec 23, 2014
1 parent b1dfec2 commit 8d38c12
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.docker.com/reference/builder/#the-dockerignore-file
.git
*/.git
README.md
LICENSE
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM centos:centos6

# Ensure pre-installed packages are up-to-date.
RUN yum -y update; yum clean all
ONBUILD RUN yum -y update; yum clean all

# Install dependencies.
RUN yum -y install epel-release; yum clean all

# https://www.duosecurity.com/docs/authproxy_reference#installation
RUN yum -y install \
gcc make openssl-devel python-devel \
tar \
which \
patch \
; yum clean all

ADD install.patch /root/
ADD https://dl.duosecurity.com/duoauthproxy-latest-src.tgz /root/
RUN useradd duo

# Build and install authproxy.
RUN cd /root; \
tar xzf duoauthproxy-latest-src.tgz; \
cd duoauthproxy*; \
export PYTHON=$(which python); \
make; \
cd duoauthproxy-build; \
patch -p0 < /root/install.patch; \
./install

# `docker run' starts bash by default.
CMD ["/bin/bash"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Paul Morgan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
76 changes: 76 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Duo Authproxy on Centos6
========================

Overview
--------

[Duo Authentication Proxy](https://www.duosecurity.com/docs/authproxy_reference)
provides a local proxy service to enable on-premise integrations
between VPNs, devices, applications, and
[Duo two-factor authentication](https://www.duosecurity.com/docs).

This repo provides a way to build Duo Authentication Proxy into
a docker image and run it as a container.


Status
------

:warning: This is not ready for deployment.


References
----------------

* [Duo Authentication Proxy](https://www.duosecurity.com/docs/authproxy_reference)
* [Duo two-factor authentication](https://www.duosecurity.com/docs)


How-to
------

Build this image locally on a host with Docker:

git clone https://github.com/jumanjihouse/docker-duoauthproxy.git
cd docker-duoauthproxy
docker build --rm -t duoauthproxy .

Run a container with bash from the built image:

docker run --rm -it duoauthproxy bash


Licenses
--------

All files in this repo are subject to LICENSE (also in this repo).

Your usage of the built docker image is subject to the terms at
/root/duoauthproxy-*-src/duoauthproxy-build/doc/eula-linux.txt
within the built image.

View the Duo end-user license agreement:

eula='/root/duoauthproxy-*-src/duoauthproxy-build/doc/eula-linux.txt'
docker run --rm -it duoauthproxy bash -c "cat $eula"

Get a list of licenses for third-party components within the image:

dir='duoauthproxy-*-src
docker run --rm -it duoauthproxy bash -c "find $dir -iregex '.*license.*'"

At the time this document is created, the above commands shows:

duoauthproxy-2.4.8-src/pkgs/Twisted-14.0.2/LICENSE
duoauthproxy-2.4.8-src/pkgs/netaddr-0.7.10/docs/source/license.rst
duoauthproxy-2.4.8-src/pkgs/netaddr-0.7.10/LICENSE
duoauthproxy-2.4.8-src/pkgs/pyOpenSSL-0.13.1/LICENSE
duoauthproxy-2.4.8-src/pkgs/six-1.3.0/LICENSE
duoauthproxy-2.4.8-src/pkgs/zope.interface-4.0.5/LICENSE.txt
duoauthproxy-2.4.8-src/pkgs/dpkt-1.7/LICENSE
duoauthproxy-2.4.8-src/pkgs/pycrypto-2.6/LEGAL/copy/LICENSE.libtom
duoauthproxy-2.4.8-src/pkgs/pycrypto-2.6/LEGAL/copy/LICENSE.orig
duoauthproxy-2.4.8-src/pkgs/pycrypto-2.6/LEGAL/copy/LICENSE.python-2.2
duoauthproxy-2.4.8-src/pkgs/virtualenv-1.9.1/LICENSE.txt
duoauthproxy-2.4.8-src/pkgs/pyparsing-1.5.7/LICENSE
duoauthproxy-2.4.8-src/pkgs/pyrad-2.0/LICENSE.txt
23 changes: 23 additions & 0 deletions install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- install.orig 2014-12-23 19:08:11.295300746 +0000
+++ install 2014-12-23 19:09:14.960571585 +0000
@@ -358,9 +358,9 @@

class AuthproxyInstaller(object):
INSTALL_DIR_DEFAULT = os.path.join('/opt', PRODUCT_NAME)
- USER_DEFAULT = 'nobody'
+ USER_DEFAULT = 'duo'

- def __init__(self, install_dir=None, service_user=None, do_initscript=None):
+ def __init__(self, install_dir=INSTALL_DIR_DEFAULT, service_user=USER_DEFAULT, do_initscript='yes'):
self.install_dir = install_dir
self.service_user = service_user
self.service_uid = None
@@ -374,7 +374,7 @@

def install(self):
# user interaction
- self.show_license()
+ # self.show_license()
self.get_install_dir()
self.get_user()

0 comments on commit 8d38c12

Please sign in to comment.