-
Notifications
You must be signed in to change notification settings - Fork 6
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
OY-4717 riippuvuuksien megakarsinta ja tietoturvapäivitykset #479
base: master
Are you sure you want to change the base?
Conversation
…ta, kopioitu tarvittavat koodit repoon
…tavat koodit repoon, poistettu group-emailer-kirjasto
…töön. Mockitoa käyttävät testit tilapäisesti kommentoitu koska vaatii versionnoston
…ottokuittaukseen, turhia depsuja pois
…ittuvuudet fiksattu
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.
Näin isoa kokonaisuutta suht. tuntemattomasta palvelusta on hankalaa lukea ihan suurennuslasilla rivi riviltä läpi, mutta ei osunut läpikäynnissä silmään mitään isompia ongelmia. Yksi mahd. korjauskohta ja muutama huomio ohessa!
override def deleteByServiceTicket(ticket: ServiceTicket): Unit = { | ||
override def deleteByServiceTicket(ticket: String): Unit = { | ||
runBlocking(sqlu"""delete from sessions where ticket = ${ticket.value}""", timeout = Duration(10, TimeUnit.SECONDS)) | ||
} |
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.
Pitäisikö tässä olla where ticket = ${ticket}
tms. jos ticket on nyt pelkkä merkkijono?
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.
Hyvä huomio! Itse asiassa nyt tuon voisi palauttaa takaisin ServiceTicket-tyyppiin. Vaihdoin välissä käyttöön Java-clientin ja siinä kohtaa muuttui ticketin tyypitys, mutta sitten piti kuitenkin palauttaa scala-client käyttöön.
application.getState.toString, | ||
isPostProcessing(application), | ||
Option(application.getRequiredPaymentState).map(_.toString) | ||
Application.State.SUBMITTED.toString // TODO fix voiko olla kovakoodattu vai tarvitaanko päättely |
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.
Yleishuomiona: TODOja on vielä aika paljon - oli varmaan tarkoituskin, mutta muistutuksena että kannattanee grepata ja katsoa läpi tarkkaan ennen lopullisia testejä ja tuotantoonvientiä. 😊
@@ -73,13 +57,15 @@ trait ApplicationsServletContainer { | |||
val oid = personOid() | |||
hakemusEditori.fetchByPersonOid(request, oid, Fetch) match { | |||
case FullSuccess(hakemukset) => | |||
logger.info("ApplicationsServlet get FullSuccess") |
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.
Jos nämä ovat jäämässä tuotantoon saakka, pitäisikö näissä lokittaa myös jotain tietoa siitä mitä koetettiin hakea (henkilön oid)?
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.
Ei ollut tarkoitus jättää ja tuossa siis haettiin hakemuksia henkilö-oidilla.
.withKayttooikeusRajoitukset(ViestinvalitysBuilder.kayttooikeusrajoituksetBuilder() | ||
.withKayttooikeus("APP_HAKEMUS_CRUD", "1.2.246.562.10.240484683010") | ||
.build()) |
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.
Pitäisiköhän tähän lisätä varmuudeksi kommentti jälkipolville mistä taikasanoissa (oikeus ja organisaatio) on kyse?
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.
Hei tästä huomiosta papukaijamerkki! Tuohon itse asiassa oli jäänyt copypaste-härönä ihan väärät oikat!
// jos ei löydy atarusta, haetaan haku-appista | ||
val optFromHakemusRepository = hakemusRepository.getHakemus(request, hakemusOid, valintatulosFetchStrategy) | ||
if (optFromHakemusRepository.isEmpty) { | ||
logger.info("fetchByHakemusOid(): Hakemus repository returned no application for given hakemusOid {}. Searching from ataru.", hakemusOid) |
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.
Pikkujuttu, mutta Searching from atarun voisi siivoilla.
class KoodistoServlet extends OmatSivutServletBase with JacksonJsonSupport with JsonFormats { | ||
before() { | ||
contentType = formats("json") | ||
} | ||
|
||
get("/postitoimipaikka/:postalCode") { | ||
checkNotFound(koodistoService.postOffice(params("postalCode"), language)) | ||
NotFound("error" -> "Not found") // ei pitäisi enää tarvita tätä |
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.
Jos ei tosiaan tarvita tätä enää, ehkä voisi siivota järeämminkin
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.
En tainnut alunperin uskaltaa poistaa kun oli viittauksia fronttipuolella, mutta mäkeen vaan.
} | ||
|
||
get("/koulutus/:aoId") { | ||
checkNotFound(koulutusInformaatioService.koulutus(params("aoId"), getLangParam("lang"))) | ||
NotFound("error" -> "Not found") |
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.
Siivousta näillekin?
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.
Tähänkin taisi olla jotain viittauksia frontissa jäljellä mutta lienee kuollutta koodia
@@ -83,6 +79,7 @@ trait NonSensitiveApplicationServletContainer { | |||
} | |||
|
|||
private def jwtAuthorize: Try[HakemusJWT] = { | |||
logger.info(s"tunnistaudutaan jwt:llä") |
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.
Haiskahtaa vähän ylimääräiseltä lokitukselta
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.
oli jäänyt testailusta näköjään
private def fetchHakemus(hakemusOid: String, personOid: Option[String]): Try[HakemusInfo] = { | ||
logger.info(s"haetaan legacy-hakemus hakemus-oidilla $hakemusOid") |
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.
Kai tämä palauttaa muutakin kuin legacy-hakemuksia?
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.
Tuokin oli tarkoitettu tilapäiseksi kun testailin haku-appin hakemuksia
|
||
|
||
|
||
|
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.
Ovatko nämä käytössä jossain? En nopealla vilkaisulla löytänyt
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.
Totta, ei enää olekaan kun päivitin apit
Tiketin subtaskeista ilmenee tarkemmin mitä tehty, pääpiirteissään: