Skip to content

Commit

Permalink
Add support for Trygdeetaten Azure AD integration
Browse files Browse the repository at this point in the history
#deploy-proxy-yrkesskade

Updated configuration to include a new Azure AD application for Trygdeetaten and modified the application starter to use TrygdeetatenAzureAdTokenService for authentication. These changes facilitate seamless integration of Testnav Yrkesskade Proxy with Trygdeetaten's Azure AD instance.
  • Loading branch information
krharum committed Oct 2, 2024
1 parent 3b41eac commit d0558c1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 16 additions & 1 deletion proxies/yrkesskade-proxy/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
apiVersion: "nais.io/v1alpha1"
---
apiVersion: nais.io/v1
kind: AzureAdApplication
metadata:
name: testnav-yrkesskade-proxy-trygdeetaten
namespace: dolly
labels:
team: dolly
spec:
secretName: azure-trygdeetaten-testnav-yrkesskade-proxy-trygdeetaten
secretKeyPrefix: "AZURE_TRYGDEETATEN"
tenant: trygdeetaten.no
---
apiVersion: "nais.io/v1alpha1"
kind: "Application"
metadata:
name: testnav-yrkesskade-proxy
Expand Down Expand Up @@ -59,5 +72,7 @@ spec:
memory: 1025Mi
limits:
memory: 2048Mi
envFrom:
- secret: azure-trygdeetaten-testnav-yrkesskade-proxy-trygdeetaten
ingresses:
- "https://testnav-yrkesskade-proxy.intern.dev.nav.no"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import no.nav.testnav.libs.reactiveproxy.config.SecurityConfig;
import no.nav.testnav.libs.reactiveproxy.filter.AddAuthenticationRequestGatewayFilterFactory;
import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration;
import no.nav.testnav.libs.reactivesecurity.exchange.azuread.AzureAdTokenService;
import no.nav.testnav.libs.reactivesecurity.exchange.azuread.TrygdeetatenAzureAdTokenService;
import no.nav.testnav.libs.securitycore.domain.AccessToken;
import no.nav.testnav.proxies.yrkesskadeproxy.config.Consumers;
import org.springframework.boot.SpringApplication;
Expand Down Expand Up @@ -43,7 +43,7 @@ public RouteLocator customRouteLocator(RouteLocatorBuilder builder,

@Bean
GatewayFilter getAuthenticationFilter(
AzureAdTokenService tokenService,
TrygdeetatenAzureAdTokenService tokenService,
Consumers consumers) {

return AddAuthenticationRequestGatewayFilterFactory
Expand Down

0 comments on commit d0558c1

Please sign in to comment.