Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fjerner endepunkt hent-registrering og alt som går mot veilarbregistrering #372

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions nais-dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ spec:
namespace: team-rocket
- application: poao-tilgang
namespace: poao
- application: veilarbregistrering
namespace: paw
- application: aia-backend
namespace: paw
- application: paw-arbeidssoekerregisteret-api-oppslag
namespace: paw
- application: skjermede-personer-pip
Expand Down Expand Up @@ -121,18 +117,10 @@ spec:
value: api://dev-gcp.poao.veilarboppfolging/.default
- name: VEILARBOPPFOLGING_URL
value: http://veilarboppfolging.poao/veilarboppfolging
- name: VEILARBREGISTRERING_SCOPE
value: api://dev-gcp.paw.veilarbregistrering/.default
- name: VEILARBREGISTRERING_URL
value: http://veilarbregistrering.paw
- name: KONTOREGISTER_PERSON_V1_SCOPE
value: api://dev-gcp.okonomi.sokos-kontoregister-person/.default
- name: KONTOREGISTER_PERSON_V1_URL
value: http://sokos-kontoregister-person.okonomi
- name: AIA_BACKEND_URL
value: http://aia-backend.paw/aia-backend
- name: AIA_BACKEND_SCOPE
value: api://dev-gcp.paw.paw-arbeidssoker-besvarelse/.default
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
value: http://paw-arbeidssoekerregisteret-api-oppslag.paw
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
Expand Down
12 changes: 0 additions & 12 deletions nais-prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ spec:
namespace: team-rocket
- application: poao-tilgang
namespace: poao
- application: veilarbregistrering
namespace: paw
- application: aia-backend
namespace: paw
- application: paw-arbeidssoekerregisteret-api-oppslag
namespace: paw
- application: skjermede-personer-pip
Expand Down Expand Up @@ -121,18 +117,10 @@ spec:
value: api://prod-gcp.poao.veilarboppfolging/.default
- name: VEILARBOPPFOLGING_URL
value: http://veilarboppfolging.poao/veilarboppfolging
- name: VEILARBREGISTRERING_SCOPE
value: api://prod-gcp.paw.veilarbregistrering/.default
- name: VEILARBREGISTRERING_URL
value: http://veilarbregistrering.paw
- name: KONTOREGISTER_PERSON_V1_SCOPE
value: api://prod-gcp.okonomi.sokos-kontoregister-person/.default
- name: KONTOREGISTER_PERSON_V1_URL
value: http://sokos-kontoregister-person.okonomi
- name: AIA_BACKEND_URL
value: http://aia-backend.paw/aia-backend
- name: AIA_BACKEND_SCOPE
value: api://prod-gcp.paw.paw-arbeidssoker-besvarelse/.default
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
value: http://paw-arbeidssoekerregisteret-api-oppslag.paw
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions src/main/java/no/nav/veilarbperson/config/ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
import no.nav.common.client.norg2.NorgHttp2Client;
import no.nav.common.metrics.InfluxClient;
import no.nav.common.metrics.MetricsClient;
import no.nav.common.rest.client.RestClient;
import no.nav.common.token_client.builder.AzureAdTokenClientBuilder;
import no.nav.common.token_client.client.AzureAdMachineToMachineTokenClient;
import no.nav.common.token_client.client.AzureAdOnBehalfOfTokenClient;
import no.nav.common.token_client.client.MachineToMachineTokenClient;
import no.nav.poao_tilgang.client.PoaoTilgangClient;
import no.nav.veilarbperson.client.aiabackend.AiaBackendClient;
import no.nav.veilarbperson.client.aiabackend.AiaBackendClientImpl;
import no.nav.veilarbperson.client.digdir.DigdirClient;
import no.nav.veilarbperson.client.digdir.DigdirClientImpl;
import no.nav.veilarbperson.client.kodeverk.KodeverkClient;
Expand All @@ -36,8 +33,6 @@
import no.nav.veilarbperson.client.representasjon.RepresentasjonClientImpl;
import no.nav.veilarbperson.client.veilarboppfolging.VeilarboppfolgingClient;
import no.nav.veilarbperson.client.veilarboppfolging.VeilarboppfolgingClientImpl;
import no.nav.veilarbperson.client.veilarbregistrering.VeilarbregistreringClient;
import no.nav.veilarbperson.client.veilarbregistrering.VeilarbregistreringClientImpl;
import no.nav.veilarbperson.service.AuthService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -65,13 +60,6 @@ public VeilarboppfolgingClient veilarboppfolgingClient(EnvironmentProperties pro
() -> authService.getAadOboTokenForTjeneste(properties.getVeilarboppfolgingScope()));
}

@Bean
public AiaBackendClient aiaBackendClient(EnvironmentProperties environmentProperties, AuthService authService) {
return new AiaBackendClientImpl(
environmentProperties.getAiaBackendUrl(),
() -> authService.getAadOboTokenForTjeneste(environmentProperties.getAiaBackendScope()));
}

@Bean
public DigdirClient digdirClient(EnvironmentProperties properties, MachineToMachineTokenClient tokenClient) {
return new DigdirClientImpl(properties.getKrrUrl(),
Expand Down Expand Up @@ -115,13 +103,6 @@ public RepresentasjonClient representasjonClient(EnvironmentProperties propertie
() -> authService.getAadOboTokenForTjeneste(properties.getReprApiScope()));
}

@Bean
public VeilarbregistreringClient veilarbregistreringClient(EnvironmentProperties properties, AzureAdMachineToMachineTokenClient aadMachineToMachineTokenClient) {
return new VeilarbregistreringClientImpl(RestClient.baseClient(),
properties.getVeilarbregistreringUrl(),
() -> aadMachineToMachineTokenClient.createMachineToMachineToken(properties.getVeilarbregistreringScope()));
}

@Bean
public OppslagArbeidssoekerregisteretClient oppslagArbeidssoekerregisteretClient(
EnvironmentProperties properties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ public class EnvironmentProperties {
private String skjermedePersonerPipUrl;
private String veilarboppfolgingScope;
private String veilarboppfolgingUrl;
private String veilarbregistreringScope;
private String veilarbregistreringUrl;
private String kontoregisterScope;
private String kontoregisterUrl;
private String aiaBackendUrl;
private String aiaBackendScope;
private String oppslagArbeidssoekerregisteretUrl;
private String oppslagArbeidssoekerregisteretScope;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import no.nav.veilarbperson.client.nom.SkjermetClient;
import no.nav.veilarbperson.client.pdl.PdlClient;
import no.nav.veilarbperson.client.regoppslag.RegoppslagClient;
import no.nav.veilarbperson.client.veilarbregistrering.VeilarbregistreringClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -27,7 +26,6 @@ public SelfTestChecks selfTestChecks(
SkjermetClient skjermetClient,
Norg2Client norg2Client,
PdlClient pdlClient,
VeilarbregistreringClient veilarbregistreringClient,
RegoppslagClient regoppslagClient
) {
return new SelfTestChecks(List.of(
Expand All @@ -37,7 +35,6 @@ public SelfTestChecks selfTestChecks(
new SelfTestCheck("Norg2", false, norg2Client),
new SelfTestCheck("PDL", true, pdlClient),
new SelfTestCheck("skjermede-personer", true, skjermetClient),
new SelfTestCheck("Veilarbregistrering", false, veilarbregistreringClient),
new SelfTestCheck("Regoppslag", false, regoppslagClient)
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import no.nav.veilarbperson.service.AuthService;
import no.nav.veilarbperson.service.CvJobbprofilService;
import no.nav.veilarbperson.service.PersonV2Service;
import no.nav.veilarbperson.service.RegistreringService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -24,8 +23,6 @@ public class PersonController {

private final CvJobbprofilService cvJobbprofilService;

private final RegistreringService registreringService;

@Deprecated
@GetMapping("/aktorid")
public AktoerId aktorid(@RequestParam("fnr") Fnr fnr) {
Expand Down Expand Up @@ -79,23 +76,6 @@ public ResponseEntity<String> cvOgJobbprofil(@RequestParam(value = "fnr", requir
return cvJobbprofilService.hentCvJobbprofilJson(fnr);
}

@Deprecated
@GetMapping("/registrering")
public ResponseEntity<String> registrering(@RequestParam(value = "fnr") Fnr fnr) {
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(fnr);
return registreringService.hentRegistrering(fnr);
}

@Deprecated
@PostMapping("/registrering/endringer")
public ResponseEntity<String> endringIRegistreringdata(@RequestBody PersonRequestBody personRequestBody) {
Fnr fnr = Fnr.of(personRequestBody.fodselsnummer());
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(fnr);
return registreringService.hentEndringIRegistreringsdata(fnr);
}

// TODO: Det er hårete å måtte skille på ekstern og intern
// Lag istedenfor en egen controller for interne operasjoner og en annen for eksterne
private Fnr hentIdentForEksternEllerIntern(Fnr queryParamFnr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
import org.springframework.web.server.ResponseStatusException;

import java.io.IOException;
import java.util.List;

import static no.nav.veilarbperson.utils.SecureLog.secureLog;


@Slf4j
@RestController
Expand All @@ -32,8 +28,6 @@ public class PersonV3Controller {

private final CvJobbprofilService cvJobbprofilService;

private final RegistreringService registreringService;

private final OppslagArbeidssoekerregisteretService oppslagArbeidssoekerregisteretService;

@PostMapping("/hent-person")
Expand Down Expand Up @@ -72,22 +66,6 @@ public ResponseEntity<String> cvOgJobbprofil(@RequestBody PersonRequest personRe
return cvJobbprofilService.hentCvJobbprofilJson(personRequest.getFnr());
}

@PostMapping("/person/hent-registrering")
@Operation(summary = "Henter registreringen til person")
public ResponseEntity<String> registrering(@RequestBody PersonRequest personRequest) {
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(personRequest.getFnr());
return registreringService.hentRegistrering(personRequest.getFnr());
}

@PostMapping("/person/registrering/hent-endringer")
@Operation(summary = "Henter endringer på registreringen til person")
public ResponseEntity<String> endringIRegistreringdata(@RequestBody PersonRequest personRequest) {
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(personRequest.getFnr());
return registreringService.hentEndringIRegistreringsdata(personRequest.getFnr());
}

@PostMapping("/person/hent-malform")
@Operation(summary = "Henter malform fra DIGDIR tjeneste")
public Malform malform(@RequestBody PersonRequest personRequest) {
Expand Down

This file was deleted.

Loading