Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: HSTS support #139

Open
junkurihara opened this issue Jan 22, 2024 · 6 comments
Open

TODO: HSTS support #139

junkurihara opened this issue Jan 22, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@junkurihara
Copy link
Owner

RFC: https://datatracker.ietf.org/doc/html/rfc6797

Any idea of a configuration directive specifying HSTS for an app in TOML file?

@paulocoghi
Copy link

Looking into the security headers on Traefik documentation and examples (here), as well as this user suggestion, this could be one idea:

[http.exampleContext]
  
  [http.exampleContext.security.headers]
    forceSTSHeader = true
    stsIncludeSubdomains = true
    stsPreload = true
    stsSeconds=15552000

@paulocoghi
Copy link

But I don't like the idea of forceSTSHeader but, instead, something simpler like STSHeader

@junkurihara
Copy link
Owner Author

junkurihara commented Jan 24, 2024

Hi Paulo, thanks!

I think it makes sense. max-age (seconds), include_subdomains and preload need to be explicitly specified. But rpxy should enable HSTS only when the HSTS directive (e.g., [experiments.hsts]?) exists.

@junkurihara
Copy link
Owner Author

Also IMHO, HSTS does not need to be controlled separately for each backend applications. I mean it should be a global option for rpxy to keep the config file as simple as possible.

Or should we need such a flexibility for the settings of backend applications?

@junkurihara junkurihara added the help wanted Extra attention is needed label Feb 1, 2024
@Gamerboy59
Copy link
Contributor

Or should we need such a flexibility for the settings of backend applications?

Except for legacy compatibility, I see no benefit in per upstream configuration. HSTS is on its way to be the standard and a global configuration ensures this uniform security policies across all backend applications.

@akostadinov
Copy link
Contributor

Probably as a first step this can be enabled whenever https redirection is configured. Not sure about stsIncludeSubdomains though. Maybe that deserves a separate upstream option. It might be on by default, that's fine in case you believe this should be the standard. But other than that, whether you add a new global option or a new per-upstream option, the complexity of configuration is the same. But flexibility of the configuration is much higher when per-upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants