-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Opprette kontrakt mellom processor og payload
Co-authored-by: Thomas Burnett <[email protected]> Co-authored-by: Alexander Petrov <[email protected]> Co-authored-by: Chris Olsen <[email protected]>
- Loading branch information
1 parent
5752897
commit b69f5be
Showing
19 changed files
with
124 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,5 @@ build | |
buildSrc/ | ||
ebms-provider/out/ | ||
cpa-repo/out/ | ||
felles/out/ | ||
payload-processor/out/ |
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
2 changes: 1 addition & 1 deletion
2
cpa-repo/src/main/kotlin/no/nav/emottak/cpa/config/DatabaseConfig.kt
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
*/ | ||
val githubPassword: String by project | ||
|
||
plugins { | ||
kotlin("jvm") version "1.9.0" | ||
kotlin("plugin.serialization") version "1.9.0" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri("https://maven.pkg.github.com/navikt/ebxml-protokoll") | ||
credentials { | ||
username = "x-access-token" | ||
password = githubPassword | ||
} | ||
} | ||
} | ||
|
||
tasks.register<Wrapper>("wrapper") { | ||
gradleVersion="8.1.1" | ||
} | ||
|
||
dependencies { | ||
implementation("no.nav.emottak:ebxml-protokoll:0.0.4") | ||
implementation("com.zaxxer:HikariCP:5.0.1") | ||
implementation("org.flywaydb:flyway-core:9.16.3") | ||
implementation("ch.qos.logback:logback-classic:1.4.11") | ||
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.4") | ||
api("org.bouncycastle:bcprov-jdk18on:1.76") | ||
api("org.bouncycastle:bcpkix-jdk18on:1.76") | ||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1") | ||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1") | ||
|
||
runtimeOnly("org.postgresql:postgresql:42.6.0") | ||
} |
37 changes: 37 additions & 0 deletions
37
felles/src/main/kotlin/no/nav/emottak/melding/model/Payload.kt
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,37 @@ | ||
package no.nav.emottak.melding.model | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
|
||
@Serializable | ||
data class PayloadRequest( | ||
val header: Header, | ||
val payload: ByteArray | ||
) | ||
|
||
@Serializable | ||
data class PayloadResponse( | ||
val processedPayload: ByteArray, | ||
val error: Error? = null | ||
) | ||
|
||
@Serializable | ||
data class Error(val message:String) | ||
|
||
|
||
@Serializable | ||
data class Header( | ||
val messageId: String, | ||
val conversationId: String, | ||
val cpaId: String, | ||
val to: Party, | ||
val from: Party, | ||
val service: String, | ||
val action: String | ||
) | ||
|
||
@Serializable | ||
data class Party( | ||
val herID: String, | ||
val role: String | ||
) |
4 changes: 2 additions & 2 deletions
4
...ain/kotlin/no/nav/emottak/cpa/EnvUtils.kt → ...in/kotlin/no/nav/emottak/util/EnvUtils.kt
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,7 +1,7 @@ | ||
package no.nav.emottak.cpa | ||
package no.nav.emottak.util | ||
|
||
fun getEnvVar(varName: String, defaultValue: String? = null) = | ||
System.getProperty(varName) ?: System.getenv(varName) ?: defaultValue ?: throw RuntimeException("Environment: Missing required variable \"$varName\"") | ||
System.getenv(varName) ?: System.getProperty(varName) ?: defaultValue ?: throw RuntimeException("Environment: Missing required variable \"$varName\"") | ||
|
||
fun String.fromEnv(): String = | ||
getEnvVar(this) |
4 changes: 4 additions & 0 deletions
4
felles/src/main/kotlin/no/nav/emottak/util/crypto/DecryptionException.kt
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,4 @@ | ||
package no.nav.emottak.util.crypto | ||
|
||
class DecryptionException(override val message: String) : Exception(message) { | ||
} |
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
4 changes: 4 additions & 0 deletions
4
felles/src/main/kotlin/no/nav/emottak/util/signatur/AlgorithmNotSupportedException.kt
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,4 @@ | ||
package no.nav.emottak.util.signatur | ||
|
||
class AlgorithmNotSupportedException(override val message: String) : Exception(message) { | ||
} |
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
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
4 changes: 2 additions & 2 deletions
4
payload-processor/src/main/kotlin/no/nav/emottak/melding/process/Signering.kt
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
13 changes: 0 additions & 13 deletions
13
payload-processor/src/main/kotlin/no/nav/emottak/util/CommonUtil.kt
This file was deleted.
Oops, something went wrong.
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