onc-healthit / onc-certification-g10-test-kit

ONC Certification (g)(10) Standardized API Tests
Apache License 2.0
32 stars 10 forks source link

Refresh token support is missing in inferno. #465

Open gwhusers opened 8 months ago

gwhusers commented 8 months ago

Hey there,

We are facing the problem where we are getting the token expiration on the test number 7 related to multi-patient API. In researching and reviewing as client application there is the need to refresh the token when it is reaching to the expiration, which is not there in Inferno application.

We are using the Auth 2.0 bearer access token as the authentication mechanism and as we have good set of data to retrieve while running inferno specifically for Multi Patient API, where we are facing 401 HTTP status because of token expiration. Please let us know if inferno dev team have any enhancement to handle this issue.

arscan commented 8 months ago

Hi @gwhusers -- thanks for the report. This is the first time that this issue has been raised as far as I'm aware, but it seems like a gap in our functionality. I suspect that systems tend to use a small data set for testing that can be exported and downloaded quick enough to avoid the token expiring, but we don't want to have to force systems to do anything unrealistic in order to pass the tests if exports just tend to take longer than the chosen bearer token duration. We are looking at how we might update the tests to retrieve a new bearer token if it is past the expired_in time indicated in the token response.

Could you let me know which specific test it started failing in (7.2.05? 7.3.x?)? And just for our knowledge, it would be helpful to understand the duration you have configured your bearer token to be valid for, and how long exports tend to take.

gwhusers commented 8 months ago

Thank you @arscan for the reply.

It is failing for the Multi Patient API test number 7.3.21, 7.3.22, 7.3.24 (here 7.3.23 is optional) is failing, in this we have the group of 8 patients and by the time provenance records of count 9000+ (around 9MB) we received and then token get expired and there is no specific way to refresh it and get the data. Here , token expiration time is 5 mins and while running test 7 and reaching to 7.3.21 due to huge chunks, by the time we get response the access token get expired.

Please let us know if there is any additional information required.