-
Notifications
You must be signed in to change notification settings - Fork 2
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
cleanup/AAD_ISSUER_URI-replacement #3734
Conversation
…ng token endpoint from AzureClientCredential, which is based on the NAIS provided AZURE_OPENID_CONFIG_TOKEN_ENDPOINT.
…S provided environment for local profile, and b) automatically populates with dummy values for test profile, reducing configuration boilerplate.
…izer, removing all previous test config.
…ext initializer, removing need for config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
SpringApplication.run(AdresseServiceApplicationStarter.class, args); | ||
new SpringApplicationBuilder(AdresseServiceApplicationStarter.class) | ||
.initializers(new NaisEnvironmentApplicationContextInitializer()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vi har allerede ApplicationConfig der denne initialisering kunne ha vært lagt til, alternativet er å lage en egen config for local og test som kaller NaisEnvironmentApplicationContextInitializer(). Da blir det eksplisitt og tydelig hva som skjer, og ApplicationStarter forblir så enkel som muilig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application context initializer må kalles før Spring context er ferdig opprettet, så jeg ser ikke hvordan det skal være teknisk mulig. 🤔 Bruker de eksisterende APIene i Spring for å gjøre dette (de nye APIene, siden DelegatingApplicationContextInitializer
er fjernet f.o.m. Spring Boot 3.4.0) Vi setter config gjennom kode avhengig av hvilken Spring profile som er satt for initialisering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skjønner, vel det var et forslag, hvis det ikke er mulig, så kjør på. 😄
AzureClientCredential
.Sistnevnte er foreløpig kun brukt på
adresse-service
, for utprøving før de andre ~100 evt. endres.