AbsaOSS / login-service

AbsaOSS Common Login gateway using JWT Public key signatures
Apache License 2.0
2 stars 0 forks source link

Refresh token improvement - phase 2 #76

Closed dk1844 closed 3 months ago

dk1844 commented 9 months ago

Background

75 Introduces a refresh simple token mechanism. This can be improved upon.

Feature

Simple version (#75) reissues access JWT based on refresh JWT as-is (except for the validity window being anew). But it does not check revalidate with auth backed in the information is still accurate (e.g. against LDAP if user is still there, if has still the same groups, etc)

Proposed Solution [Optional]

Solution Ideas:

  1. Implement user info reload mechanism and use it when refreshing access JWT token - e.g. for LDAP, an AD service user, user information retrieval layer must be added to check no change has happened in the meantime.

Some other ideas in Based on https://www.geeksforgeeks.org/jwt-authentication-with-refresh-tokens/ - considerations around the refresh token being regenerated each time and not being reused?