-
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.
Hent Altinn-tilganger via Fager sitt API (#832)
Bakgrunn Vi ønsker å gå over til Fager sitt API for henting av Altinn-tilganger for å gjøre fremtidig flytting av tilganger fra Altinn 2 til Altinn 3 enklere. (Fager sitt API henter og syr sammen tilganger fra både Altinn 2 og Altinn 3.) Løsning Bruk ny versjon av AltinnClient (Altinn3M2MClient), som henter rettigheter fra Fager sitt API ved hjelp av M2M-/Azure-token. Commits: * Bytt til Fager sitt API for å hente Altinn-tilganger * Legg til manglende konfig for å få Fager sitt Altinn-API til å virke pluss fiks integrasjonstester * Rens vekk gammel Maskinporten-moro som vi ikke trenger lenger * Fjern altinn fra external hosts fordi vi ikke lenger gjør kall direkte til Altinn * Bruk snapshotversjon av aller nyeste altinnklient * Deploy im altinn for å hente ny snapshotversjon av altinnclient med logging som forhåpentligvis fungerer * Deploy (igjen) for å forsøke å få med logging i dev * Oppgrader til nyeste AltinnClient
- Loading branch information
Showing
15 changed files
with
73 additions
and
159 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 |
---|---|---|
@@ -1,11 +1,7 @@ | ||
dependencies { | ||
val altinnClientVersion: String by project | ||
val maskinportenClientVersion: String by project | ||
val mockwebserverVersion: String by project | ||
val nimbusJoseJwtVersion: String by project | ||
|
||
implementation("no.nav.helsearbeidsgiver:altinn-client:$altinnClientVersion") | ||
implementation("no.nav.helsearbeidsgiver:maskinporten-client:$maskinportenClientVersion") | ||
testImplementation("com.nimbusds:nimbus-jose-jwt:$nimbusJoseJwtVersion") | ||
testImplementation("com.squareup.okhttp3:mockwebserver:$mockwebserverVersion") | ||
} |
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,4 +1,2 @@ | ||
altinnClientVersion=0.4.0 | ||
maskinportenClientVersion=0.1.9 | ||
altinnClientVersion=1.0.0 | ||
mockwebserverVersion=5.0.0-alpha.14 | ||
nimbusJoseJwtVersion=9.47 |
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
20 changes: 11 additions & 9 deletions
20
apps/altinn/src/main/kotlin/no/nav/helsearbeidsgiver/inntektsmelding/altinn/Env.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,17 +1,19 @@ | ||
package no.nav.helsearbeidsgiver.inntektsmelding.altinn | ||
|
||
import no.nav.helsearbeidsgiver.felles.utils.fromEnv | ||
import no.nav.helsearbeidsgiver.tokenprovider.OAuth2Environment | ||
|
||
object Env { | ||
val url = "ALTINN_URL".fromEnv() | ||
val serviceCode = "ALTINN_SERVICE_CODE".fromEnv() | ||
val altinnApiKey = "ALTINN_API_KEY".fromEnv() | ||
val altinnTilgangerBaseUrl = "ALTINN_TILGANGER_BASE_URL".fromEnv() | ||
|
||
object Maskinporten { | ||
val endpoint: String = "MASKINPORTEN_TOKEN_ENDPOINT".fromEnv() | ||
val issuer: String = "MASKINPORTEN_ISSUER".fromEnv() | ||
val clientJwk: String = "MASKINPORTEN_CLIENT_JWK".fromEnv() | ||
val clientId: String = "MASKINPORTEN_CLIENT_ID".fromEnv() | ||
val altinnScope: String = "ALTINN_SCOPE".fromEnv() | ||
} | ||
val oauth2Environment = | ||
OAuth2Environment( | ||
scope = "ALTINN_TILGANGER_SCOPE".fromEnv(), | ||
wellKnownUrl = "AZURE_APP_WELL_KNOWN_URL".fromEnv(), | ||
tokenEndpointUrl = "AZURE_OPENID_CONFIG_TOKEN_ENDPOINT".fromEnv(), | ||
clientId = "AZURE_APP_CLIENT_ID".fromEnv(), | ||
clientSecret = "AZURE_APP_CLIENT_SECRET".fromEnv(), | ||
clientJwk = "AZURE_APP_JWK".fromEnv(), | ||
) | ||
} |
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
Oops, something went wrong.