summaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-docker/src/main/docker
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2022-09-01 09:17:54 -0500
committerjhh <jorge.hernandez-herrero@att.com>2022-09-01 09:17:54 -0500
commit545f221f4e4f734767d8b467d27a6ef67bd99720 (patch)
tree2fb19c558cca30afa82410a27781ba774b7e699d /packages/policy-xacmlpdp-docker/src/main/docker
parentbc80c460c83a8515b303b106cf22928de1f2ad11 (diff)
Compatibility with mariadb 10.x and mysql 8.x
Additional support for extra flags for example is secured mysql/mariadb server is desired when provisioning tables at initialization. Issue-ID: POLICY-4183 Issue-ID: POLICY-4340 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Id873b3692237cd867815f2928b56492c9261082e
Diffstat (limited to 'packages/policy-xacmlpdp-docker/src/main/docker')
-rw-r--r--packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx-pg.sh13
-rw-r--r--packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh14
2 files changed, 26 insertions, 1 deletions
diff --git a/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx-pg.sh b/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx-pg.sh
index 03faedff..838cfa5f 100644
--- a/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx-pg.sh
+++ b/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx-pg.sh
@@ -2,6 +2,7 @@
#
# ============LICENSE_START=======================================================
# Copyright (C) 2022 Nordix Foundation.
+# Modifications Copyright (C) 2022 AT&T Intellectual Property.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,6 +20,8 @@
# ============LICENSE_END=========================================================
#
+set -x
+
KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
@@ -54,6 +57,16 @@ if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
fi
+if [ -f "${POLICY_HOME}/etc/mounted/createguardtable-pg.sql" ]; then
+ echo "overriding createguardtable.sql"
+ cp -f "${POLICY_HOME}"/etc/mounted/createguardtable-pg.sql "${POLICY_HOME}"/postgress/sql/
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/db-pg.sql" ]; then
+ echo "adding additional db-pg.sql"
+ cp -f "${POLICY_HOME}"/etc/mounted/db-pg.sql "${POLICY_HOME}"/postgress/sql/
+fi
+
# Create operationshistory table
"${POLICY_HOME}"/postgres/bin/create-guard-table-pg.sh
diff --git a/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh b/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
index ffe6c44a..0c7b98b4 100644
--- a/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
+++ b/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
#
# ============LICENSE_START=======================================================
-# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
# Modifications Copyright (C) 2019-2022 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,6 +20,8 @@
# ============LICENSE_END=========================================================
#
+set -x
+
KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
@@ -55,6 +57,16 @@ if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
fi
+if [ -f "${POLICY_HOME}/etc/mounted/createguardtable.sql" ]; then
+ echo "overriding createguardtable.sql"
+ cp -f "${POLICY_HOME}"/etc/mounted/createguardtable.sql "${POLICY_HOME}"/mysql/sql/
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/db.sql" ]; then
+ echo "adding additional db.sql"
+ cp -f "${POLICY_HOME}"/etc/mounted/db.sql "${POLICY_HOME}"/mysql/sql/
+fi
+
# Create operationshistory table
"${POLICY_HOME}"/mysql/bin/create-guard-table.sh