In ASP.NET Core 2.2 application we have enabled HSTS using app.UseHsts(); which adds HSTS with max-age of 30 days in the response header.
In the fiddler
Strict-Transport-Security: max-age=2592000
Then in Chrome, if I go to chrome://net-internals/#hsts and query our domain name, I get:
Found:
static_sts_domain:
static_upgrade_mode: UNKNOWN
static_sts_include_subdomains:
static_sts_observed:
static_pkp_domain:
static_pkp_include_subdomains:
static_pkp_observed:
static_spki_hashes:
dynamic_sts_domain: subdomain.example.com //our domain name here
dynamic_upgrade_mode: FORCE_HTTPS
dynamic_sts_include_subdomains: false
dynamic_sts_observed: 1572023505.777819
dynamic_sts_expiry: 1574615505.777818
Questions
- What is the unit of
dynamic_sts_observedanddynamic_sts_expiry. It does not look like it's in seconds. How is the value calculated? - If user keeps visiting site every day, does the value keep updating? In other words, is it sliding expiration?
- What happens after expiry?
- What happens if user has already visited the site and his browser already cached HSTS for 30 days. But in couple of days we changed the value from 30 days to 90 days. When would user's browser get the updated value? After expiry or on next visit?
- the URL user browse is already a subdomain like
https://subdomain.example.comThe SSL certificate we use is wildcard certificate.*.example.com. So HSTS configuration do i need to includeSubdomain? likeStrict-Transport-Security: max-age=2592000, includeSubDomain