forked from jumanjihouse/docker-duoauthproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add initial files to successfully build and install authproxy
- Loading branch information
1 parent
b1dfec2
commit 8d38c12
Showing
5 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
|