diff --git a/Dockerfile b/Dockerfile index 6fbc612..0130ed7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,10 +36,14 @@ EXPOSE 1194/udp ADD ./bin /usr/local/bin RUN chmod a+x /usr/local/bin/* && \ - mkdir -p /etc/openvpn-oauth + mkdir -p /etc/openvpn-oauth \ + /opt/http-assets # Add support for OTP authentication using a PAM module -ADD ./otp/openvpn /etc/pam.d/ +ADD ./pam.d/openvpn /etc/pam.d/ + +# Add http branding assets +ADD ./http-assets /opt/http-assets # Breaks all easyrsa commands locally due to UID mappings # would require podman as plain docker doesnt support keep-id diff --git a/bin/openvpn-auth-oauth2.sh b/bin/openvpn-auth-oauth2.sh new file mode 100755 index 0000000..d1a2f7a --- /dev/null +++ b/bin/openvpn-auth-oauth2.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# copy http-assets +cp /opt/http-assets/* /etc/openvpn-oauth/http-assets + +openvpn-auth-oauth2 --config /etc/openvpn-oauth/config.yaml diff --git a/otp/openvpn b/pam.d/openvpn similarity index 100% rename from otp/openvpn rename to pam.d/openvpn