Currently a new access token is generated for each time a new function instance starts. This is affecting the performance of the filescan workflow. We should investigate how we can cache the access token inbetween function instances or look into alternative ways to authorize the request to the filescan component.
Caching of certificate should be 1 hour
Also check that we cache the AccessToken. Should also be cached for 1 hour.
Additional Information
This change has already been done in Events functions.
Tasks
[x] Add caching of the sertificate to the FileScan function
[x] Review (QA)
[x] Regression test
[x] Verify kv access count has dropped
Acceptance Criterias
[x] The certificate used in AccessToken signing is not downloaded for every function execution.
Check kv access logs to confirm
Description
Currently a new access token is generated for each time a new function instance starts. This is affecting the performance of the filescan workflow. We should investigate how we can cache the access token inbetween function instances or look into alternative ways to authorize the request to the filescan component.
Caching of certificate should be 1 hour Also check that we cache the AccessToken. Should also be cached for 1 hour.
Additional Information
This change has already been done in Events functions.
Tasks
Acceptance Criterias