CenterForDigitalHumanities / rerum_server_nodejs

Other
1 stars 1 forks source link

Auto Refresh Bot Tokens #178

Open thehabes opened 2 months ago

thehabes commented 2 months ago

It used to be that it never mattered whether or not the bot tokens expired. As the RERUM API code has shifted and evolved, this affordance has dissolved. As such, every increment (3 mos? 6mos? 12mos?) the bot token expires. This causes the CI/CD and tests to experience 401s which stop deploys from occurring on dev and prod.

Just like with all other applications, the RERUM API bots should be able to refresh themselves automatically when this occurs. We also have the option to bring back perma-tokens for bots.

cubap commented 2 months ago

refreshing token would also require updating GitHub secrets and Auth0, which may not be feasible. Probably better is an alternate secret we can encode as a backdoor. If the token claim and secret match expectations, we execute.

cubap commented 2 months ago

for testing, we could have an environment flag that overrides the check