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

Specify includeSubDomains directive in data.gov HSTS response header #4575

Open
FuhuXia opened this issue Jan 3, 2024 · 2 comments
Open
Labels
bug Software defect or bug security Pull requests that address a security vulnerability

Comments

@FuhuXia
Copy link
Member

FuhuXia commented Jan 3, 2024

All subdomains of data.gov appear to be preloaded according to the https://hstspreload.org/ check, probably thanks to DotGov Program HSTS Preloading program. But we keep getting false alarms from the monthly SecOps invicti scan reports complaining certain data.gov apps are not HSTS prelaoded. In order to convince SecOps all *.data.gov (and *.*.data.gov) are preloaded, we can add the includeSubDomains directive to the data.gov top domain HSTS response header.

As of now, we have HSTS header as

$ curl -I  https://data.gov
...
strict-transport-security: max-age=31536000; preload
...

We would like it be: strict-transport-security: max-age=31536000; preload; includeSubDomains, as other gov domains do, such as cloud.gov and gsa.gov.

Sketch

The other approach is to add the includeSubDomains directive to all individual data.gov apps such as catalog-dev.data.gov where we have full control on the nginx conf, but it does not work for apps like inventory.data.gov where we don't have access to nginx conf.

@FuhuXia FuhuXia added the bug Software defect or bug label Jan 3, 2024
@gujral-rei gujral-rei moved this to 📔 Product Backlog in data.gov team board Jan 4, 2024
@gujral-rei gujral-rei added the security Pull requests that address a security vulnerability label Jan 18, 2024
@gujral-rei gujral-rei moved this from 📔 Product Backlog to 🧊 Icebox in data.gov team board Jan 18, 2024
@FuhuXia
Copy link
Member Author

FuhuXia commented Jan 31, 2024

has some discussion in the #admin-dns slack channel.

@FuhuXia
Copy link
Member Author

FuhuXia commented Jan 31, 2024

I am against serving data.gov website at https://data.gov externally. That is how we lost control on the HSTS header. Instead, we should serve it at https://www.data.gov, and do a 301 redirect from https://data.gov (internally hosted) to https://www.data.gov (externally hosted), during the redirect we can add our own HSTS header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software defect or bug security Pull requests that address a security vulnerability
Projects
Status: 🧊 Icebox
Development

No branches or pull requests

2 participants