From a303e5a802f514453cf0c880e52933049ed129c7 Mon Sep 17 00:00:00 2001 From: stigus Date: Thu, 26 Oct 2023 12:34:54 +0200 Subject: [PATCH] =?UTF-8?q?Oppdateringer,=20refaktorert=20SecurityConfig?= =?UTF-8?q?=20for=20resterende=20apper=20Fikset=20KRR=20frontend=20til=20?= =?UTF-8?q?=C3=A5=20tydelig=20vise=20hva=20som=20godtas=20p=C3=A5=20mobiln?= =?UTF-8?q?r=20format=20Endret=20Pensjon=20FraOgMed=20til=20=C3=A5=20kun?= =?UTF-8?q?=20gi=20gyldige=20alternativer,=20alts=C3=A5=20=C3=A5r=20fra=20?= =?UTF-8?q?og=20med=20ident=20er=20fylt=20sytten=20#deploy-test-frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adresseservice/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 2 +- .../config/SecurityConfig.java | 2 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../brukerservice/config/SecurityConfig.java | 2 +- .../web/config/IdportenSecurityConfig.java | 44 ++++++------ .../dolly/web/config/LocalSecurityConfig.java | 43 ++++++------ .../nav/dolly/web/config/SecurityConfig.java | 10 ++- .../src/main/js/package-lock.json | 67 ++++++++++--------- apps/dolly-frontend/src/main/js/package.json | 2 +- .../fagsystem/krrstub/form/Form.tsx | 1 - .../fagsystem/pensjon/form/Form.tsx | 16 ++++- .../config/SecurityConfig.java | 15 +++-- .../config/SecurityConfig.java | 2 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 13 ++-- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../hodejegeren/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 2 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../miljoerservice/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 14 ++-- .../config/SecurityConfig.java | 2 +- .../orgnrservice/config/SecurityConfig.java | 3 +- .../pdl/forvalter/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../consumer/dto/LandkodeEncoder.java | 5 +- .../config/SecurityConfig.java | 2 +- .../config/SecurityConfig.java | 2 +- .../config/SecurityConfig.java | 3 +- .../personservice/config/SecurityConfig.java | 3 +- .../v1/pdl/graphql/Bostedsadresse.java | 2 + .../consumer/v1/pdl/graphql/Foedsel.java | 2 + .../graphql/Folkeregisteridentifikator.java | 2 + .../graphql/Folkeregisterpersonstatus.java | 2 + .../consumer/v1/pdl/graphql/Navn.java | 2 + .../profil/config/SecurityConfiguration.java | 3 +- .../sykemelding/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../identpool/config/SecurityConfig.java | 3 +- .../registre/tp/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../no/nav/udistub/config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 3 +- .../config/SecurityConfig.java | 2 +- .../reactiveproxy/config/SecurityConfig.java | 2 +- .../tokendingsmock/config/SecurityConfig.java | 2 +- .../tokendingsmock/config/SecurityConfig.java | 2 +- 66 files changed, 219 insertions(+), 159 deletions(-) diff --git a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java index fcbddbaf8b3..873a539a747 100644 --- a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java +++ b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -20,7 +21,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/SecurityConfig.java b/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/SecurityConfig.java index 7fcae4204a5..49a1dd71577 100644 --- a/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/SecurityConfig.java +++ b/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/SecurityConfig.java @@ -22,7 +22,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/SecurityConfig.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/SecurityConfig.java index b9b65670b2f..e6a693174af 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/SecurityConfig.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/SecurityConfig.java @@ -23,7 +23,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java index 4a8cb1ae4a3..1557cf6b9df 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java index f036df45948..224a0415f32 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java index 445fc51198b..a4d6b183de8 100644 --- a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java +++ b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/SecurityConfig.java b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/SecurityConfig.java index 069237b983e..e49e518c090 100644 --- a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/SecurityConfig.java +++ b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/SecurityConfig.java @@ -23,7 +23,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/IdportenSecurityConfig.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/IdportenSecurityConfig.java index a68f16c69c5..50c63387753 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/IdportenSecurityConfig.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/IdportenSecurityConfig.java @@ -48,34 +48,32 @@ public SecurityWebFilterChain configure(ServerHttpSecurity http) { var logoutSuccessHandler = new LogoutSuccessHandler(); logoutSuccessHandler.applyOn("idporten", new IdportenOcidLogoutUrlResolver(wellKnownUrl, postLogoutRedirectUri)); - return http.cors() - .and().csrf().disable() - .authorizeExchange() - .pathMatchers( - "/internal/isReady", - "/internal/isAlive", - "/assets/*", - "/internal/metrics", - "/oauth2/callback", - "/favicon.ico", - LOGIN, - LOGOUT, - "/oauth2/logout", - "/*.css", - "/*.js", - "/*.mjs", - "/*.png" - ).permitAll() - .anyExchange().authenticated() - .and().oauth2Login(oAuth2LoginSpec -> oAuth2LoginSpec + return http.cors(ServerHttpSecurity.CorsSpec::disable) + .csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeExchangeSpec -> authorizeExchangeSpec.pathMatchers( + "/internal/isReady", + "/internal/isAlive", + "/assets/*", + "/internal/metrics", + "/oauth2/callback", + "/favicon.ico", + LOGIN, + LOGOUT, + "/oauth2/logout", + "/*.css", + "/*.js", + "/*.mjs", + "/*.png" + ).permitAll() + .anyExchange().authenticated()) + .oauth2Login(oAuth2LoginSpec -> oAuth2LoginSpec .authenticationManager(authenticationManger) .authenticationSuccessHandler(authenticationSuccessHandler)) - .formLogin().loginPage(LOGIN) - .and().logout(logoutSpec -> logoutSpec + .formLogin(formLoginSpec -> formLoginSpec.loginPage(LOGIN)) + .logout(logoutSpec -> logoutSpec .logoutUrl(LOGOUT) .requiresLogout(ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, LOGOUT)) .logoutSuccessHandler(logoutSuccessHandler)) .build(); } - } diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalSecurityConfig.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalSecurityConfig.java index 52ad0d6e004..2fdf751b210 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalSecurityConfig.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalSecurityConfig.java @@ -29,29 +29,28 @@ public SecurityWebFilterChain configure(ServerHttpSecurity http) { var authenticationSuccessHandler = new DollyAuthenticationSuccessHandler(); var logoutSuccessHandler = new LogoutSuccessHandler(); - return http.cors() - .and().csrf().disable() - .authorizeExchange() - .pathMatchers( - "/internal/isReady", - "/internal/isAlive", - "/assets/*", - "/internal/metrics", - "/oauth2/callback", - "/favicon.ico", - LOGIN, - LOGOUT, - "/oauth2/logout", - "/*.css", - "/*.js", - "/*.mjs", - "/*.png" - ).permitAll() - .anyExchange().authenticated() - .and().oauth2Login(oAuth2LoginSpec -> oAuth2LoginSpec + return http.cors(ServerHttpSecurity.CorsSpec::disable) + .csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeExchangeSpec -> authorizeExchangeSpec.pathMatchers( + "/internal/isReady", + "/internal/isAlive", + "/assets/*", + "/internal/metrics", + "/oauth2/callback", + "/favicon.ico", + LOGIN, + LOGOUT, + "/oauth2/logout", + "/*.css", + "/*.js", + "/*.mjs", + "/*.png" + ).permitAll() + .anyExchange().authenticated()) + .oauth2Login(oAuth2LoginSpec -> oAuth2LoginSpec .authenticationSuccessHandler(authenticationSuccessHandler)) - .formLogin().loginPage(LOGIN) - .and().logout(logoutSpec -> logoutSpec + .formLogin(formLoginSpec -> formLoginSpec.loginPage(LOGIN)) + .logout(logoutSpec -> logoutSpec .logoutUrl(LOGOUT) .requiresLogout(ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, LOGOUT)) .logoutSuccessHandler(logoutSuccessHandler)) diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/SecurityConfig.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/SecurityConfig.java index 6fd128b9ba6..40d52dd18a1 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/SecurityConfig.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/SecurityConfig.java @@ -29,12 +29,10 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain configure(ServerHttpSecurity http) { - http.cors() - .and().csrf().disable() - .authorizeExchange() - .anyExchange() - .permitAll() - .and().oauth2ResourceServer().jwt(jwt -> jwtDecoder()); + http.cors(ServerHttpSecurity.CorsSpec::disable) + .csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeExchangeSpec -> authorizeExchangeSpec.anyExchange().permitAll()) + .oauth2ResourceServer(oAuth2ResourceServerSpec -> oAuth2ResourceServerSpec.jwt(jwtSpec -> jwtDecoder())); return http.build(); } diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index 169c23c12b5..6430bcca7f8 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "dolly", - "version": "2.5.27", + "version": "2.5.28", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "2.5.27", + "version": "2.5.28", "license": "ISC", "dependencies": { "@babel/preset-flow": "^7.18.6", @@ -1146,9 +1146,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", - "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -3342,12 +3342,12 @@ } }, "node_modules/@types/node": { - "version": "20.8.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.8.tgz", - "integrity": "sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==", + "version": "20.8.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz", + "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==", "dev": true, "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~5.26.4" } }, "node_modules/@types/parse-json": { @@ -3361,9 +3361,9 @@ "integrity": "sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==" }, "node_modules/@types/react": { - "version": "18.2.31", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.31.tgz", - "integrity": "sha512-c2UnPv548q+5DFh03y8lEDeMfDwBn9G3dRwfkrxQMo/dOtRHUUO57k6pHvBIfH/VF4Nh+98mZ5aaSe+2echD5g==", + "version": "18.2.33", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.33.tgz", + "integrity": "sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -4978,9 +4978,9 @@ } }, "node_modules/cpx2": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cpx2/-/cpx2-6.0.0.tgz", - "integrity": "sha512-QS7Wtdg5zE2bMCNbCCCX2B5c+ApErTGQ++DbMYhHwpjJvI3I2SNwye4OYPccCYxWqQn0Lh3kI0HdivuSxLbF+w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/cpx2/-/cpx2-6.0.1.tgz", + "integrity": "sha512-yzeVueRl+HtxHYmaDnnFdpXkAocqtPD9STTh61m4GpX4B6+oFB/ClsoJLXwjj9lguA0Ry2EpLvWIpRJ/x0bWbw==", "dev": true, "dependencies": { "debounce": "^1.2.0", @@ -5186,10 +5186,13 @@ } }, "node_modules/cypress/node_modules/@types/node": { - "version": "18.18.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", - "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", - "dev": true + "version": "18.18.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", + "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/cypress/node_modules/ansi-styles": { "version": "4.3.0", @@ -5729,9 +5732,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.566", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz", - "integrity": "sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg==" + "version": "1.4.567", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.567.tgz", + "integrity": "sha512-8KR114CAYQ4/r5EIEsOmOMqQ9j0MRbJZR3aXD/KFA8RuKzyoUB4XrUCg+l8RUGqTVQgKNIgTpjaG8YHRPAbX2w==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -10131,14 +10134,14 @@ } }, "node_modules/react-inlinesvg": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/react-inlinesvg/-/react-inlinesvg-4.0.6.tgz", - "integrity": "sha512-4kByDS+0Ah3sNX9m0qS0SGafiQInz+nRksPFL1aTkmK5ExQYT9kjqQBUwhIFPvZyS/rxDLg9i56lYpHMJz7heg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/react-inlinesvg/-/react-inlinesvg-4.1.0.tgz", + "integrity": "sha512-S7kSE6ldKVpumEYTNXmCs4pAKoDzklP6TklI8oBx23fw8/+VBwO5X0M7/Ii0weieO1DqElUJg5EI8cq7zo5oPg==", "dependencies": { "react-from-dom": "^0.6.2" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "16.8 - 18" } }, "node_modules/react-is": { @@ -11008,9 +11011,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.69.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.4.tgz", - "integrity": "sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==", + "version": "1.69.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", + "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -12243,9 +12246,9 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, "node_modules/universalify": { diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index f1cbd0b12a5..9245e1092c3 100644 --- a/apps/dolly-frontend/src/main/js/package.json +++ b/apps/dolly-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "dolly", - "version": "2.5.27", + "version": "2.5.28", "description": "", "main": "index.js", "scripts": { diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/Form.tsx index dc89eadb151..97c9aeb68b6 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/Form.tsx @@ -73,7 +73,6 @@ export const KrrstubForm = ({ formikBag }: KrrstubFormProps) => { fastfield={false} /> - TODO: FIKSE DENNE TIL Å VISE TYDELIG AT +47xxx ER RIKTIG FORMAT { const opts = useContext(BestillingsveilederContext) const { nyBestilling, nyBestillingFraMal } = opts?.is + function kalkulerIdentFyltSyttenAar(values: FormikProps) { + const curDate = new Date() + const alder = + _.has(values, 'pdldata.opprettNyPerson.foedtEtter') && + _.get(values, 'pdldata.opprettNyPerson.foedtEtter') !== null + ? curDate.getFullYear() - + // @ts-ignore + new Date(_.get(values, 'pdldata.opprettNyPerson.foedtEtter')).getFullYear() + : _.get(values, 'pdldata.opprettNyPerson.alder') + return alder && curDate.getFullYear() - alder + 17 + } + + const syttenFraOgMedAar = kalkulerIdentFyltSyttenAar(formikBag.values) const minAar = new Date().getFullYear() - 17 const valgtAar = _.get(formikBag.values, `${pensjonPath}.fomAar`) @@ -48,7 +62,7 @@ export const PensjonForm = ({ formikBag }) => { diff --git a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/SecurityConfig.java b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/SecurityConfig.java index 389b116da0f..a6633b0baec 100644 --- a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/SecurityConfig.java +++ b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/SecurityConfig.java @@ -13,12 +13,13 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.cors().and().csrf() - .disable() - .authorizeExchange() - .pathMatchers("/internal/isReady", "/internal/isAlive", "/internal/metrics").permitAll() - .anyExchange().authenticated() - .and().oauth2Login() - .and().build(); + return http.cors(ServerHttpSecurity.CorsSpec::disable) + .csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeExchangeSpec -> authorizeExchangeSpec + .pathMatchers("/internal/isReady", "/internal/isAlive", "/internal/metrics").permitAll() + .anyExchange().authenticated()) + .oauth2Login(oAuth2LoginSpec -> { + }) + .build(); } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/SecurityConfig.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/SecurityConfig.java index 98cf1b252d5..7c7024dda99 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/SecurityConfig.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/SecurityConfig.java @@ -22,7 +22,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java index ec6102ed65e..11037bdd77f 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/SecurityConfig.java b/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/SecurityConfig.java index 5f66c77eefb..2ece99b9639 100644 --- a/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/SecurityConfig.java +++ b/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/SecurityConfig.java @@ -12,11 +12,12 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) { - return http.csrf().disable() - .authorizeExchange() - .pathMatchers("/internal/isReady", "/internal/isAlive", "/internal/metrics").permitAll() - .anyExchange().authenticated() - .and().oauth2Login() - .and().build(); + return http.csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeExchangeSpec -> authorizeExchangeSpec + .pathMatchers("/internal/isReady", "/internal/isAlive", "/internal/metrics").permitAll() + .anyExchange().authenticated()) + .oauth2Login(oAuth2LoginSpec -> { + }) + .build(); } } diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java index c46b340b94e..60193328810 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -19,7 +20,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java b/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java index d36bdb17e42..7666c1c71e7 100644 --- a/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java +++ b/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java index 7f375e30b44..20b33c217d0 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java +++ b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java b/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java index 4e39146fb0b..7afec2e6aac 100644 --- a/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java +++ b/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java index 0c00757d26a..44a64d34ac0 100644 --- a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java +++ b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -20,7 +21,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java b/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java index 71c4b77899a..1f3aba47802 100644 --- a/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java +++ b/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java index 34cdc116f83..d92f159d314 100644 --- a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java +++ b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.core.annotation.Order; import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -22,7 +23,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/SecurityConfig.java b/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/SecurityConfig.java index 34606fbf39f..c2ce826076a 100644 --- a/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/SecurityConfig.java +++ b/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/SecurityConfig.java @@ -24,7 +24,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java index 468bfaf9797..741ed3d5b58 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java index 5b000179273..32c19a92645 100644 --- a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java +++ b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java index c79dd76bd47..94b83eb367d 100644 --- a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java +++ b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -17,7 +18,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java index 6f9c33b1657..59c3b468d2a 100644 --- a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java +++ b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java index 7a32a601cb7..cdd85300ff8 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java index baac159e439..e2ff569c353 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -19,7 +20,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java index 2ea35fda1cd..919c6410571 100644 --- a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java +++ b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java index 16e870da80d..e35bce24978 100644 --- a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java +++ b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java index c08b413ce91..768014691e3 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java index d6bef8d9f4a..6466efa4681 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java index e117013c75a..a3e11a6bfec 100644 --- a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java +++ b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/SecurityConfig.java b/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/SecurityConfig.java index 66bb3cbd872..bd3bd399711 100644 --- a/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/SecurityConfig.java +++ b/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/SecurityConfig.java @@ -13,12 +13,12 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf() - .disable() - .authorizeExchange() - .pathMatchers("/internal/isReady", "/internal/isAlive", "/internal/metrics").permitAll() - .anyExchange().authenticated() - .and().oauth2Login() - .and().build(); + return http.csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeExchangeSpec -> + authorizeExchangeSpec.pathMatchers("/internal/isReady", "/internal/isAlive", "/internal/metrics").permitAll() + .anyExchange().authenticated()) + .oauth2Login(oAuth2LoginSpec -> { + }) + .build(); } } diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java index feb36ffe4d0..79595cbdc7f 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java @@ -23,7 +23,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java b/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java index e14ad70d821..0333247c67f 100644 --- a/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java +++ b/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java index 752681c3f15..4c69ceb5986 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java @@ -5,6 +5,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -16,7 +17,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java index acf49f5cd08..0bd507f64e4 100644 --- a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java +++ b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -19,7 +20,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/consumer/dto/LandkodeEncoder.java b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/consumer/dto/LandkodeEncoder.java index bf6ba869fc7..a889015b0e3 100644 --- a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/consumer/dto/LandkodeEncoder.java +++ b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/consumer/dto/LandkodeEncoder.java @@ -1,10 +1,9 @@ package no.nav.testnav.apps.personexportapi.consumer.dto; -import static java.util.Objects.nonNull; - +import lombok.experimental.UtilityClass; import org.bouncycastle.asn1.eac.BidirectionalMap; -import lombok.experimental.UtilityClass; +import static java.util.Objects.nonNull; @UtilityClass public class LandkodeEncoder { diff --git a/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/SecurityConfig.java b/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/SecurityConfig.java index 626b599f700..e26393a24c9 100644 --- a/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/SecurityConfig.java +++ b/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/SecurityConfig.java @@ -21,7 +21,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/SecurityConfig.java b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/SecurityConfig.java index a2e5113e417..0701a612ba3 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/SecurityConfig.java +++ b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/SecurityConfig.java @@ -23,7 +23,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java index 4659dda6bae..be570dd7772 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java index deabba60472..261d3445d81 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Bostedsadresse.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Bostedsadresse.java index 78eba099a87..2acd5c6d5f9 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Bostedsadresse.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Bostedsadresse.java @@ -1,9 +1,11 @@ package no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql; import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; +@EqualsAndHashCode(callSuper = true) @Value @AllArgsConstructor @NoArgsConstructor(force = true) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java index 43265fa0529..df16825967a 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java @@ -1,11 +1,13 @@ package no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql; import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; import java.time.LocalDate; +@EqualsAndHashCode(callSuper = true) @Value @AllArgsConstructor @NoArgsConstructor(force = true) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisteridentifikator.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisteridentifikator.java index 2f825b6ace8..c48818b0298 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisteridentifikator.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisteridentifikator.java @@ -1,9 +1,11 @@ package no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql; import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; +@EqualsAndHashCode(callSuper = true) @Value @AllArgsConstructor @NoArgsConstructor(force = true) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisterpersonstatus.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisterpersonstatus.java index 1eedab30b53..43c671afe47 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisterpersonstatus.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Folkeregisterpersonstatus.java @@ -1,9 +1,11 @@ package no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql; import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; +@EqualsAndHashCode(callSuper = true) @Value @AllArgsConstructor @NoArgsConstructor(force = true) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Navn.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Navn.java index eab5874b20c..2aab52845f1 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Navn.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Navn.java @@ -1,9 +1,11 @@ package no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql; import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; +@EqualsAndHashCode(callSuper = true) @Value @AllArgsConstructor @NoArgsConstructor(force = true) diff --git a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java index 7f467471ff1..7d810ae9a20 100644 --- a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java +++ b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfiguration { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java index bddd84ea4dc..a758bb395a6 100644 --- a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java +++ b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java b/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java index f96bdfd2631..7c4fe72962b 100644 --- a/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java +++ b/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java b/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java index 854330b650b..aa68eaf5a3c 100644 --- a/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java +++ b/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -21,7 +22,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java index 8f7d5042fbb..b4f02ff8b89 100644 --- a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java +++ b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java @@ -5,6 +5,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -16,7 +17,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java index 90b9a052e59..2876f548482 100644 --- a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java +++ b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.core.annotation.Order; import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java index 30d81e6a131..577f5335a1c 100644 --- a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java +++ b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java index e1dbd8a575e..f559342d4e1 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java @@ -7,6 +7,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -20,7 +21,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java b/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java index e72d859f0b7..cb9a09b712c 100644 --- a/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java +++ b/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java @@ -6,6 +6,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -18,7 +19,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java b/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java index b734fa96cdc..ff9d9e312d0 100644 --- a/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java +++ b/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java @@ -5,6 +5,7 @@ import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -16,7 +17,7 @@ public class SecurityConfig { public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", diff --git a/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/SecurityConfig.java b/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/SecurityConfig.java index f54af83f376..616aebdc994 100644 --- a/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/SecurityConfig.java +++ b/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/SecurityConfig.java @@ -24,7 +24,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java index 7dd8b153771..31b70a9a825 100644 --- a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java +++ b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java @@ -24,7 +24,7 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { return httpSecurity - .csrf(csrfSpec -> csrfSpec.disable()) + .csrf(ServerHttpSecurity.CsrfSpec::disable) .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", diff --git a/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java b/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java index 5602d2388ce..d6d96ac346e 100644 --- a/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java +++ b/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java @@ -18,6 +18,6 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf(csrfSpec -> csrfSpec.disable()).build(); + return http.csrf(ServerHttpSecurity.CsrfSpec::disable).build(); } } diff --git a/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java b/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java index 5602d2388ce..d6d96ac346e 100644 --- a/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java +++ b/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java @@ -18,6 +18,6 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf(csrfSpec -> csrfSpec.disable()).build(); + return http.csrf(ServerHttpSecurity.CsrfSpec::disable).build(); } }