Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend): switch to library version of argon2 #17

Merged
merged 2 commits into from
Nov 13, 2024
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
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Backend/security/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ kotlin {
dependencies {
implementation(project(":Backend:domain"))
implementation(libs.java.jwt)
implementation(libs.argon2.jvm)
implementation(libs.argon2.jvm.nolibs)
implementation(libs.kotlinx.datetime)
testImplementation(libs.argon2.jvm)
testImplementation(testLibs.kotlin.test)
testImplementation(testLibs.mockk)
}
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
FROM node:22-alpine AS buildFrontend
FROM node:22-alpine AS build_frontend
RUN corepack enable
COPY ./Frontend /home/node/src
WORKDIR /home/node/src
RUN pnpm i --frozen-lockfile
RUN pnpm build
RUN pnpm build --outDir ./dist

FROM eclipse-temurin:23-jdk-alpine AS buildBackend
FROM eclipse-temurin:23-jdk-alpine AS build_backend
COPY . /home/gradle/src
COPY --from=buildFrontend /home/node/src/dist /home/gradle/src/Backend/bootstrap/src/main/resources/static
COPY --from=build_frontend /home/node/src/dist /home/gradle/src/Backend/bootstrap/src/main/resources/static
WORKDIR /home/gradle/src
RUN ./gradlew shadowJar --no-daemon

FROM eclipse-temurin:23-jre-alpine
RUN apk add --no-cache argon2-libs
EXPOSE 8080:8080
RUN mkdir /app
COPY --from=buildBackend /home/gradle/src/Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
COPY --from=build_backend /home/gradle/src/Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
ENTRYPOINT ["java","-jar","/app/jasstracker.jar"]
1 change: 1 addition & 0 deletions DockerfileBuiltLocally
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM eclipse-temurin:23-jre-alpine
RUN apk add --no-cache argon2-libs
EXPOSE 8080:8080
RUN mkdir /app
COPY ./Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {

dependencyResolutionManagement {
versionCatalogs {
val kotlin = "2.1.0-Beta2"
val kotlin = "2.1.0-RC"
val mockk = "1.13.13"
val ktor = "3.0.1"
val logback = "1.5.12"
Expand Down Expand Up @@ -51,6 +51,7 @@ dependencyResolutionManagement {
library("postgresql", "org.postgresql", "postgresql").version(postgresql)
library("jooq", "org.jooq", "jooq").version(jooq)
library("java-jwt", "com.auth0", "java-jwt").version(javaJwt)
library("argon2-jvm-nolibs", "de.mkammerer", "argon2-jvm-nolibs").version(argon2)
library("argon2-jvm", "de.mkammerer", "argon2-jvm").version(argon2)
library("kotlin-reflect", "org.jetbrains.kotlin", "kotlin-reflect").version(kotlin)

Expand Down
Loading