This part in you blog was interesting, i think this is what we are after.
This means that inactivity is important to consider, such that you may have an access token valid for 60 mins, but an inactivity of 10mins. If you would like to modify this dynamically, modify the OAuth response in the Post Token mapping rule to give the desired value.
(For example, you might set the token lifetime short in the API definition, but report a longer max lifetime value in the Post Token mapping rule to enable sessions that extend beyond life of a token based on activity.)
Original Message:
Sent: Thu June 15, 2023 03:08 AM
From: Mikael Lindblad
Subject: inactive timeout and access tokens
Hello Philip,
"Where you are using ISVA Reverse Proxy as the enforcement point, you can have the RP invalidate the Access Token when the inactivity timer fires (session ends). "
Does this mean that there is some kind of inactivity timer on the token and if so, is this based on the am_eai_xattr_inactive_timeout value?
------------------------------
Regards Mikael
Original Message:
Sent: Thu June 15, 2023 01:04 AM
From: Philip Nye
Subject: inactive timeout and access tokens
Where you are using ISVA Reverse Proxy as the enforcement point, you can have the RP invalidate the Access Token when the inactivity timer fires (session ends).
See the OAuth 2.0 Logout endpoint.
A URL where you can end a session by revoking an access_token. The token must be provided in the Authorization header or a session cookie must be used.
Setting [acnt-mgt] single-signoff-uri to this endpoint ensures that when pkmslogout is called or when the WebSEAL session times out because of inactivity, the access token is revoked.
[acnt-mgt]single-signoff-uri = /mga/sps/oauth/oauth20/logout
If this functionality is not desired, the [acnt-mgt] single-signoff-uri entry must be unset.
I've also written a bunch of stuff on this topic here. https://philipnye.com/2014/07/29/isam-for-web-and-mobile-oauth-authentication-and-sessions/
It's a bit old, but mostly still relevant.
------------------------------
Philip Nye
IBM
Gold Coast
Original Message:
Sent: Wed June 14, 2023 11:28 AM
From: JACK YARBOROUGH
Subject: inactive timeout and access tokens
Hello Mikael,
In the OAUTH 2.0 Framework access tokens are by design short lived tokens.
My suggestion would be to make the access token lifetime the value of the inactivity timeout and use a refresh token. Define the refresh token timeout to be the full session timeout.
This would accomplish 2 things.
1) The access token is short lived and short scoped meaning that it would expire and unless the client had the refresh token they could not get another token
2) The refresh token can only be acquired through an authenticated flow. When the refresh token lifetime expires authentication would be required again.
Our product does have a '/revoke' endpoint.
It's also possible to delete tokens using the 'com.tivoli.am.fim.trustserver.sts.utilities.OAuthMappingExtUtils.deleteToken(java.lang.String tokenID)' class and method.
------------------------------
JACK YARBOROUGH
Original Message:
Sent: Wed June 14, 2023 09:12 AM
From: Mikael Lindblad
Subject: inactive timeout and access tokens
Hi,
Do you have any design recommendation on how to solve an inactive timeout with access token.
Let's say that you have a token that is valid for 60 minutes, but show be revoked if it has not been used for 5 minutes.
Is this possible to solve in a mapping rule? And are there any examples on how to do it? Can you invalidate the token in a mappingrule?
------------------------------
Regards Mikael
------------------------------