Skip to content
Closed
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 numberDiff line numberDiff line change
Expand Up@@ -326,6 +326,9 @@ scripts/dockerize/dockerfiles
/jdk_25_maven/cs/rest/commafeed/commafeed-client/target/
/jdk_25_maven/em/external/rest/commafeed/target/
/jdk_25_maven/em/embedded/rest/commafeed/target/
/jdk_25_maven/cs/rest/jasper/target/
/jdk_25_maven/em/external/rest/jasper/target/
/jdk_25_maven/em/embedded/rest/jasper/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 numberDiff line numberDiff 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 (37)
### REST: Java/Kotlin (38)

* **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@@ -109,6 +109,8 @@ Auth configuration files can found in the [auth](auth) folder.

* **HTTP Patch Spring** (MIT), [jdk_11_maven/cs/rest/http-patch-spring](jdk_11_maven/cs/rest/http-patch-spring), from [https://github.com/cassiomolin/http-patch-spring](https://github.com/cassiomolin/http-patch-spring)

* **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)

* **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
31 changes: 31 additions & 0 deletions auth/jasper-auth.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
auth:

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.

why jasper files in this PR?

- name: admin
fixedHeaders:
- name: User-Tag
value: +user/admin
- name: User-Role
value: ROLE_ADMIN
- name: X-XSRF-TOKEN
value: evomaster
- name: Cookie
value: XSRF-TOKEN=evomaster
- name: alice
fixedHeaders:
- name: User-Tag
value: +user/alice
- name: User-Role
value: ROLE_USER
- name: X-XSRF-TOKEN
value: evomaster
- name: Cookie
value: XSRF-TOKEN=evomaster
- name: bob
fixedHeaders:
- name: User-Tag
value: +user/bob
- name: User-Role
value: ROLE_USER
- name: X-XSRF-TOKEN
value: evomaster
- name: Cookie
value: XSRF-TOKEN=evomaster
17 changes: 17 additions & 0 deletions dockerfiles/jasper.dockerfile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
FROM amazoncorretto:25-alpine-jdk

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.

why jasper files in this PR?


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



#ENV TOOL="undefined"
#ENV RUN="0"

ENTRYPOINT \
java \
# unfortunately dumponexit is completely unreliable in Docker :(
# -javaagent:jacocoagent.jar=destfile=./jacoco/jasper__${TOOL}__${RUN}__jacoco.exec,append=false,dumponexit=true \
-javaagent:jacocoagent.jar=output=tcpserver,address=*,port=6300,append=false,dumponexit=false \
-jar jasper-sut.jar \
--server.port=8080 --spring.profiles.active=api-docs --spring.datasource.url=jdbc:postgresql://db:5432/jasper --spring.datasource.username=postgres --spring.datasource.password=password --spring.datasource.hikari.auto-commit=false --spring.jpa.database-platform=jasper.config.PostgreSQLDialect --springdoc.api-docs.path=/api/v3/api-docs --jasper.allow-user-tag-header=true --jasper.allow-user-role-header=true --jasper.allow-auth-headers=true
37 changes: 37 additions & 0 deletions dockerfiles/jasper.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
services:
mitmproxy:

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.

why jasper files in this PR?

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-jasper: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-jasper
sut-jasper:
build:
dockerfile: ./dockerfiles/jasper.dockerfile
context: ..
environment:
AUTH_PORT: ${AUTH_PORT:-8081}
ports:
- "${JACOCO_PORT:-6300}:6300"
db:
image: postgres:18
tmpfs:
- '/var/lib/postgresql'
environment:
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: jasper
1 change: 1 addition & 0 deletions experiments/wb-exp.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,6 +193,7 @@ def __init__(self, name, platform):
Sut("genome-nexus", JDK_8),
Sut("gestaohospital", JDK_8),
Sut("http-patch-spring", JDK_11),
Sut("jasper", JDK_25),
Sut("languagetool", JDK_8),
Sut("market", JDK_11),
Sut("microcks", JDK_21),
Expand Down
2 changes: 2 additions & 0 deletions jdk_21_maven/cs/rest/redis-sample/.gitattributes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
/mvnwtexteol=lf
*.cmdtexteol=crlf
33 changes: 33 additions & 0 deletions jdk_21_maven/cs/rest/redis-sample/.gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
logs

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
36 changes: 36 additions & 0 deletions jdk_21_maven/cs/rest/redis-sample/HELP.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
# Read Me First

The following was discovered as part of building this project:

* No Docker Compose services found. As of now, the application won't start! Please add at least one service to the
`compose.yaml` file.

# Getting Started

### Reference Documentation

For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.4.4/maven-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.4.4/maven-plugin/build-image.html)
* [Spring Configuration Processor](https://docs.spring.io/spring-boot/3.4.4/specification/configuration-metadata/annotation-processor.html)
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/3.4.4/reference/using/devtools.html)
* [Docker Compose Support](https://docs.spring.io/spring-boot/3.4.4/reference/features/dev-services.html#features.dev-services.docker-compose)

### Docker Compose support

This project contains a Docker Compose file named `compose.yaml`.

However, no services were found. As of now, the application won't start!

Please make sure to add at least one service in the `compose.yaml` file.

### Maven Parent overrides

Due to Maven's design, elements are inherited from the parent POM to the project POM.
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the
parent.
To prevent this, the project POM contains empty overrides for these elements.
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.

Loading
Loading