Skip to content

Commit

Permalink
Merge pull request #378 from navikt/fjern-ubrukt-kontoregister-kode
Browse files Browse the repository at this point in the history
Fjerner all kontonummerkode, med unntak av kontonummer i grensesnitt.
  • Loading branch information
klaramargrethehelgemo authored Nov 29, 2024
2 parents 19c7f87 + 7195cbf commit 8ca50a9
Show file tree
Hide file tree
Showing 16 changed files with 4 additions and 390 deletions.
6 changes: 0 additions & 6 deletions nais-dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ spec:
namespace: paw
- application: skjermede-personer-pip
namespace: nom
- application: sokos-kontoregister-person
namespace: okonomi
- application: norg2
namespace: org
- application: veilarboppfolging
Expand Down Expand Up @@ -118,10 +116,6 @@ spec:
value: api://dev-gcp.poao.veilarboppfolging/.default
- name: VEILARBOPPFOLGING_URL
value: http://veilarboppfolging.poao/veilarboppfolging
- 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: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
value: http://paw-arbeidssoekerregisteret-api-oppslag.paw
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
Expand Down
6 changes: 0 additions & 6 deletions nais-prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ spec:
namespace: paw
- application: skjermede-personer-pip
namespace: nom
- application: sokos-kontoregister-person
namespace: okonomi
- application: norg2
namespace: org
- application: veilarboppfolging
Expand Down Expand Up @@ -118,10 +116,6 @@ spec:
value: api://prod-gcp.poao.veilarboppfolging/.default
- name: VEILARBOPPFOLGING_URL
value: http://veilarboppfolging.poao/veilarboppfolging
- 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: 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.

This file was deleted.

7 changes: 0 additions & 7 deletions src/main/java/no/nav/veilarbperson/config/ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import no.nav.veilarbperson.client.digdir.DigdirClientImpl;
import no.nav.veilarbperson.client.kodeverk.KodeverkClient;
import no.nav.veilarbperson.client.kodeverk.KodeverkClientImpl;
import no.nav.veilarbperson.client.kontoregister.KontoregisterClient;
import no.nav.veilarbperson.client.kontoregister.KontoregisterClientImpl;
import no.nav.veilarbperson.client.nom.SkjermetClient;
import no.nav.veilarbperson.client.nom.SkjermetClientImpl;
import no.nav.veilarbperson.client.oppslagArbeidssoekerregisteret.OppslagArbeidssoekerregisteretClient;
Expand Down Expand Up @@ -73,11 +71,6 @@ public PamClient pamClient(EnvironmentProperties properties, AzureAdMachineToMac
}


@Bean
public KontoregisterClient kontoregisterClient(EnvironmentProperties properties, MachineToMachineTokenClient tokenClient) {
return new KontoregisterClientImpl(properties.getKontoregisterUrl(), () -> tokenClient.createMachineToMachineToken(properties.getKontoregisterScope()));
}

@Bean
public SkjermetClient skjermetClient(EnvironmentProperties properties, AzureAdMachineToMachineTokenClient tokenClient) {
return new SkjermetClientImpl(properties.getSkjermedePersonerPipUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public class EnvironmentProperties {
private String skjermedePersonerPipUrl;
private String veilarboppfolgingScope;
private String veilarboppfolgingUrl;
private String kontoregisterScope;
private String kontoregisterUrl;
private String oppslagArbeidssoekerregisteretUrl;
private String oppslagArbeidssoekerregisteretScope;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import no.nav.common.types.identer.Fnr;
import no.nav.veilarbperson.client.kontoregister.HentKontoRequestDTO;
import no.nav.veilarbperson.client.kontoregister.KontoregisterClient;
import no.nav.veilarbperson.client.kontoregister.HentKontoResponseDTO;
import no.nav.veilarbperson.client.regoppslag.RegoppslagClient;
import no.nav.veilarbperson.client.regoppslag.RegoppslagResponseDTO;
import no.nav.veilarbperson.domain.*;
Expand All @@ -26,8 +23,6 @@ public class PersonV2Controller {
private final AuthService authService;
private final RegoppslagClient regoppslagClient;

private final KontoregisterClient kontoregisterClient;

@Deprecated
@GetMapping
@Operation(summary = "Henter informasjon om en person fra PDL")
Expand Down Expand Up @@ -83,13 +78,4 @@ public RegoppslagResponseDTO hentPostadresse(@RequestParam("fnr") Fnr fnr) {
authService.sjekkLesetilgang(fnr);
return regoppslagClient.hentPostadresse(fnr);
}
@PostMapping
@Operation(summary = "Henter kontonummer fra Kontoregister")
public HentKontoResponseDTO hentKontonummerFraKontoregister(@RequestParam("kontohaver") HentKontoRequestDTO kontohaver) {
Fnr fnr = new Fnr(kontohaver.getKontohaver());
authService.stoppHvisEksternBruker();
authService.sjekkLesetilgang(fnr);
return kontoregisterClient.hentKontonummer(kontohaver);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.stream.Stream;

import static java.util.Optional.ofNullable;
import static no.nav.veilarbperson.client.kontoregister.KontoregisterClientImpl.Mappers.fraNorg2Enhet;
import static no.nav.veilarbperson.utils.PersonV2DataMapper.*;
import static no.nav.veilarbperson.utils.VergeOgFullmaktDataMapper.*;

Expand Down Expand Up @@ -81,9 +80,7 @@ public PersonV2Data hentFlettetPerson(PersonFraPdlRequest personFraPdlRequest) {
}

public void flettInnKontonummer(PersonV2Data person) {
// HentKontoRequestDTO kontohaver = new HentKontoRequestDTO();
// kontohaver.setKontohaver(person.getFodselsnummer().toString());
// HentKontoResponseDTO kontoregisterKonto = kontoregisterClient.hentKontonummer(kontohaver);

person.setKontonummer(null);
}

Expand Down Expand Up @@ -182,6 +179,9 @@ private void flettGeografiskEnhet(PersonFraPdlRequest personFraPdlRequest, Perso
}
}

private Enhet fraNorg2Enhet(no.nav.common.client.norg2.Enhet enhet) {
return new Enhet(enhet.getEnhetNr(), enhet.getNavn());
}

public void flettKodeverk(PersonV2Data personV2Data) {
Optional<String> postnrIBostedsVegAdr = ofNullable(personV2Data.getBostedsadresse()).map(Bostedsadresse::getVegadresse).map(
Expand Down Expand Up @@ -363,5 +363,4 @@ public PersonNavnV2 hentNavn(PersonFraPdlRequest personFraPdlRequest) {

return PersonV2DataMapper.navnMapper(personNavn.getNavn());
}

}
2 changes: 0 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ app.env.skjermedePersonerPipScope=${SKJERMEDE_PERSONER_PIP_SCOPE}
app.env.skjermedePersonerPipUrl=${SKJERMEDE_PERSONER_PIP_URL}
app.env.veilarboppfolgingScope=${VEILARBOPPFOLGING_SCOPE}
app.env.veilarboppfolgingUrl=${VEILARBOPPFOLGING_URL}
app.env.kontoregisterScope=${KONTOREGISTER_PERSON_V1_SCOPE}
app.env.kontoregisterUrl=${KONTOREGISTER_PERSON_V1_URL}
app.env.oppslagArbeidssoekerregisteretScope=${OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE}
app.env.oppslagArbeidssoekerregisteretUrl=${OPPSLAG_ARBEIDSSOEKERREGISTERET_URL}

Expand Down
Loading

0 comments on commit 8ca50a9

Please sign in to comment.