Resolve "Replace the refresh token locking mechanism"

Summary of Changes

Switching to PSQL advisory locks (when available). Moving locks to providers (to lock only if a token needs to be refreshed). This resulted in a bit of duplicated code, but it should be cleaned if/when we update with upstream where they merged custos_auth and psa_auth.

It is kind of hard to test (when we saw an error with file locks after multiple months of good behavior :(). I tested locally - seems to work.

Checklist

  • The MR has a clear and concise title
  • Code is self-documented and follows style guidelines.
  • Automated tests are written and pass successfully.
  • Regression tests (e.g. manually triggered system tests, manual GUI/tool tests, ...) are performed to make sure the MR does not break anything (when applicable)
  • Readme file is present and up-to-date.

Documentation Updates

Additional Notes

Closes #151 (closed)

Merge request reports

Loading