You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2022/11/17 10:35:01 UTC
[syncope] branch master updated: [SYNCOPE-1711] WA Docker image properly working (and some more Docker improvements)
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 6ca1c01fb4 [SYNCOPE-1711] WA Docker image properly working (and some more Docker improvements)
6ca1c01fb4 is described below
commit 6ca1c01fb4ebb1f217e321323656c5ea7e555206
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Thu Nov 17 11:34:51 2022 +0100
[SYNCOPE-1711] WA Docker image properly working (and some more Docker improvements)
---
.../jpa/entity/AbstractPlainAttrValue.java | 2 +-
.../core/spring/security/SecurityContext.java | 22 ++++--
docker/console/src/main/resources/Dockerfile | 3 +
docker/console/src/main/resources/startup.sh | 3 +-
docker/core/src/main/resources/Dockerfile | 3 +-
.../src/main/resources/core-ojson.properties} | 42 +++++------
docker/core/src/main/resources/startup.sh | 3 +-
docker/enduser/src/main/resources/Dockerfile | 3 +
docker/enduser/src/main/resources/startup.sh | 3 +-
docker/sra/src/main/resources/Dockerfile | 4 +
docker/sra/src/main/resources/startup.sh | 5 +-
.../docker-compose/docker-compose-all.yml | 10 +++
.../docker-compose/docker-compose-ojson.yml | 85 ++++++++++++++++++++++
.../docker-compose/docker-compose-oracle.yml | 85 ++++++++++++++++++++++
docker/wa/pom.xml | 13 ++++
docker/wa/src/main/resources/Dockerfile | 4 +
docker/wa/src/main/resources/startup.sh | 4 +-
docker/wa/src/main/resources/wa-docker.properties | 3 +
pom.xml | 2 +-
src/main/asciidoc/getting-started/obtain.adoc | 12 ++-
20 files changed, 261 insertions(+), 50 deletions(-)
diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
index 878be34543..12aeb95690 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractPlainAttrValue.java
@@ -140,7 +140,7 @@ public abstract class AbstractPlainAttrValue extends AbstractGeneratedKeyEntity
switch (schema.getType()) {
case Boolean:
- this.setBooleanValue(Boolean.parseBoolean(value));
+ this.setBooleanValue(Boolean.valueOf(value));
break;
case Long:
diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecurityContext.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecurityContext.java
index 56f0244e87..486ab1612d 100644
--- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecurityContext.java
+++ b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SecurityContext.java
@@ -76,16 +76,21 @@ public class SecurityContext {
@ConditionalOnMissingBean
@Bean
- public DefaultCredentialChecker credentialChecker(final SecurityProperties props,
- final JWSAlgorithm jwsAlgorithm) {
- return new DefaultCredentialChecker(jwsKey(jwsAlgorithm, props),
- props.getAdminPassword(), props.getAnonymousKey());
+ public DefaultCredentialChecker credentialChecker(
+ final SecurityProperties props,
+ final JWSAlgorithm jwsAlgorithm) {
+
+ return new DefaultCredentialChecker(
+ jwsKey(jwsAlgorithm, props),
+ props.getAdminPassword(),
+ props.getAnonymousKey());
}
@ConditionalOnMissingBean
@Bean
- public AccessTokenJWSVerifier accessTokenJWSVerifier(final JWSAlgorithm jwsAlgorithm,
- final SecurityProperties props)
+ public AccessTokenJWSVerifier accessTokenJWSVerifier(
+ final JWSAlgorithm jwsAlgorithm,
+ final SecurityProperties props)
throws JOSEException, NoSuchAlgorithmException, InvalidKeySpecException {
return new AccessTokenJWSVerifier(jwsAlgorithm, jwsKey(jwsAlgorithm, props));
@@ -93,8 +98,9 @@ public class SecurityContext {
@ConditionalOnMissingBean
@Bean
- public AccessTokenJWSSigner accessTokenJWSSigner(final JWSAlgorithm jwsAlgorithm,
- final SecurityProperties props)
+ public AccessTokenJWSSigner accessTokenJWSSigner(
+ final JWSAlgorithm jwsAlgorithm,
+ final SecurityProperties props)
throws KeyLengthException, NoSuchAlgorithmException, InvalidKeySpecException {
return new AccessTokenJWSSigner(jwsAlgorithm, jwsKey(jwsAlgorithm, props));
diff --git a/docker/console/src/main/resources/Dockerfile b/docker/console/src/main/resources/Dockerfile
index 7ab8f907f3..85b3e49e3a 100644
--- a/docker/console/src/main/resources/Dockerfile
+++ b/docker/console/src/main/resources/Dockerfile
@@ -33,9 +33,12 @@ COPY syncope-docker-console-*war /opt/syncope/lib/syncope-console.war
ENV SPRING_PROFILES_ACTIVE=docker
ENV LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
+ENV JAVA_OPTS="-Dfile.encoding=UTF-8 -Dwicket.ioc.useByteBuddy=true -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom"
COPY startup.sh /opt/syncope/bin
RUN chmod 755 /opt/syncope/bin/startup.sh
CMD ["/opt/syncope/bin/startup.sh"]
+RUN curl -o /usr/local/bin/wait-for-it https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod 755 /usr/local/bin/wait-for-it
+
EXPOSE 8080
diff --git a/docker/console/src/main/resources/startup.sh b/docker/console/src/main/resources/startup.sh
index 8b84e05637..7f35946bfd 100755
--- a/docker/console/src/main/resources/startup.sh
+++ b/docker/console/src/main/resources/startup.sh
@@ -17,5 +17,4 @@
# specific language governing permissions and limitations
# under the License.
-java -Dfile.encoding=UTF-8 -Dwicket.ioc.useByteBuddy=true -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
- -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -jar /opt/syncope/lib/syncope-console.war
+java $JAVA_OPTS -jar /opt/syncope/lib/syncope-console.war
diff --git a/docker/core/src/main/resources/Dockerfile b/docker/core/src/main/resources/Dockerfile
index 4339170ba9..1f7840f390 100644
--- a/docker/core/src/main/resources/Dockerfile
+++ b/docker/core/src/main/resources/Dockerfile
@@ -40,11 +40,12 @@ COPY lib/syncope-docker-core-*war /opt/syncope/lib/syncope.war
ENV SPRING_PROFILES_ACTIVE=docker
ENV LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
+ENV JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom"
COPY startup.sh /opt/syncope/bin
RUN chmod 755 /opt/syncope/bin/startup.sh
CMD ["/opt/syncope/bin/startup.sh"]
-RUN curl -o /usr/local/bin/wait-for-it https://github.com/vishnubob/wait-for-it/blob/master/wait-for-it.sh && chmod 755 /usr/local/bin/wait-for-it
+RUN curl -o /usr/local/bin/wait-for-it https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod 755 /usr/local/bin/wait-for-it
EXPOSE 8080
diff --git a/docker/enduser/src/main/resources/Dockerfile b/docker/core/src/main/resources/core-ojson.properties
similarity index 50%
copy from docker/enduser/src/main/resources/Dockerfile
copy to docker/core/src/main/resources/core-ojson.properties
index 9f6d4f389b..70731922ad 100644
--- a/docker/enduser/src/main/resources/Dockerfile
+++ b/docker/core/src/main/resources/core-ojson.properties
@@ -15,28 +15,20 @@
# specific language governing permissions and limitations
# under the License.
-FROM eclipse-temurin:17-focal
-MAINTAINER dev@syncope.apache.org
-
-RUN set -x
-
-RUN mkdir /opt/syncope
-RUN mkdir /opt/syncope/bin
-RUN mkdir /opt/syncope/conf
-RUN mkdir /opt/syncope/lib
-RUN mkdir /opt/syncope/log
-
-COPY *.properties /opt/syncope/conf/
-COPY *.json /opt/syncope/conf/
-COPY log4j2.xml /opt/syncope/conf/
-
-COPY syncope-docker-enduser-*war /opt/syncope/lib/syncope-enduser.war
-
-ENV SPRING_PROFILES_ACTIVE=docker
-ENV LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
-
-COPY startup.sh /opt/syncope/bin
-RUN chmod 755 /opt/syncope/bin/startup.sh
-CMD ["/opt/syncope/bin/startup.sh"]
-
-EXPOSE 8080
+persistence.domain[0].key=Master
+persistence.domain[0].jdbcDriver=oracle.jdbc.OracleDriver
+persistence.domain[0].jdbcURL=${DB_URL}
+persistence.domain[0].schema=${DB_SCHEMA}
+persistence.domain[0].dbUsername=${DB_USER}
+persistence.domain[0].dbPassword=${DB_PASSWORD}
+persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary
+persistence.domain[0].orm=META-INF/spring-orm-ojson.xml
+persistence.domain[0].auditSql=audit_ojson.sql
+persistence.domain[0].poolMaxActive=${DB_POOL_MAX}
+persistence.domain[0].poolMinIdle=${DB_POOL_MIN}
+
+persistence.indexesXML=classpath:ojson/indexes.xml
+persistence.viewsXML=classpath:ojson/views.xml
+
+provisioning.quartz.delegate=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
+provisioning.quartz.sql=tables_oracle.sql
diff --git a/docker/core/src/main/resources/startup.sh b/docker/core/src/main/resources/startup.sh
index f0007cf943..a853dc5c46 100755
--- a/docker/core/src/main/resources/startup.sh
+++ b/docker/core/src/main/resources/startup.sh
@@ -17,5 +17,4 @@
# specific language governing permissions and limitations
# under the License.
-java -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
- -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -jar /opt/syncope/lib/syncope.war
+java $JAVA_OPTS -jar /opt/syncope/lib/syncope.war
diff --git a/docker/enduser/src/main/resources/Dockerfile b/docker/enduser/src/main/resources/Dockerfile
index 9f6d4f389b..8f8ae39332 100644
--- a/docker/enduser/src/main/resources/Dockerfile
+++ b/docker/enduser/src/main/resources/Dockerfile
@@ -34,9 +34,12 @@ COPY syncope-docker-enduser-*war /opt/syncope/lib/syncope-enduser.war
ENV SPRING_PROFILES_ACTIVE=docker
ENV LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
+ENV JAVA_OPTS="-Dfile.encoding=UTF-8 -Dwicket.ioc.useByteBuddy=true -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom"
COPY startup.sh /opt/syncope/bin
RUN chmod 755 /opt/syncope/bin/startup.sh
CMD ["/opt/syncope/bin/startup.sh"]
+RUN curl -o /usr/local/bin/wait-for-it https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod 755 /usr/local/bin/wait-for-it
+
EXPOSE 8080
diff --git a/docker/enduser/src/main/resources/startup.sh b/docker/enduser/src/main/resources/startup.sh
index 371901cdde..9dffc6a604 100755
--- a/docker/enduser/src/main/resources/startup.sh
+++ b/docker/enduser/src/main/resources/startup.sh
@@ -17,5 +17,4 @@
# specific language governing permissions and limitations
# under the License.
-java -Dfile.encoding=UTF-8 -Dwicket.ioc.useByteBuddy=true -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
- -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -jar /opt/syncope/lib/syncope-enduser.war
+java $JAVA_OPTS -jar /opt/syncope/lib/syncope-enduser.war
diff --git a/docker/sra/src/main/resources/Dockerfile b/docker/sra/src/main/resources/Dockerfile
index 50951e793a..372e0509e5 100644
--- a/docker/sra/src/main/resources/Dockerfile
+++ b/docker/sra/src/main/resources/Dockerfile
@@ -32,9 +32,13 @@ COPY log4j2.xml /opt/syncope/conf/
COPY syncope-docker-sra-*jar /opt/syncope/lib/syncope-sra.jar
ENV SPRING_PROFILES_ACTIVE=docker
+ENV LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
+ENV JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -Dreactor.netty.http.server.accessLogEnabled=true"
COPY startup.sh /opt/syncope/bin
RUN chmod 755 /opt/syncope/bin/startup.sh
CMD ["/opt/syncope/bin/startup.sh"]
+RUN curl -o /usr/local/bin/wait-for-it https://github.com/vishnubob/wait-for-it/blob/master/wait-for-it.sh && chmod 755 /usr/local/bin/wait-for-it
+
EXPOSE 8080
diff --git a/docker/sra/src/main/resources/startup.sh b/docker/sra/src/main/resources/startup.sh
index df42979071..24fd54f691 100755
--- a/docker/sra/src/main/resources/startup.sh
+++ b/docker/sra/src/main/resources/startup.sh
@@ -17,7 +17,4 @@
# specific language governing permissions and limitations
# under the License.
-export LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
-java -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
- -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom \
- -Dreactor.netty.http.server.accessLogEnabled=true -jar /opt/syncope/lib/syncope-sra.jar
+java $JAVA_OPTS -jar /opt/syncope/lib/syncope-sra.jar
diff --git a/docker/src/main/resources/docker-compose/docker-compose-all.yml b/docker/src/main/resources/docker-compose/docker-compose-all.yml
index afaffa9f31..40bbeb1b4c 100644
--- a/docker/src/main/resources/docker-compose/docker-compose-all.yml
+++ b/docker/src/main/resources/docker-compose/docker-compose-all.yml
@@ -55,6 +55,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: http://syncope:8080/syncope/rest/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-console:
depends_on:
@@ -70,6 +72,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: http://syncope-console:8080/syncope-console/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-enduser:
depends_on:
@@ -85,6 +89,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: http://syncope-enduser:8080/syncope-enduser/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-wa:
depends_on:
@@ -100,6 +106,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: http://syncope-wa:8080/syncope-wa/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
CAS_SERVER_NAME: http://localhost:48080
syncope-sra:
@@ -116,3 +124,5 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: http://syncope-sra:8080/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
diff --git a/docker/src/main/resources/docker-compose/docker-compose-ojson.yml b/docker/src/main/resources/docker-compose/docker-compose-ojson.yml
new file mode 100644
index 0000000000..9e685831ab
--- /dev/null
+++ b/docker/src/main/resources/docker-compose/docker-compose-ojson.yml
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Full deployment (Core, Console, Enduser) on Oracle with JSON support
+
+version: '3.3'
+
+services:
+ db:
+ image: gvenzl/oracle-xe:21-slim
+ restart: always
+ environment:
+ ORACLE_PASSWORD: password
+ APP_USER: syncope
+ APP_USER_PASSWORD: syncope
+
+ syncope:
+ depends_on:
+ - db
+ command: ["wait-for-it", "db:3306", "-t", "60", "--", "/opt/syncope/bin/startup.sh"]
+ image: apache/syncope:${SYNCOPE_VERSION}
+ ports:
+ - "18080:8080"
+ restart: always
+ environment:
+ SPRING_PROFILES_ACTIVE: docker,ojson
+ DB_URL: jdbc:oracle:thin:@db:1521/XEPDB1
+ DB_SCHEMA: SYNCOPE
+ DB_USER: syncope
+ DB_PASSWORD: syncope
+ DB_POOL_MAX: 10
+ DB_POOL_MIN: 2
+ OPENJPA_REMOTE_COMMIT: sjvm
+ KEYMASTER_ADDRESS: http://localhost:8080/syncope/rest/keymaster
+ KEYMASTER_USERNAME: ${KEYMASTER_USERNAME}
+ KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD}
+ SERVICE_DISCOVERY_ADDRESS: http://syncope:8080/syncope/rest/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
+
+ syncope-console:
+ depends_on:
+ - syncope
+ image: apache/syncope-console:${SYNCOPE_VERSION}
+ ports:
+ - "28080:8080"
+ restart: always
+ environment:
+ SPRING_PROFILES_ACTIVE: docker
+ KEYMASTER_ADDRESS: http://syncope:8080/syncope/rest/keymaster
+ KEYMASTER_USERNAME: ${KEYMASTER_USERNAME}
+ KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD}
+ SERVICE_DISCOVERY_ADDRESS: http://syncope-console:8080/syncope-console/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
+
+ syncope-enduser:
+ depends_on:
+ - syncope
+ image: apache/syncope-enduser:${SYNCOPE_VERSION}
+ ports:
+ - "38080:8080"
+ restart: always
+ environment:
+ SPRING_PROFILES_ACTIVE: docker
+ KEYMASTER_ADDRESS: http://syncope:8080/syncope/rest/keymaster
+ KEYMASTER_USERNAME: ${KEYMASTER_USERNAME}
+ KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD}
+ SERVICE_DISCOVERY_ADDRESS: http://syncope-enduser:8080/syncope-enduser/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
diff --git a/docker/src/main/resources/docker-compose/docker-compose-oracle.yml b/docker/src/main/resources/docker-compose/docker-compose-oracle.yml
new file mode 100644
index 0000000000..d55731eaee
--- /dev/null
+++ b/docker/src/main/resources/docker-compose/docker-compose-oracle.yml
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Full deployment (Core, Console, Enduser) on Oracle
+
+version: '3.3'
+
+services:
+ db:
+ image: gvenzl/oracle-xe:21-slim
+ restart: always
+ environment:
+ ORACLE_PASSWORD: password
+ APP_USER: syncope
+ APP_USER_PASSWORD: syncope
+
+ syncope:
+ depends_on:
+ - db
+ command: ["wait-for-it", "db:3306", "-t", "60", "--", "/opt/syncope/bin/startup.sh"]
+ image: apache/syncope:${SYNCOPE_VERSION}
+ ports:
+ - "18080:8080"
+ restart: always
+ environment:
+ SPRING_PROFILES_ACTIVE: docker,oracle
+ DB_URL: jdbc:oracle:thin:@db:1521/XEPDB1
+ DB_SCHEMA: SYNCOPE
+ DB_USER: syncope
+ DB_PASSWORD: syncope
+ DB_POOL_MAX: 10
+ DB_POOL_MIN: 2
+ OPENJPA_REMOTE_COMMIT: sjvm
+ KEYMASTER_ADDRESS: http://localhost:8080/syncope/rest/keymaster
+ KEYMASTER_USERNAME: ${KEYMASTER_USERNAME}
+ KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD}
+ SERVICE_DISCOVERY_ADDRESS: http://syncope:8080/syncope/rest/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
+
+ syncope-console:
+ depends_on:
+ - syncope
+ image: apache/syncope-console:${SYNCOPE_VERSION}
+ ports:
+ - "28080:8080"
+ restart: always
+ environment:
+ SPRING_PROFILES_ACTIVE: docker
+ KEYMASTER_ADDRESS: http://syncope:8080/syncope/rest/keymaster
+ KEYMASTER_USERNAME: ${KEYMASTER_USERNAME}
+ KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD}
+ SERVICE_DISCOVERY_ADDRESS: http://syncope-console:8080/syncope-console/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
+
+ syncope-enduser:
+ depends_on:
+ - syncope
+ image: apache/syncope-enduser:${SYNCOPE_VERSION}
+ ports:
+ - "38080:8080"
+ restart: always
+ environment:
+ SPRING_PROFILES_ACTIVE: docker
+ KEYMASTER_ADDRESS: http://syncope:8080/syncope/rest/keymaster
+ KEYMASTER_USERNAME: ${KEYMASTER_USERNAME}
+ KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD}
+ SERVICE_DISCOVERY_ADDRESS: http://syncope-enduser:8080/syncope-enduser/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
diff --git a/docker/wa/pom.xml b/docker/wa/pom.xml
index 9f063a57c3..9f02c5b98e 100644
--- a/docker/wa/pom.xml
+++ b/docker/wa/pom.xml
@@ -33,6 +33,18 @@ under the License.
<artifactId>syncope-docker-wa</artifactId>
<packaging>war</packaging>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apereo.cas</groupId>
+ <artifactId>cas-server-support-bom</artifactId>
+ <version>${cas.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<properties>
<rootpom.basedir>${basedir}/../..</rootpom.basedir>
</properties>
@@ -150,6 +162,7 @@ under the License.
<directory>${basedir}/../../wa/starter/src/main/resources</directory>
<filtering>true</filtering>
<includes>
+ <include>cas-theme-default.properties</include>
<include>wa.properties</include>
</includes>
</resource>
diff --git a/docker/wa/src/main/resources/Dockerfile b/docker/wa/src/main/resources/Dockerfile
index 5a811fccaf..ea5b7a6caa 100644
--- a/docker/wa/src/main/resources/Dockerfile
+++ b/docker/wa/src/main/resources/Dockerfile
@@ -32,9 +32,13 @@ COPY log4j2.xml /opt/syncope/conf/
COPY syncope-docker-wa-*war /opt/syncope/lib/syncope-wa.war
ENV SPRING_PROFILES_ACTIVE=docker
+ENV LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
+ENV JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom"
COPY startup.sh /opt/syncope/bin
RUN chmod 755 /opt/syncope/bin/startup.sh
CMD ["/opt/syncope/bin/startup.sh"]
+RUN curl -o /usr/local/bin/wait-for-it https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod 755 /usr/local/bin/wait-for-it
+
EXPOSE 8080
diff --git a/docker/wa/src/main/resources/startup.sh b/docker/wa/src/main/resources/startup.sh
index 68c70da4ac..71ee91a9e5 100755
--- a/docker/wa/src/main/resources/startup.sh
+++ b/docker/wa/src/main/resources/startup.sh
@@ -17,6 +17,4 @@
# specific language governing permissions and limitations
# under the License.
-export LOADER_PATH="/opt/syncope/conf,/opt/syncope/lib"
-java -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
- -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -jar /opt/syncope/lib/syncope-wa.war
+java $JAVA_OPTS -jar /opt/syncope/lib/syncope-wa.war
diff --git a/docker/wa/src/main/resources/wa-docker.properties b/docker/wa/src/main/resources/wa-docker.properties
index 238772782e..024729f11c 100644
--- a/docker/wa/src/main/resources/wa-docker.properties
+++ b/docker/wa/src/main/resources/wa-docker.properties
@@ -29,4 +29,7 @@ service.discovery.address=${SERVICE_DISCOVERY_ADDRESS}
wa.anonymousUser=${ANONYMOUS_USER:anonymous}
wa.anonymousKey=${ANONYMOUS_KEY:anonymousKey}
+spring.security.user.name=${ANONYMOUS_USER:anonymous}
+spring.security.user.password=${ANONYMOUS_KEY:anonymousKey}
+
logging.config=file:///opt/syncope/conf/log4j2.xml
diff --git a/pom.xml b/pom.xml
index 41b2b199e1..dea8c49f94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -432,7 +432,7 @@ under the License.
<slf4j.version>1.7.36</slf4j.version>
- <elasticsearch.version>8.5.0</elasticsearch.version>
+ <elasticsearch.version>8.5.1</elasticsearch.version>
<apacheds.version>2.0.0.AM26</apacheds.version>
<apachedirapi.version>2.0.0</apachedirapi.version>
diff --git a/src/main/asciidoc/getting-started/obtain.adoc b/src/main/asciidoc/getting-started/obtain.adoc
index 1654a1b6cf..e4d46801b9 100644
--- a/src/main/asciidoc/getting-started/obtain.adoc
+++ b/src/main/asciidoc/getting-started/obtain.adoc
@@ -307,6 +307,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: https://syncope:8080/syncope/rest/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-console: // <4>
depends_on:
@@ -322,6 +324,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: https://syncope-console:8080/syncope-console/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-enduser: // <5>
depends_on:
@@ -337,6 +341,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: https://syncope-enduser:8080/syncope-enduser/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-wa: // <6>
depends_on:
@@ -353,6 +359,8 @@ services:
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: https://syncope-wa:8080/syncope-wa/
CAS_SERVER_NAME: http://localhost:48080
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
syncope-sra: // <7>
depends_on:
@@ -368,6 +376,8 @@ services:
KEYMASTER_USERNAME: ${KEYMASTER_USERNAME:-}
KEYMASTER_PASSWORD: ${KEYMASTER_PASSWORD:-}
SERVICE_DISCOVERY_ADDRESS: https://syncope-sra:8080/
+ ANONYMOUS_USER: ${ANONYMOUS_USER}
+ ANONYMOUS_KEY: ${ANONYMOUS_KEY}
----
<1> Apache Syncope Keymaster, based on https://zookeeper.apache.org/[Apache Zookeeper^]
<2> Database container for usage as internal storage, based on latest PostgreSQL image available
@@ -385,7 +395,7 @@ services:
+
[source,bash]
----
-$ docker-compose -f /path/to/docker-compose.yml up
+$ docker compose -f /path/to/docker-compose.yml up
----
The following services will be available: