Document HSTS (HTTP Strict Transport Security) configuration and best practices
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- aws, azure, gcp, kubernetes, terraform
- Domain
- cloud, devops, documentation, security
Research direction
Start by locating the security/ingress documentation and deployment guides, then read src/_nebari/stages/kubernetes_ingress/init.py, src/_nebari/initialize.py, and the hsts-middleware.tf template to verify the documented defaults. Done means the HSTS explanation, configuration reference, AWS/GCP/Azure/local guidance, troubleshooting, and safety notes are present and consistent with the implementation.
Written by the indexing model from the issue text.
Description
Overview
Nebari now supports HSTS (HTTP Strict Transport Security) configuration. We need to add documentation to help users understand what HSTS is, how it's configured in Nebari, and best practices for using it safely.
What is HSTS?
HSTS (HTTP Strict Transport Security) is a security feature that forces browsers to only connect to a website over HTTPS, never HTTP. Once a browser receives the HSTS header, it will automatically upgrade all HTTP requests to HTTPS for the specified duration (max-age), protecting against downgrade attacks and cookie hijacking.
Important: HSTS can lock users out of their site if misconfigured, so proper testing is critical.
Documentation Tasks
1. Add HSTS Configuusersration Section
Create a new section (or subsection under security/ingress) that explains:
- What HSTS is: Brief explanation of the security feature and why it matters
- How HSTS works: Browser caching behavior, max-age concept
- When HSTS is enabled by default in Nebari:
- Automatically enabled for
lets-encryptandexistingcertificate types - Disabled for
selfsignedcertificates (default) - Users can override via
ingress.hstsconfiguration
- Automatically enabled for
2. Update Deployment Guides
For each deployment guide (AWS, GCP, Azure, local), add guidance on HSTS:
Initial Deployment
When users run nebari init, they will see this configuration in their nebari-config.yaml:
ingress:
hsts:
enabled: true # or false, depending on certificate type
max_age: 31536000
include_subdomains: true
preload: false
3. Configuration Reference
Document all HSTS options:
enabled(bool): Enable/disable HSTS headersmax_age(int): Duration in seconds browsers should remember HSTS policyinclude_subdomains(bool): Apply HSTS to all subdomainspreload(bool): Adds thepreloaddirective to the HSTS header- Setting this to
trueincludes thepreloaddirective in the header - To actually get on the HSTS preload list, you must also manually submit your domain at https://hstspreload.org/
- Warning: Once on the preload list, removal is difficult and slow. Only enable if you're committed to HTTPS forever.
- Setting this to
4. Troubleshooting Section
Add common issues and solutions:
Problem: "I can't access my site and get HTTPS errors"
- Cause: HSTS is enabled but certificate is invalid/expired
- Solution:
- If max_age is high, need to clear HSTS in browser settings, set max_age to 0 and redeploy. This tells browsers to immediately forget the HSTS policy.
5. Security Best Practices
- Only enable
preloadif you plan to submit to the HSTS preload list AND are committed to HTTPS forever - Test certificate renewals before they expire
Related Files in nebari Repository
src/_nebari/stages/kubernetes_ingress/__init__.pysrc/_nebari/initialize.pysrc/_nebari/stages/kubernetes_ingress/template/modules/kubernetes/ingress/hsts-middleware.tf
References
- Dominant language
- No language data
- Stars
- 21
- Forks
- 40
- Avg merge
- 19h 50m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nebari-dev/nebari-docs
-
area: documentation 📖
Difficulty 1/5 Under an hour Newbie friendliness 72/100
nebari-dev/nebari-docs#590 ·
-
area: documentation 📖 needs: PR 📬 type: enhancement 💅🏼
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
nebari-dev/nebari-docs#404 ·
-
area: documentation 📖 good first issue
Difficulty 1/5 Under an hour Newbie friendliness 68/100
nebari-dev/nebari-docs#342 ·
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
nebari-dev/nebari-docs#724 · 1 comment · 1 reaction ·
-
nebari-dev/nebari-docs#698 · 1 assignee ·
All issues in nebari-dev/nebari-docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
Feature needs-triage pulumi/registry
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
infrastructure launch: scale production
Difficulty 2/5 Half a day Newbie friendliness 72/100
Practitionist/familiarise_web#1772 ·