Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ scripts/dockerize/dockerfiles
/jdk_21_maven/cs/rest/redis-sample/target/
/jdk_21_maven/em/external/rest/redis-sample/target/
/jdk_21_maven/em/embedded/rest/redis-sample/target/
/jdk_21_maven/cs/rest/joinus/target/
/jdk_21_maven/em/external/rest/joinus/target/
/jdk_21_maven/em/embedded/rest/joinus/target/
/jdk_11_maven/em/embedded/rest/tracking-system/target/
/jdk_11_maven/em/external/rest/tracking-system/target/
/jdk_17_maven/em/embedded/rest/tiltaksgjennomforing/target/
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ How to setup authentication information, based on the current content of the ini
Auth configuration files can found in the [auth](auth) folder.


### REST: Java/Kotlin (39)
### REST: Java/Kotlin (40)

* **Bibliothek** (MIT), [jdk_17_gradle/cs/rest/bibliothek](jdk_17_gradle/cs/rest/bibliothek), from [https://github.com/PaperMC/bibliothek](https://github.com/PaperMC/bibliothek)

Expand All @@ -111,6 +111,8 @@ Auth configuration files can found in the [auth](auth) folder.

* **Jasper** (MIT), [jdk_25_maven/cs/rest/jasper](jdk_25_maven/cs/rest/jasper), from [https://github.com/cjmalloy/jasper](https://github.com/cjmalloy/jasper)

* **JoinUs** (not-known license), [jdk_21_maven/cs/rest/joinus](jdk_21_maven/cs/rest/joinus), from [https://github.com/KLAJDI16/joinUs](https://github.com/KLAJDI16/joinUs)

* **Languagetool** (LGPL), [jdk_8_maven/cs/rest/original/languagetool](jdk_8_maven/cs/rest/original/languagetool), from [https://github.com/languagetool-org/languagetool](https://github.com/languagetool-org/languagetool)

* **Market** (MIT), [jdk_11_maven/cs/rest-gui/market](jdk_11_maven/cs/rest-gui/market), from [https://github.com/aleksey-lukyanets/market](https://github.com/aleksey-lukyanets/market)
Expand Down
14 changes: 14 additions & 0 deletions auth/joinus-auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
auth:
- name: wfd_admin
loginEndpointAuth:
payloadRaw: "{\"userid\": \"wfd_admin\", \"password\": \"Wfd-Pass1\"}"
- name: wfd_user
loginEndpointAuth:
payloadRaw: "{\"userid\": \"wfd_user\", \"password\": \"Wfd-Pass2\"}"

authTemplate:
loginEndpointAuth:
endpoint: /login
verb: POST
contentType: application/json
expectCookies: true
13 changes: 13 additions & 0 deletions dockerfiles/joinus.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM amazoncorretto:21-alpine-jdk

COPY ./dist/joinus-sut.jar .
COPY ./dist/jacocoagent.jar .




ENTRYPOINT \
java \
-javaagent:jacocoagent.jar=output=tcpserver,address=*,port=6300,append=false,dumponexit=false \
-jar joinus-sut.jar \
--server.port=8080 --spring.mongodb.uri=mongodb://db:27017/joinUs --spring.neo4j.uri=bolt://neo4j:7687 --spring.neo4j.authentication.username=neo4j --spring.neo4j.authentication.password=wfdNeo4jPass123 --logging.level.org.mongodb.driver=INFO --logging.level.org.neo4j.driver=INFO --logging.level.org.springframework.security=INFO
56 changes: 56 additions & 0 deletions dockerfiles/joinus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
services:
mitmproxy:
image: mitmproxy/mitmproxy:10.2.4
user: "0:0"
environment:
MITM_LOG_DIR: /custom-logs
MITM_LOG_FILE: ${MITM_LOG_FILE:-minlog.csv}
command: >
mitmdump
--mode reverse:http://sut-joinus:8080
--listen-host 0.0.0.0
--listen-port 8080
--set keep_host_header=true
-s /addons/minlog.py
volumes:
- ${HOST_LOG_DIR:-./mitm-logs}:/custom-logs
- ./addons:/addons:ro
ports:
- "${HOST_PORT:-8080}:8080"
depends_on:
- sut-joinus
sut-joinus:
image: webfuzzing/wfd-joinus:FINAL
# build:
# dockerfile: ./dockerfiles/joinus.dockerfile
# context: ..
environment:
AUTH_PORT: ${AUTH_PORT:-8081}
ports:
- "${JACOCO_PORT:-6300}:6300"
depends_on:
db:
condition: service_healthy
neo4j:
condition: service_healthy
db:
image: mongo:7
volumes:
- ../scripts/dockerize/data/additional_files/joinus/joinus-mongo-seed.js:/docker-entrypoint-initdb.d/joinus-mongo-seed.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just realized this is problematic. and we do it for quite a few other APIs as well. i ll create a Trello to describe the issue, with possible workaround

healthcheck:
test: mongosh --quiet --eval "db.adminCommand('ping')"
interval: 30s
timeout: 30s
retries: 3
neo4j:
image: neo4j:5.26
environment:
NEO4J_AUTH: neo4j/wfdNeo4jPass123
volumes:
- ../scripts/dockerize/data/additional_files/joinus/joinus-neo4j-seed.cypher:/seed.cypher
healthcheck:
test: cypher-shell -u neo4j -p wfdNeo4jPass123 "MATCH (:WfdSeedComplete) RETURN 1"
interval: 30s
timeout: 30s
retries: 3
command: ["bash", "-c", '/startup/docker-entrypoint.sh neo4j & pid=$!; until cypher-shell -u neo4j -p wfdNeo4jPass123 "RETURN 1" >/dev/null 2>&1; do sleep 2; done; cypher-shell -u neo4j -p wfdNeo4jPass123 -f /seed.cypher; cypher-shell -u neo4j -p wfdNeo4jPass123 "CREATE (:WfdSeedComplete)"; wait $pid']
1 change: 1 addition & 0 deletions experiments/bb-exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def __init__(self, name, auth, sleep, schemaformat, classfiles):
"jdk_8_maven/cs/rest-gui/genome-nexus/web/target/classes"]),
Sut("gestaohospital",False,SLEEP,JSON,["jdk_8_maven/cs/rest-gui/gestaohospital/target/classes"]),
Sut("http-patch-spring",False,SLEEP,JSON,["jdk_11_maven/cs/rest/http-patch-spring/target/classes"]),
Sut("joinus",True,SLEEP,JSON,["jdk_21_maven/cs/rest/joinus/target/classes"]),
Sut("languagetool",False,SLEEP,JSON,["jdk_8_maven/cs/rest/original/languagetool/languagetool-core/target/classes",
"jdk_8_maven/cs/rest/original/languagetool/languagetool-gui-commons/target/classes",
"jdk_8_maven/cs/rest/original/languagetool/languagetool-language-modules/all/target/classes",
Expand Down
1 change: 1 addition & 0 deletions experiments/wb-exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def __init__(self, name, platform):
Sut("gestaohospital", JDK_8),
Sut("http-patch-spring", JDK_11),
Sut("jasper", JDK_25),
Sut("joinus", JDK_21),
Sut("languagetool", JDK_8),
Sut("market", JDK_11),
Sut("microcks", JDK_21),
Expand Down
1 change: 1 addition & 0 deletions jacoco.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ COPY jdk_8_maven/cs/rest-gui/genome-nexus/service/target/classes ${CLASS_FILES}
COPY jdk_8_maven/cs/rest-gui/genome-nexus/web/target/classes ${CLASS_FILES}/jdk_8_maven/cs/rest-gui/genome-nexus/web/target/classes
COPY jdk_8_maven/cs/rest-gui/gestaohospital/target/classes ${CLASS_FILES}/jdk_8_maven/cs/rest-gui/gestaohospital/target/classes
COPY jdk_11_maven/cs/rest/http-patch-spring/target/classes ${CLASS_FILES}/jdk_11_maven/cs/rest/http-patch-spring/target/classes
COPY jdk_21_maven/cs/rest/joinus/target/classes ${CLASS_FILES}/jdk_21_maven/cs/rest/joinus/target/classes
COPY jdk_8_maven/cs/rest/original/languagetool/languagetool-core/target/classes ${CLASS_FILES}/jdk_8_maven/cs/rest/original/languagetool/languagetool-core/target/classes
COPY jdk_8_maven/cs/rest/original/languagetool/languagetool-gui-commons/target/classes ${CLASS_FILES}/jdk_8_maven/cs/rest/original/languagetool/languagetool-gui-commons/target/classes
COPY jdk_8_maven/cs/rest/original/languagetool/languagetool-language-modules/all/target/classes ${CLASS_FILES}/jdk_8_maven/cs/rest/original/languagetool/languagetool-language-modules/all/target/classes
Expand Down
6 changes: 6 additions & 0 deletions jdk_21_maven/cs/rest/joinus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!-- MODIFIED-->
<!-- WFD expects a single self-contained "joinus-sut.jar". The classifier keeps
the plain jar as the main artifact, which the embedded driver depends on. -->
<finalName>joinus</finalName>
<classifier>sut</classifier>
<!-- MODIFIED-->
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
Expand Down
1 change: 1 addition & 0 deletions jdk_21_maven/cs/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


<modules>
<module>joinus</module>
<module>person-controller</module>
<module>redis-sample</module>
</modules>
Expand Down
52 changes: 52 additions & 0 deletions jdk_21_maven/em/embedded/rest/joinus/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>evomaster-benchmark-jdk21-em-embedded-rest-joinus</artifactId>
<packaging>jar</packaging>

<parent>
<groupId>org.evomaster</groupId>
<artifactId>evomaster-benchmark-jdk21-em-embedded-rest</artifactId>
<version>4.3.1-SNAPSHOT</version>
</parent>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>4.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- The SUT as a library -->
<dependency>
<groupId>com.example</groupId>
<artifactId>joinUs</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
</dependency>
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
</dependency>
</dependencies>

</project>
Loading
Loading