diff options
-rw-r--r-- | deliveries/Dockerfile.mariadb | 12 | ||||
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/deliveries/Dockerfile.mariadb b/deliveries/Dockerfile.mariadb index e9c5e9f3..8dffd0e4 100644 --- a/deliveries/Dockerfile.mariadb +++ b/deliveries/Dockerfile.mariadb @@ -6,6 +6,13 @@ ARG DB_SCRIPT_DIR=${DB_SCRIPT_DIR} #Add config file COPY my.cnf /etc/mysql/my.cnf +# mysql user and group already created by mariadb image + +ARG user=mysql +ARG group=mysql + +RUN mkdir /opt/$user && chown -R $user:$group /opt/$user + # Scripts are executed in alphabetical order # Portal DDL and DML at v3.2 @@ -20,3 +27,8 @@ COPY ${DB_SCRIPT_DIR}/EcompSdkDDLMySql_3_2_Common.sql /docker-entrypoint-i COPY ${DB_SCRIPT_DIR}/EcompSdkDDLMySql_3_2_OS.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/EcompSdkDMLMySql_3_2_Common.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/EcompSdkDMLMySql_3_2_OS.sql /docker-entrypoint-initdb.d/ + +RUN chown $user:$group /opt /var -R +RUN chmod 777 /var/lib/mysql + +USER mysql diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java index 9f125b75..ae08a34b 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/ExternalSecurityConfig.java @@ -69,6 +69,11 @@ public class ExternalSecurityConfig extends WebSecurityConfigurerAdapter { return false; } }; + + + //Added this code to enable Raptor charts within Iframe + http.headers().frameOptions().sameOrigin(); + if(MusicUtil.isMusicEnable()) http.csrf().csrfTokenRepository(MusicCookieCsrfTokenRepository.withHttpOnlyFalse()).requireCsrfProtectionMatcher(csrfRequestMatcher); else |