Skip to content

Commit

Permalink
Merge branch 'master' into feature/ny-dialog-for-banckid-pålogging
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum authored Jan 10, 2025
2 parents 1b5b0a8 + e5518dc commit db46c52
Show file tree
Hide file tree
Showing 226 changed files with 1,087 additions and 3,968 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/app.organisasjon-tilgang-service.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/app.person-organisasjon-tilgang-service.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/maskinporten.yml

This file was deleted.

1 change: 1 addition & 0 deletions .nais/idporten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec:
- https://dolly.ekstern.dev.nav.no/login/oauth2/code/idporten
- https://dolly-idporten.ekstern.dev.nav.no/login/oauth2/code/idporten
secretName: idporten-dolly-prod # deployes til prod. secret kopieres manuelt til dev.
ssoDisabled: true
12 changes: 0 additions & 12 deletions .nais/maskinporten.yml

This file was deleted.

7 changes: 4 additions & 3 deletions apps/adresse-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
1 change: 1 addition & 0 deletions apps/altinn3-tilgang-service/config.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ spec:
- application: team-dolly-lokal-app
- application: testnav-oversikt-frontend
- application: testnav-bruker-service-dev
- application: testnorge-profil-api-dev
outbound:
external:
- host: platform.tt02.altinn.no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
7 changes: 4 additions & 3 deletions apps/amelding-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
7 changes: 4 additions & 3 deletions apps/brreg-stub/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import reactor.core.publisher.Mono;

@Component
public class PersonOrganisasjonTilgangConsumer {
public class AltinnTilgangServiceConsumer {

private final WebClient webClient;
private final ServerProperties serverProperties;
private final TokenExchange tokenExchange;
private final GetAuthenticatedUserId getAuthenticatedUserId;

public PersonOrganisasjonTilgangConsumer(
public AltinnTilgangServiceConsumer(
Consumers consumers,
TokenExchange tokenExchange,
WebClient.Builder webClientBuilder,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
package no.nav.testnav.apps.brukerservice.service;

import lombok.RequiredArgsConstructor;
import no.nav.testnav.apps.brukerservice.consumer.PersonOrganisasjonTilgangConsumer;
import no.nav.testnav.apps.brukerservice.consumer.AltinnTilgangServiceConsumer;
import no.nav.testnav.apps.brukerservice.exception.UserHasNoAccessToOrgnisasjonException;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Mono;

@Service
@RequiredArgsConstructor
public class ValidateService {
private final PersonOrganisasjonTilgangConsumer client;

private final AltinnTilgangServiceConsumer altinnTilgangServiceConsumer;

public Mono<Void> validateOrganiasjonsnummerAccess(String organisasjonsnummer) {
return client
return altinnTilgangServiceConsumer
.getOrganisasjon(organisasjonsnummer)
.doOnNext(organisasjon -> {
if (!organisasjon.getOrganisasjonsnummer().equals(organisasjonsnummer)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ spring:
password: compose-postgres

consumers:
testnav-person-organisasjon-tilgang-service:
url: http://testnav-person-organisasjon-tilgang-service:8080
testnav-altinn3-tilgang-service:
url: http://testnav-altinn3-tilgang-service:8080
cluster: dev-gcp
namespace: dolly
name: testnav-person-organisasjon-tilgang-service
name: testnav-altinn3-tilgang-service

TOKEN_X_WELL_KNOWN_URL: http://tokendings:8080/.well-known/oauth-authorization-server
TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-bruker-service
Expand Down
7 changes: 4 additions & 3 deletions apps/bruker-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ management:
enabled-by-default: true
web:
base-path: /internal
exposure.include: prometheus,heapdump,health
exposure:
include: prometheus,health
path-mapping:
prometheus: metrics
endpoint:
prometheus.enabled: true
heapdump.enabled: true
prometheus:
enabled: true
prometheus:
metrics:
export:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ spring:
jwk-set-uri: ${wiremockBaseUrl}/jwks

consumers:
testnav-person-organisasjon-tilgang-service:
testnav-altinn3-tilgang-service:
url: ${wiremockBaseUrl}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public static void main(String[] args) {

SpringApplication.run(DollyBackendApplicationStarter.class, args);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import no.nav.dolly.domain.resultset.dokarkiv.RsDokarkiv;
import no.nav.dolly.domain.resultset.dolly.DollyPerson;
import no.nav.dolly.errorhandling.ErrorStatusDecoder;
import no.nav.dolly.service.DokumentService;
import no.nav.dolly.service.TransaksjonMappingService;
import no.nav.dolly.util.TransactionHelperService;
import no.nav.testnav.libs.reactivecore.utils.WebClientFilter;
Expand Down Expand Up @@ -47,6 +48,7 @@ public class DokarkivClient implements ClientRegister {

private final ApplicationConfig applicationConfig;
private final DokarkivConsumer dokarkivConsumer;
private final DokumentService dokumentService;
private final ErrorStatusDecoder errorStatusDecoder;
private final MapperFacade mapperFacade;
private final ObjectMapper objectMapper;
Expand All @@ -63,7 +65,7 @@ public Flux<ClientFuture> gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly
.flatMap(dokarkiv -> Flux.from(getPersonData(dollyPerson.getIdent())
.flatMap(person -> getFilteredMiljoer(bestilling.getEnvironments())
.flatMapMany(miljoer -> Flux.fromIterable(miljoer)
.flatMap(env -> buildRequest(dokarkiv, person)
.flatMap(env -> buildRequest(dokarkiv, person, progress.getBestilling().getId())
.flatMap(request ->
!transaksjonMappingService.existAlready(DOKARKIV,
dollyPerson.getIdent(), env, bestilling.getId()) || isOpprettEndre ?
Expand Down Expand Up @@ -142,10 +144,11 @@ private Flux<PdlPersonBolk.PersonBolk> getPersonData(String ident) {
.filter(personBolk -> nonNull(personBolk.getPerson()));
}

private Mono<DokarkivRequest> buildRequest(RsDokarkiv rsDokarkiv, PdlPersonBolk.PersonBolk personBolk) {
private Mono<DokarkivRequest> buildRequest(RsDokarkiv rsDokarkiv, PdlPersonBolk.PersonBolk personBolk, Long bestillingId) {

var context = new MappingContext.Factory().getContext();
context.setProperty("personBolk", personBolk);
context.setProperty("dokumenter", dokumentService.getDokumenterByBestilling(bestillingId));

return Mono.just(mapperFacade.map(rsDokarkiv, DokarkivRequest.class, context));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.nav.dolly.bestilling.dokarkiv.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -100,6 +101,8 @@ public static class DokumentVariant {
private String filtype;
private String fysiskDokument;
private String variantformat;
@JsonIgnore
private Long dokumentReferanse;

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@ public List<DokumentInfo> getDokumenter() {
public static class DokumentInfo {

private String dokumentInfoId;
private String brevkode;
private String tittel;
}
}
Loading

0 comments on commit db46c52

Please sign in to comment.