Hello, since 2.4.10 Apache HTTPD provides module authnz_fcgi which allows to create own authentication scripts. Documentation is already installed with www/apache-www, however module requires to be explicitly enabled. Tested with OpenBSD 6.5.
Index: Makefile =================================================================== RCS file: /cvs/ports/www/apache-httpd/Makefile,v retrieving revision 1.98 diff -u -p -u -r1.98 Makefile --- Makefile 8 Apr 2019 23:25:23 -0000 1.98 +++ Makefile 16 Jun 2019 03:59:09 -0000 @@ -3,7 +3,7 @@ COMMENT= apache HTTP server V= 2.4.39 -REVISION= 1 +REVISION= 2 DISTNAME= httpd-${V} PKGNAME= apache-httpd-${V} @@ -53,6 +53,7 @@ CONFIGURE_ARGS= --enable-layout=OpenBSD --enable-proxy=shared \ --enable-proxy-fdpass \ --enable-mods-shared=all \ + --enable-authnz-fcgi \ --enable-cgi \ --enable-suexec \ --with-suexec-caller=www \ cvs server: Diffing patches cvs server: Diffing pkg Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/www/apache-httpd/pkg/PLIST,v retrieving revision 1.30 diff -u -p -u -r1.30 PLIST --- pkg/PLIST 2 Apr 2019 08:17:09 -0000 1.30 +++ pkg/PLIST 16 Jun 2019 03:59:10 -0000 @@ -93,6 +93,7 @@ lib/apache2/mod_authn_dbd.so lib/apache2/mod_authn_dbm.so lib/apache2/mod_authn_file.so lib/apache2/mod_authn_socache.so +lib/apache2/mod_authnz_fcgi.so lib/apache2/mod_authz_core.so lib/apache2/mod_authz_dbd.so lib/apache2/mod_authz_dbm.so -- Kind regards, Bartosz Kuźma.