Title: Review `traefik` configuration, preferably implement a completely dynamic configuration · Issue #62 · anomaly/lab-python-server · GitHub
Open Graph Title: Review `traefik` configuration, preferably implement a completely dynamic configuration · Issue #62 · anomaly/lab-python-server
X Title: Review `traefik` configuration, preferably implement a completely dynamic configuration · Issue #62 · anomaly/lab-python-server
Description: Is your feature request related to a problem? Please describe. The current traefik configuration is a relic from when the team was working on projects and deploying them via docker-compose on Linode servers. The first issues as amongst m...
Open Graph Description: Is your feature request related to a problem? Please describe. The current traefik configuration is a relic from when the team was working on projects and deploying them via docker-compose on Linod...
X Description: Is your feature request related to a problem? Please describe. The current traefik configuration is a relic from when the team was working on projects and deploying them via docker-compose on Linod...
Opengraph URL: https://github.com/anomaly/lab-python-server/issues/62
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Review `traefik` configuration, preferably implement a completely dynamic configuration","articleBody":"**Is your feature request related to a problem? Please describe.**\r\nThe current `traefik` configuration is a relic from when the team was working on projects and deploying them via `docker-compose` on `Linode` servers.\r\n\r\nThe first issues as amongst many of the things that I took handovers on is inconsistency. For example here there are various elements configured via the `dynamic` route and then others via the `static` route. \r\n\r\nHere's an extract from the current production `docker-compose` file for production:\r\n\r\n```labels\r\n - \"--providers.docker\"\r\n - \"--providers.docker.exposedbydefault=false\"\r\n - \"--providers.file\"\r\n - \"--providers.file.filename=/opt/traefik/traefik-dynamic.toml\"\r\n```\r\n\r\nthis shows how there are a couple of different ways configurations are being read.\r\n\r\nFurther there are various security concerns in the configuration:\r\n\r\n- `HSTS` headers are missing\r\n- The configuration allows for older versions `TLS` that are known to have security vulnerabilities \r\n- `X-Frame-Options` to be set to `DENY`\r\n\r\n**Describe the solution you'd like**\r\nIdeally we want to use a completely `dynamic` configuration based on the `docker` or `kubernetes` [providers](https://doc.traefik.io/traefik/providers/overview/). A dynamic configuration would allow us to use variables which would make the configuration generic for all our projects.\r\n\r\nSecondly we need to review the labels associated to the API container. These are a relic from when the team was working on in the applications in 2021.\r\n\r\nProperly review the security requirements of modern web applications:\r\n- [HTTP Strict Transport Security](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) (HSTS)\r\n- Support good known versions of TLS\r\n\r\nThe ultimate aim of the template is to achieve `A+` security rating on any testing platform.\r\n\r\n> Note this ticket should be updated once a proper review of security standards has been conducted.\r\n\r\n**Reverse proxy considerations**\r\nOur configure should provide reverse proxy configurations:\r\n- For containers e.g API or front end [wrapped in container](https://github.com/anomaly/lab-web-client/issues/17) (accompanying [docs](https://github.com/anomaly/lab-web-client#docker-container-for-production))\r\n- Proxying Object stores for serving front end clients and assets (where scale is a factor)\r\n- Considerations for sitting behind a content distribution network\r\n\r\n**HSTS configuration**\r\nLabel based configuration for HSTS, as [per this article](https://calvin.me/hsts-with-traefik/) (again this is subject to be reviewed after my research)\r\n```\r\ntraefik.frontend.headers.STSSeconds: \"31536000\"\r\ntraefik.frontend.headers.STSIncludeSubdomains: \"true\"\r\ntraefik.frontend.headers.STSPreload: \"true\"\r\n```\r\n\r\n**Describe alternatives you've considered**\r\nNone as this is the template that should serve our other applications\r\n\r\n**Additional context**\r\nAs realised with much of the work that was done in 2021, these configurations are uniformed from a security standpoints and should be abandoned and built from the ground up.\r\n\r\nUltimately we should put the configuration through [SSLlabs](https://www.ssllabs.com/ssltest/index.html) and see it meets the A+ requirements of a modern web application.","author":{"url":"https://github.com/devraj","@type":"Person","name":"devraj"},"datePublished":"2023-02-14T22:35:26Z","url":"https://github.com/anomaly/lab-python-server/issues/62"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:248d84ae-1c7c-96b1-e151-8123ac9fb0e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 986E:3F539E:742D81:9F4D08:6B0479E4 |
| html-safe-nonce | 676d24d6e6f72fab955e697587ba02215d4cfad36dd23369237c71f0561e1c61 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODZFOjNGNTM5RTo3NDJEODE6OUY0RDA4OjZCMDQ3OUU0IiwidmlzaXRvcl9pZCI6IjI2MTU1NDAyNDM1OTE2MjUxODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a0d474b6063dc311b8d2fbf5f792bc290f7b568bf11bc5003a358601905dacfe |
| hovercard-subject-tag | issue:1584928476 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/anomaly/lab-python-server/62/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dae10b792bb15fb03c9b8390df791dd0d535259f8aa1421ba6def7fb9650250a/anomaly/lab-python-server/issues/62 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dae10b792bb15fb03c9b8390df791dd0d535259f8aa1421ba6def7fb9650250a/anomaly/lab-python-server/issues/62 |
| og:image:alt | Is your feature request related to a problem? Please describe. The current traefik configuration is a relic from when the team was working on projects and deploying them via docker-compose on Linod... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devraj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| turbo-cache-control | no-preview |
| go-import | github.com/anomaly/lab-python-server git https://github.com/anomaly/lab-python-server.git |
| octolytics-dimension-user_id | 3654837 |
| octolytics-dimension-user_login | anomaly |
| octolytics-dimension-repository_id | 491764445 |
| octolytics-dimension-repository_nwo | anomaly/lab-python-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 491764445 |
| octolytics-dimension-repository_network_root_nwo | anomaly/lab-python-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width