Skip to content

Commit

Permalink
Merge pull request #16 from FINTLabs/FFS-1079-utvide-fint-flyt-author…
Browse files Browse the repository at this point in the history
…ization-service-med-service-som-henter-azure-brukere-og-populerer-databasen-med-disse

FFS-1079, FFS-1111, FFS-1113
  • Loading branch information
Battlestad authored Jul 3, 2024
2 parents a68a072 + 86fb5dd commit b56008d
Show file tree
Hide file tree
Showing 62 changed files with 1,398 additions and 298 deletions.
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,24 @@ repositories {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'

implementation 'org.springframework.kafka:spring-kafka'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.72.Final:osx-aarch_64'

implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'org.postgresql:postgresql'
implementation 'org.flywaydb:flyway-core'

implementation 'org.flywaydb:flyway-core'
implementation 'no.fintlabs:fint-kafka:4.0.1'
implementation 'no.fintlabs:fint-flyt-resource-server:2.1.0'

implementation 'javax.validation:validation-api'
implementation 'org.hibernate.validator:hibernate-validator'

implementation 'no.fintlabs:fint-flyt-resource-server:2.1.0-rc-3'
implementation 'com.azure:azure-identity:1.10.2'
implementation 'com.microsoft.graph:microsoft-graph:5.80.0'

compileOnly 'org.projectlombok:lombok'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
Expand Down
2 changes: 2 additions & 0 deletions kustomize/base/flais.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
}
- name: fint.flyt.resource-server.security.api.internal.enabled
value: 'true'
- name: fint.flyt.azure-ad-gateway.enabled
value: 'true'
onePassword:
itemPath: path
envFrom: []
Expand Down
3 changes: 2 additions & 1 deletion kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- flais.yaml
- flais.yaml
- onePassword.yaml
7 changes: 7 additions & 0 deletions kustomize/base/onePassword.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
name: fint-flyt-authorization-service
spec:
itemPath: "path set in overlay"

12 changes: 12 additions & 0 deletions kustomize/overlays/afk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ patches:
value:
secretRef:
name: fint-flyt-acos-oauth2-client
- op: add
path: "/spec/envFrom/1"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-afk-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/agderfk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/bfk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ patches:
value:
secretRef:
name: fint-flyt-acos-oauth2-client
- op: add
path: "/spec/envFrom/1"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-bfk-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/ffk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/fintlabs-no/beta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ patches:
value:
secretRef:
name: fint-flyt-vigo-oauth2-client
- op: add
path: "/spec/envFrom/2"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-beta-vault/items/fint-flyt-authorization-service-fintlabs-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/innlandetfylke-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: add
path: "/spec/envFrom/0"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-innlandetfylke-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/mrfylke-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/nfk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: add
path: "/spec/envFrom/0"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-nfk-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/ofk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ patches:
value:
secretRef:
name: fint-flyt-vigo-oauth2-client
- op: add
path: "/spec/envFrom/2"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-ofk-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/ofk-no/beta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ patches:
value:
secretRef:
name: fint-flyt-vigo-oauth2-client
- op: add
path: "/spec/envFrom/2"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-beta-vault/items/fint-flyt-authorization-service-ofk-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/rogfk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: add
path: "/spec/envFrom/0"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-rogfk-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/telemarkfylke-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: add
path: "/spec/envFrom/0"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-telemarkfylke-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/tromsfylke-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/tromsfylke-no/beta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
- op: add
path: "/spec/envFrom/0"
value:
Expand Down
3 changes: 3 additions & 0 deletions kustomize/overlays/trondelagfylke-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/trondelagfylke-no/beta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
12 changes: 12 additions & 0 deletions kustomize/overlays/vestfoldfylke-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: add
path: "/spec/envFrom/0"
value:
secretRef:
name: fint-flyt-authorization-service
target:
kind: Application
name: fint-flyt-authorization-service
- patch: |-
- op: replace
path: "/spec/itemPath"
value: "vaults/aks-api-vault/items/fint-flyt-authorization-service-vestfoldfylke-no"
target:
kind: OnePasswordItem
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/vlfk-no/api/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
target:
kind: Application
name: fint-flyt-authorization-service
3 changes: 3 additions & 0 deletions kustomize/overlays/vlfk-no/beta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ patches:
"vigo.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"],
"novari.no":["https://role-catalog.vigoiks.no/vigo/flyt/developer"]
}
- op: replace
path: "/spec/env/3/value"
value: 'false'
- op: add
path: "/spec/env/-"
value:
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/no/fintlabs/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@ConfigurationPropertiesScan
@SpringBootApplication
public class Application {

Expand Down
11 changes: 0 additions & 11 deletions src/main/java/no/fintlabs/authorization/AuthorizationUtil.java

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/java/no/fintlabs/authorization/adminuser/AdminUser.java

This file was deleted.

Loading

0 comments on commit b56008d

Please sign in to comment.