1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

New port: security/duo_openvpn:

Duo provides simple two-factor authentication as a service via:

    1.  Phone callback
    2.  SMS-delivered one-time passcodes
    3.  Duo mobile app to generate one-time passcodes
    4.  Duo mobile app for smartphone push authentication
    5.  Duo hardware token to generate one-time passcodes

Duo two-factor authentication for OpenVPN

WWW: https://github.com/duosecurity/duo_openvpn
This commit is contained in:
Ryan Steinmetz 2021-05-06 19:12:22 -04:00
parent 7f65c62bce
commit 8db220ac1a
No known key found for this signature in database
GPG Key ID: D2C3D2B2FEF36DD7
7 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,53 @@
# Created by: Ryan Steinmetz <zi@FreeBSD.org>
PORTNAME= duo_openvpn
PORTVERSION= 2.4
CATEGORIES= security
MAINTAINER= zi@FreeBSD.org
COMMENT= Duo two-factor authentication for OpenVPN
LICENSE= GPLv2
RUN_DEPENDS= openvpn>0:security/openvpn
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= duosecurity
CFLAGS+= -DPREFIX='\"${DATADIR}\"'
SUB_FILES= pkg-message
OPTIONS_SINGLE= HELPER
OPTIONS_SINGLE_HELPER= PERL PYTHON
OPTIONS_DEFAULT=PERL
OPTIONS_SUB= yes
PERL_USES= perl5
PERL_VARS= USE_PERL5=run CFLAGS+=-DUSE_PERL
PERL_RUN_DEPENDS= p5-JSON-XS>0:converters/p5-JSON-XS \
p5-libwww>0:www/p5-libwww \
p5-LWP-Protocol-https>0:www/p5-LWP-Protocol-https \
p5-Digest-HMAC>0:security/p5-Digest-HMAC
PYTHON_USES= python:3.7+,run
.include <bsd.port.options.mk>
post-patch:
${REINPLACE_CMD} 's|%%SHEBANG%%|${PYTHON_CMD}|' ${WRKSRC}/duo_openvpn.py
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_LIB} ${WRKSRC}/duo_openvpn.so ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/ca_certs.pem ${STAGEDIR}${DATADIR}
do-install-PERL-on:
${INSTALL_SCRIPT} ${WRKSRC}/duo_openvpn.pl ${STAGEDIR}${DATADIR}
do-install-PYTHON-on:
${INSTALL_SCRIPT} ${WRKSRC}/duo_openvpn.py ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/https_wrapper.py ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/six.py ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1620320015
SHA256 (duosecurity-duo_openvpn-2.4_GH0.tar.gz) = a15c2534fb63f8a5b0130e59fc8c6189c2511a49f161fa9dbf415485aa21b962
SIZE (duosecurity-duo_openvpn-2.4_GH0.tar.gz) = 35768

View File

@ -0,0 +1,8 @@
--- Makefile.orig 2021-05-06 18:10:21 UTC
+++ Makefile
@@ -1,5 +1,3 @@
-PREFIX=/opt/duo
-CFLAGS += -DPREFIX='"$(PREFIX)"'
ifdef USE_PERL
CFLAGS += -DUSE_PERL

View File

@ -0,0 +1,12 @@
--- duo_openvpn.py.orig 2021-05-06 18:37:22 UTC
+++ duo_openvpn.py
@@ -1,8 +1,4 @@
-#!/bin/sh
-''''which python3 >/dev/null 2>&1 && exec python3 "$0" "$@" # '''
-''''which python >/dev/null 2>&1 && exec python "$0" "$@" # '''
-''''which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" # '''
-''''exec echo "Error: No python module found in system"# '''
+#!%%SHEBANG%%
#
# duo_openvpn.py
# Duo OpenVPN

View File

@ -0,0 +1,13 @@
[
{ type: install
message: <<EOM
After creating a new protected OpenVPN application in your duo
admin panel, add the following to your openvpn configuration file:
plugin %%DATADIR%%/duo_openvpn.so 'IKEY SKEY HOST'
For more detailed installation instructions, please visit:
https://duo.com/docs/openvpn
EOM
}
]

View File

@ -0,0 +1,11 @@
Duo provides simple two-factor authentication as a service via:
1. Phone callback
2. SMS-delivered one-time passcodes
3. Duo mobile app to generate one-time passcodes
4. Duo mobile app for smartphone push authentication
5. Duo hardware token to generate one-time passcodes
Duo two-factor authentication for OpenVPN
WWW: https://github.com/duosecurity/duo_openvpn

View File

@ -0,0 +1,6 @@
%%DATADIR%%/ca_certs.pem
%%PERL%%%%DATADIR%%/duo_openvpn.pl
%%PYTHON%%%%DATADIR%%/duo_openvpn.py
%%PYTHON%%%%DATADIR%%/https_wrapper.py
%%PYTHON%%%%DATADIR%%/six.py
%%DATADIR%%/duo_openvpn.so