Closed Bug 1313596 Opened 9 years ago Closed 9 years ago

Increase HSTS priming cache timeout

Categories

(Core :: DOM: Security, defect, P3)

51 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: kmckinley, Assigned: kmckinley)

References

Details

(Whiteboard: [domsecurity-backlog1] [hsts-priming])

Attachments

(1 file, 1 obsolete file)

HSTS priming caches the result of failed priming requests for 24 hours. Increasing this to 7 days will reduce the occurrence of HSTS Priming requests that timeout. This will reduce the number of times users experience long delays with mis-configured sites.
Priority: -- → P3
Whiteboard: [domsecurity-backlog1]
Using a hardcoded value, but maybe this should be a pref?
Comment on attachment 8806248 [details] Bug 1313596 Increase HSTS Priming default cache timeout I don't have a strong opinion. For me using a hardcoded value in this case seems reasonable. I also don't think I should be reviewing those bits. Honza is definitely the right person to ask here.
Attachment #8806248 - Flags: review?(ckerschb) → feedback+
Whiteboard: [domsecurity-backlog1] → [domsecurity-backlog1] [hsts-priming]
Comment on attachment 8806248 [details] Bug 1313596 Increase HSTS Priming default cache timeout https://reviewboard.mozilla.org/r/89752/#review89704 ::: netwerk/protocol/http/nsHttpChannel.cpp:8004 (Diff revision 1) > } > > - // Don't visit again for at least one day > + // Don't visit again for at least HSTS_PRIMING_CACHE_TIMEOUT seconds > nsISiteSecurityService* sss = gHttpHandler->GetSSService(); > NS_ENSURE_TRUE(sss, NS_ERROR_OUT_OF_MEMORY); > - nsresult rv = sss->CacheNegativeHSTSResult(mURI, 24 * 60 * 60); > + nsresult rv = sss->CacheNegativeHSTSResult(mURI, HSTS_PRIMING_CACHE_TIMEOUT); please make a preference for this. see https://dxr.mozilla.org/mozilla-central/source/modules/libpref/Preferences.h for some nice and easy to use APIs (AddUintVarCache) add your preference to https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js I am not sure if this is a gecko (or even necko) feature or it's a browser feature. up to you to decide on the preference prefix (either browser. or network. or something else)
Attachment #8806248 - Flags: review?(honzab.moz) → review-
Comment on attachment 8806248 [details] Bug 1313596 Increase HSTS Priming default cache timeout https://reviewboard.mozilla.org/r/89752/#review91604 ::: dom/security/nsMixedContentBlocker.h:101 (Diff revision 2) > static bool sBlockMixedDisplay; > + // Do we move HSTS before mixed-content > static bool sUseHSTS; > + // Do we send an HSTS priming request > static bool sSendHSTSPriming; > + // Default HSTS Priming failure timeout // Default HSTS Priming cached failure timeout in seconds ::: dom/security/test/hsts/browser_hsts-priming_cache-timeout.js:1 (Diff revision 2) > + nit: remove the top blank line
Attachment #8806248 - Flags: review?(honzab.moz) → review+
Pushed by kmckinley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/91d0760b71d4 Increase HSTS Priming default cache timeout r=mayhemer
Backout by cbook@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e38456aa52a Backed out changeset 91d0760b71d4 on developers request
Attachment #8809308 - Attachment description: Increase HSTS Priming default cache timeout - fixup patch for missing tests → Increase HSTS Priming default cache timeout - fixup patch
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/817c3befbadc Increase HSTS Priming default cache timeout. r=mayhemer
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: