Page MenuHomeSoftware Heritage

django/utils: Get access token renewal date from proper dict field
ClosedPublic

Authored by anlambert on Mar 17 2021, 6:07 PM.

Details

Summary

In the dictionary decoded from an OIDC access token, the iat field store
the token creation date while the auth_time field store the date the
OIDC session was opened.

In order to get an accurate authentication time, the date stored in
the iat field must be used as it corresponds to the time an access
token was refreshed and thus the latest valid authentication date.

Related to D5269

Diff Detail

Repository
rDAUTH Common authentication libraries
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5271 (id=18883)

Rebasing onto 148c9d4f3f...

Current branch diff-target is up to date.
Changes applied before test
commit 26943048531717e1b35eff2270bbd0a8d6a6e57f
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Mar 17 18:02:03 2021 +0100

    django/utils: Get access token renewal date from proper dict field
    
    In the dictionry decoded from an OIDC access token, the iat field store
    the token creation date while the auth_time field store the date the
    OIDC session was opened.
    
    In order to get an accurate authentication time, the date stored in
    the iat field must be used as it corresponds to the time an access
    token was refreshed and thus the latest valid authentication date.

See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/32/ for more details.

This revision is now accepted and ready to land.Mar 17 2021, 6:11 PM

Build is green

Patch application report for D5271 (id=18887)

Rebasing onto 148c9d4f3f...

Current branch diff-target is up to date.
Changes applied before test
commit 679c0a5e608a0bb7833c61b1e658a0507d9c32bc
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Mar 17 18:02:03 2021 +0100

    django/utils: Get access token renewal date from proper dict field
    
    In the dictionary decoded from an OIDC access token, the iat field store
    the token creation date while the auth_time field store the date the
    OIDC session was opened.
    
    In order to get an accurate authentication time, the date stored in
    the iat field must be used as it corresponds to the time an access
    token was refreshed and thus the latest valid authentication date.

See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/33/ for more details.