-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from rwth-acis/releases/1.2.4
Releases/1.2.4
- Loading branch information
Showing
11 changed files
with
163 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,41 @@ | ||
FROM openjdk:17-jdk-alpine | ||
# first stage: build using gradle | ||
FROM --platform=${BUILDPLATFORM:-amd64} gradle:7.5.0-jdk17 AS build | ||
|
||
ENV GRADLE_OPTS="-Xmx2048m -Xms512m -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true" | ||
|
||
COPY --chown=gradle:gradle . /src | ||
WORKDIR /src | ||
RUN chmod -R a+rwx /src | ||
RUN chmod +x /src/docker-entrypoint.sh | ||
|
||
RUN gradle clean | ||
RUN gradle build --exclude-task test | ||
|
||
FROM --platform=amd64 openjdk:17-jdk-alpine | ||
|
||
ENV LAS2PEER_PORT=9011 | ||
|
||
RUN apk add --update bash mysql-client curl && rm -f /var/cache/apk/* | ||
|
||
RUN addgroup -g 1000 -S las2peer && \ | ||
adduser -u 1000 -S las2peer -G las2peer | ||
|
||
COPY --chown=las2peer:las2peer . /src | ||
WORKDIR /src | ||
|
||
RUN dos2unix docker-entrypoint.sh | ||
|
||
COPY --chown=las2peer:las2peer . /app | ||
WORKDIR /app | ||
RUN chmod -R a+rwx /app | ||
RUN chmod +x /app/docker-entrypoint.sh | ||
# run the rest as unprivileged user | ||
USER las2peer | ||
RUN chmod +x gradlew && ./gradlew build --exclude-task test | ||
|
||
COPY --from=build --chown=las2peer:las2peer /src/app/export /app/app/export/ | ||
COPY --from=build --chown=las2peer:las2peer /src/service /app/service/ | ||
COPY --from=build --chown=las2peer:las2peer /src/lib /app/lib/ | ||
|
||
RUN dos2unix /app/gradle.properties | ||
RUN dos2unix /app/docker-entrypoint.sh | ||
|
||
RUN dos2unix /app/etc/i5.las2peer.services.mobsos.dataProcessing.MobSOSDataProcessingService.properties.sample | ||
RUN mv /app/etc/i5.las2peer.services.mobsos.dataProcessing.MobSOSDataProcessingService.properties.sample /app/etc/i5.las2peer.services.mobsos.dataProcessing.MobSOSDataProcessingService.properties | ||
|
||
EXPOSE $LAS2PEER_PORT | ||
ENTRYPOINT ["/src/docker-entrypoint.sh"] | ||
ENTRYPOINT ["/app/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...n/java/i5/las2peer/services/mobsos/dataProcessing/XESEventMessageWithEncryptedAgents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package i5.las2peer.services.mobsos.dataProcessing; | ||
|
||
import org.apache.commons.codec.digest.DigestUtils; | ||
import org.json.simple.JSONObject; | ||
import org.json.simple.parser.JSONParser; | ||
import org.json.simple.parser.ParseException; | ||
|
||
import i5.las2peer.api.logging.MonitoringEvent; | ||
import i5.las2peer.logging.monitoring.MonitoringMessage; | ||
import i5.las2peer.logging.monitoring.XESEventMessage; | ||
|
||
/** | ||
* | ||
* Data class that takes a | ||
* {@link i5.las2peer.logging.monitoring.MonitoringMessage} and encrypts the | ||
* source and | ||
* destination agents as an MD5 hash-string for privacy reasons. Service | ||
* Messages will have an encrypted remarks field | ||
* as well to prevent service developers from gathering user specific | ||
* information via their custom service messages. | ||
* This is how data will be persisted in the database later on. | ||
* | ||
* @author Peter de Lange | ||
* | ||
*/ | ||
public class XESEventMessageWithEncryptedAgents extends MonitoringMessageWithEncryptedAgents { | ||
|
||
private String caseId; | ||
private String activityName; | ||
private String resourceId; | ||
private String resourceType; | ||
private String lifecyclePhase; | ||
private Long timeOfEvent; | ||
|
||
/** | ||
* | ||
* Constructor of a MonitoringMessageWithEncryptedAgents. | ||
* | ||
* @param eventMessage a | ||
* {@link i5.las2peer.logging.monitoring.MonitoringMessage} | ||
* @param hashRemarks Whether you want to hash the remarks or not | ||
* | ||
*/ | ||
public XESEventMessageWithEncryptedAgents(XESEventMessage eventMessage, boolean hashRemarks) { | ||
super(eventMessage, hashRemarks); | ||
this.caseId = eventMessage.getCaseId(); | ||
this.activityName = eventMessage.getActivityName(); | ||
this.resourceId = eventMessage.getResourceId(); | ||
this.resourceType = eventMessage.getResourceType(); | ||
this.lifecyclePhase = eventMessage.getLifecyclePhase(); | ||
this.timeOfEvent = eventMessage.getTimeOfEvent(); | ||
} | ||
|
||
public String getCaseId() { | ||
return caseId; | ||
} | ||
|
||
public String getActivityName() { | ||
return activityName; | ||
} | ||
|
||
public String getResourceId() { | ||
return resourceId; | ||
} | ||
|
||
public String getResourceType() { | ||
return resourceType; | ||
} | ||
|
||
public String getLifecyclePhase() { | ||
return lifecyclePhase; | ||
} | ||
|
||
public Long getTimeOfEvent() { | ||
return timeOfEvent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters