From d15516f0ef5e2fd06a91a88144e7ca793e4da75b Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Tue, 30 Nov 2021 16:18:34 -0800 Subject: [PATCH] query fix & controller build fix --- controller/PostgreSQL.cpp | 2 +- ext/central-controller-docker/Dockerfile.run_base | 2 +- service/OneService.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp index f79c8725d..14e210540 100644 --- a/controller/PostgreSQL.cpp +++ b/controller/PostgreSQL.cpp @@ -392,7 +392,7 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str exit(6); } - r = w.exec_params("SELECT org.client_id, org.authorization_endpoint, org.sso_version " + r = w.exec_params("SELECT org.client_id, org.authorization_endpoint, org.sso_impl_version " "FROM ztc_network AS nw, ztc_org AS org " "WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id", networkId); diff --git a/ext/central-controller-docker/Dockerfile.run_base b/ext/central-controller-docker/Dockerfile.run_base index 4db9cbd28..9a08f5f72 100644 --- a/ext/central-controller-docker/Dockerfile.run_base +++ b/ext/central-controller-docker/Dockerfile.run_base @@ -2,4 +2,4 @@ FROM centos:8 RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm RUN dnf -qy module disable postgresql RUN yum -y install epel-release && yum -y update && yum clean all -RUN yum install -y jemalloc jemalloc-devel postgresql10 libpqxx && yum clean all +RUN yum install -y jemalloc jemalloc-devel postgresql10 libpqxx libpqxx-devel && yum clean all diff --git a/service/OneService.cpp b/service/OneService.cpp index b2b8a92b5..b30747fb7 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -251,7 +251,9 @@ public: const char* nwid = Utils::hex(nwc->nwid, nwbuf); fprintf(stderr, "NetworkState::setConfig(%s)\n", nwid); memcpy(&_config, nwc, sizeof(ZT_VirtualNetworkConfig)); - + fprintf(stderr, "ssoEnabled: %s, ssoVersion: %d\n", + _config.ssoEnabled ? "true" : "false", _config.ssoVersion); + if (_config.ssoEnabled && _config.ssoVersion == 1) { fprintf(stderr, "ssoEnabled for %s\n", nwid); if (_idc == nullptr)