dmwm / WMCore

Core workflow management components for CMS.
Apache License 2.0
46 stars 107 forks source link

Obtain new Access token from Refresh one #11200

Open vkuznet opened 2 years ago

vkuznet commented 2 years ago

Impact of the new feature In order to perform any work based on token based authentication we should establish routine procedure to obtain new access token from a given refresh one.

Is your feature request related to a problem? Please describe. In order to access services or perform any work using token authentication we should periodically obtain access tokens from refresh one.

Describe the solution you'd like This issue should follow specific solution we need to decide from #11199 Once we decide on specific solution we adopt within WMCore/WMAgents we need to use it, most likely as cronjob, to obtain and store access tokens from given refresh one.

Describe alternatives you've considered

Additional context

11199 , #10118 , #10939

amaltaro commented 2 years ago

Should we put this issue in the context of WMAgent only? Even though the logic would be the same for central services, it would require developments in different areas and a decent amount of testing.

vkuznet commented 2 years ago

Alan, you will need to get access token everywhere in WMCore, e.g. when you access CMSWEB, or any other services in a future along with WMAgent activities. I doubt it should be strict to WMA only. Here are some use-case examples:

amaltaro commented 2 years ago

Yes, I know. But how we implement, monitor and test these are different (see my previous reply). Deployment also follows a different schedule, that's why I am in favor of separating WMAgent from central services (similar to what was done for CouchDB).