Finalize and merge the PR which replaces the API gateway with Traefik:
- Traefik is used in place of mender-api-gateway-docker
- All integration tests pass
This activity also fixes an issue we introcued with rate-limiting:
We have introduced rate-limiting in token verification endpoints (deviceauth and useradm-enterprise). Nginx calls those endpoints from the auth_request module.
Because of the way the auth_reqest module is working it was not possible to handle HTTP 429 properly. The auth_request module converts all the errors into HTTP 500. This is why we are rewriting all HTTP 500 to HTTP 429 which is not ideal.
We should fix handling of HTTP 429. One possible solution is to migrate from Nginx to Traefik. The other solution could probably be introducing some Lua script to our Nginx.
Target the feature branch: feature-deviceconnect