Skip to content

Conversation

@OleksandrChmyrNAV
Copy link
Contributor

@OleksandrChmyrNAV OleksandrChmyrNAV commented Oct 23, 2025

  1. Fikset lesing og validering av iat claim.
  2. Lagt til en sjekk for tidsperiode mellom generering av HelseID token og generering av selve meldingen.
  3. Fikset tester.

Oppgave: https://github.com/navikt/team-emottak-docs/issues/278

@OleksandrChmyrNAV OleksandrChmyrNAV requested a review from a team as a code owner October 23, 2025 14:29
Copy link
Contributor

@terjenilssen terjenilssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Med forbehold om at jeg egentlig ikke kan noe særlig om HelseID eller tokens generelt, så synes jeg dette ser bra ut.

class HelseIdTokenValidator(
private val issuer: String = config().helseId.issuerUrl,
private val allowedClockSkewInMs: Long = 0,
private val allowedMessageGenerationGap: Long = 10000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Burde denne variabelen heller hete allowedMessageGenerationGapInMs? Og burde dette eventuelt ligge i hoplite-config slik at man kan endre der i stedet for å ha dette hardkodet i klassen? (jeg vet ikke om det er behov for å endre på terskelen, men antar at det kan være nyttig)

Copy link
Contributor Author

@OleksandrChmyrNAV OleksandrChmyrNAV Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Godt poeng!
Jeg skal flytte de to innstillingene inn i config fil.

@OleksandrChmyrNAV OleksandrChmyrNAV merged commit 8411d49 into main Oct 27, 2025
4 checks passed
@OleksandrChmyrNAV OleksandrChmyrNAV deleted the #278-Et-veldig-stramt-tids-aspekt-for-token-gyldighet branch October 27, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants