Skip to content

Commit

Permalink
1433: add project config for koblenz, fix import, adjust memory
Browse files Browse the repository at this point in the history
  • Loading branch information
f1sh1918 committed Jul 29, 2024
1 parent 60031cf commit eaacbc7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import app.ehrenamtskarte.backend.cards.CanonicalJson
import app.ehrenamtskarte.backend.common.utils.Environment
import app.ehrenamtskarte.backend.common.webservice.KOBLENZ_PEPPER_SYS_ENV
import app.ehrenamtskarte.backend.user.KoblenzUser
import app.ehrenamtskarte.backend.verification.CanonicalJson
import org.bouncycastle.crypto.generators.Argon2BytesGenerator
import org.bouncycastle.crypto.params.Argon2Parameters
import java.nio.charset.StandardCharsets
Expand Down Expand Up @@ -60,7 +60,7 @@ class Argon2IdHasher {
.withIterations(2)
.withSalt(pepperByteArray)
.withParallelism(1)
.withMemoryAsKB(19)
.withMemoryAsKB(16)
.build()

val generator = Argon2BytesGenerator()
Expand Down
11 changes: 11 additions & 0 deletions backend/src/main/resources/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ projects:
port: 587
username: OVERRIDE_IN_LOCAL_CONFIG
password: OVERRIDE_IN_LOCAL_CONFIG
- id: koblenz.sozialpass.app
importUrl: ""
pipelineName: SozialpassKoblenz
administrationBaseUrl: https://koblenz.sozialpass.app
administrationName: Koblenz-Pass-Verwaltung
timezone: "Europe/Berlin"
smtp:
host: mail.sozialpass.app
port: 587
username: OVERRIDE_IN_LOCAL_CONFIG
password: OVERRIDE_IN_LOCAL_CONFIG
- id: showcase.entitlementcard.app
importUrl: https://example.com
pipelineName: BerechtigungskarteShowcase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package app.ehrenamtskarte.backend.cards

import Card
import app.ehrenamtskarte.backend.cards.CanonicalJson.Companion.koblenzUserToString
import app.ehrenamtskarte.backend.helper.CardInfoTestSample
import app.ehrenamtskarte.backend.helper.ExampleCardInfo
import app.ehrenamtskarte.backend.helper.koblenzTestUser
import app.ehrenamtskarte.backend.verification.CanonicalJson.Companion.koblenzUserToString
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
Expand Down
3 changes: 1 addition & 2 deletions docs/CreateKoblenzHash.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Hash with Argon2id with the following parameters:
| Version | 19 |
| Iterations | 2 |
| Parallellism | 1 |
| Memory | 19 |
| Memory | 16 |
| HashLength | 32 |
| Salt | Secret Salt will be shared with Koblenz<br/>for the example use `123456789ABC` |

Expand All @@ -53,7 +53,6 @@ Hash with Argon2id with the following parameters:

`$argon2id$v=19$m=16,t=2,p=1$UIOJZIsSL8vXcuCB82xZ5E8tpH6sQd3d4U0uC02DP40`


## Additional Information

- Online Argon2 hasher: https://argon2.online/
Expand Down

0 comments on commit eaacbc7

Please sign in to comment.