Loading README.md +3 −0 Original line number Diff line number Diff line # authdb Authentication Database system with json Rest/Api HTTP is available without TLS configuration. To enable HTTPS, set both `AUTHDB/SSL/KEY` and `AUTHDB/SSL/CERT` in the config. ## Requirements ### Operating System - Linux Loading data/config.yaml +1 −3 Original line number Diff line number Diff line Loading @@ -8,9 +8,7 @@ AUTHDB: PORT: 389 BIND: "0.0.0.0" MAXCONN: 1024 SSL: KEY: ./data/private.der CERT: ./data/certificate.der # Optional: add AUTHDB/SSL/KEY and AUTHDB/SSL/CERT to enable HTTPS. PORT: 9090 BIND: "0.0.0.0" MAXCONN: 1024 Loading src/authdb.cpp +17 −8 Original line number Diff line number Diff line Loading @@ -893,13 +893,22 @@ int main(int argc,char *argv[]){ backendPath = config.getValue(config.getKey("/AUTHDB/ADMINDB/PATH"), 0); } libhttppp::HttpD httpd( std::unique_ptr<libhttppp::HttpD> httpd; if (!cert.empty() && !key.empty()) { httpd = std::make_unique<libhttppp::HttpD>( config.getValue(config.getKey("/AUTHDB/BIND"),0), config.getIntValue(config.getKey("/AUTHDB/PORT"),0), config.getIntValue(config.getKey("/AUTHDB/MAXCONN"),0), cert, key ); } else { httpd = std::make_unique<libhttppp::HttpD>( config.getValue(config.getKey("/AUTHDB/BIND"),0), config.getIntValue(config.getKey("/AUTHDB/PORT"),0), config.getIntValue(config.getKey("/AUTHDB/MAXCONN"),0) ); } /* Start cluster while still root so QUIC can bind privileged ports */ if (clusterEnabled) { Loading Loading @@ -942,7 +951,7 @@ int main(int argc,char *argv[]){ << backend.end() << std::endl; } authdb::AuthDB authdb(backend,httpd.getServerSockets()); authdb::AuthDB authdb(backend,httpd->getServerSockets()); // Pre-load all domain backends into cache so API requests // don't need to lock the admin backend for domain resolution. Loading Loading
README.md +3 −0 Original line number Diff line number Diff line # authdb Authentication Database system with json Rest/Api HTTP is available without TLS configuration. To enable HTTPS, set both `AUTHDB/SSL/KEY` and `AUTHDB/SSL/CERT` in the config. ## Requirements ### Operating System - Linux Loading
data/config.yaml +1 −3 Original line number Diff line number Diff line Loading @@ -8,9 +8,7 @@ AUTHDB: PORT: 389 BIND: "0.0.0.0" MAXCONN: 1024 SSL: KEY: ./data/private.der CERT: ./data/certificate.der # Optional: add AUTHDB/SSL/KEY and AUTHDB/SSL/CERT to enable HTTPS. PORT: 9090 BIND: "0.0.0.0" MAXCONN: 1024 Loading
src/authdb.cpp +17 −8 Original line number Diff line number Diff line Loading @@ -893,13 +893,22 @@ int main(int argc,char *argv[]){ backendPath = config.getValue(config.getKey("/AUTHDB/ADMINDB/PATH"), 0); } libhttppp::HttpD httpd( std::unique_ptr<libhttppp::HttpD> httpd; if (!cert.empty() && !key.empty()) { httpd = std::make_unique<libhttppp::HttpD>( config.getValue(config.getKey("/AUTHDB/BIND"),0), config.getIntValue(config.getKey("/AUTHDB/PORT"),0), config.getIntValue(config.getKey("/AUTHDB/MAXCONN"),0), cert, key ); } else { httpd = std::make_unique<libhttppp::HttpD>( config.getValue(config.getKey("/AUTHDB/BIND"),0), config.getIntValue(config.getKey("/AUTHDB/PORT"),0), config.getIntValue(config.getKey("/AUTHDB/MAXCONN"),0) ); } /* Start cluster while still root so QUIC can bind privileged ports */ if (clusterEnabled) { Loading Loading @@ -942,7 +951,7 @@ int main(int argc,char *argv[]){ << backend.end() << std::endl; } authdb::AuthDB authdb(backend,httpd.getServerSockets()); authdb::AuthDB authdb(backend,httpd->getServerSockets()); // Pre-load all domain backends into cache so API requests // don't need to lock the admin backend for domain resolution. Loading