Skip to content

Commit

Permalink
Fjern en del referanser til loginservice og ubrukte access policies
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbb committed Sep 1, 2023
1 parent 03e6f9e commit 607a91d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 29 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Altinn-proxy
============

Denne appen er en proxy mot Altinn sine tjenester til arbeidsgiver.
Denne appen er en proxy mot Altinn sine tjenester til arbeidsgiver.
Dere må bruke [TokenX](https://doc.nais.io/security/auth/tokenx/) når dere kaller oss.

Vi har et java/kotlin bibliotek [altinn-rettigheter-proxy-klient](https://github.com/navikt/altinn-rettigheter-proxy-klient) som gjør det lettere å bruke denne proxyen. Den har
bl.a. støtte for fall-back til Altinns API.

Expand All @@ -28,8 +30,6 @@ accessPolicy:
cluster: dev-gcp/prod-gcp
```
Vi anbefaler på det sterkeste å bruke TokenX, da vi ønsker å fjerne støtten for å bruke loginservice direkte.
I dev, så er det også en vanlig ingress tilgjengelig, `https://altinn-rettigheter-proxy.intern.dev.nav.no/altinn-rettigheter-proxy`, som dere kan bruke uten å måtte oppdatere vår access policy.

# Hvordan ta i bruk proxyen (FSS)
Expand All @@ -53,11 +53,6 @@ accessPolicy:
cluster: dev-gcp/prod-gcp
```

Vi anbefaler på det sterkeste å bruke TokenX, da vi ønsker å fjerne støtten for å bruke loginservice direkte.




# Kjøre lokalt: komme i gang

Koden kan kjøres som en vanlig Spring Boot-applikasjon fra AltinnrettigheterproxyApplication.
Expand Down
12 changes: 0 additions & 12 deletions nais/dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ spec:
accessPolicy:
inbound:
rules:
- application: klage-permittering-refusjon-api
namespace: teamloennskomp
cluster: dev-fss

- application: permittering-refusjon-api
namespace: teamloennskomp
cluster: dev-fss

- application: sykefravarsstatistikk-api
namespace: arbeidsgiver
cluster: dev-fss
Expand All @@ -74,10 +66,6 @@ spec:
- application: permitteringsportal-api
namespace: permittering-og-nedbemanning

- application: innsyn-aareg-api
namespace: fager
cluster: dev-fss

- application: aareg-innsyn-arbeidsgiver-api
namespace: arbeidsforhold
cluster: dev-fss
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ApiTest {
val response = HttpClient.newBuilder().build().send(
HttpRequest.newBuilder()
.uri(URI("http://localhost:$port/altinn-rettigheter-proxy/organisasjoner?serviceCode=3403&serviceEdition=1"))
.header(AUTHORIZATION, "Bearer ${testTokenUtil.createToken(issuerId = "loginservice", pid = "01065500791")}")
.header(AUTHORIZATION, "Bearer ${testTokenUtil.createToken(issuerId = "tokenx", pid = "01065500791")}")
.header("X-Correlation-ID", "klient-applikasjon")
.GET()
.build(),
Expand All @@ -65,7 +65,7 @@ class ApiTest {
issuerId = "tokenx",
sub = "01065500791",
pid = "01065500791",
idp = "https://navtestb2c.b2clogin.com/1234"
idp = "https://xyz.com/1234"
)
)
.header("X-Correlation-ID", "klient-applikasjon")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestTokenUtil(
) {
fun createToken(
pid: String,
issuerId: String = "loginservice",
issuerId: String = "tokenx",
idp: String? = null,
sub: String = "foo",
): String =
Expand Down
3 changes: 0 additions & 3 deletions src/test/resources/application-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ altinn:

no.nav.security.jwt:
issuer:
loginservice:
discoveryurl: http://localhost:${mock-oauth2-server.port}/loginservice/.well-known/openid-configuration
acceptedaudience: someaudience
tokenx:
discoveryurl: http://localhost:${mock-oauth2-server.port}/tokenx/.well-known/openid-configuration
accepted_audience: someaudience
3 changes: 0 additions & 3 deletions src/test/resources/application-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ altinn:

no.nav.security.jwt:
issuer:
loginservice:
discoveryurl: http://localhost:${mock-oauth2-server.port}/loginservice/.well-known/openid-configuration
acceptedaudience: someaudience
tokenx:
discoveryurl: http://localhost:${mock-oauth2-server.port}/tokenx/.well-known/openid-configuration
accepted_audience: someaudience
Expand Down

0 comments on commit 607a91d

Please sign in to comment.