Security/Safe Browsing/V4 Implementation: Difference between revisions

→‎Try Google Safe Browsing v4!: improve the instructions on how to enable V4
(→‎Using custom API key: simplify API key instructions)
(→‎Try Google Safe Browsing v4!: improve the instructions on how to enable V4)
Line 32: Line 32:
# Rebuild and check if <tt>config.status</tt> has something like <tt>'MOZ_GOOGLE_API_KEY': b'AIzaSooxxxxoxoxoxoxooxx'</tt>
# Rebuild and check if <tt>config.status</tt> has something like <tt>'MOZ_GOOGLE_API_KEY': b'AIzaSooxxxxoxoxoxoxooxx'</tt>


= Try Google Safe Browsing v4! =
= Try Google Safe Browsing V4! =
v4 tables are suffixed by "-proto", to indicate that the table should be updated and completed via protobuf: goog-phish-proto, goog-unwanted-proto and goog-malware-proto.
To use Google Safe Browsing v4, change preferences as follows:


# '''urlclassifier.phishTable''' to '''goog-phish-proto'''
To use Google Safe Browsing V4, set the following preferences:
# '''urlclassifier.malwareTable''' to '''goog-malware-proto'''
# '''browser.safebrowsing.provider.google4.gethashURL''' to '''https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_API_KEY%'''
# '''browser.safebrowsing.temporary.take_v4_completion_result''' to '''true'''


To use v4 while v2 is still up and running, set the names of both v2 and v4 tables:
# <tt>urlclassifier.downloadAllowTable</tt> to <tt>goog-downloadwhite-proto</tt>
# <tt>urlclassifier.downloadBlockTable</tt> to <tt>goog-badbinurl-proto</tt>
# <tt>urlclassifier.phishTable</tt> to <tt>goog-phish-proto,test-phish-simple</tt>
# <tt>urlclassifier.malwareTable</tt> to <tt>goog-malware-proto,goog-unwanted-proto,test-malware-simple,test-unwanted-simple</tt>


# '''urlclassifier.phishTable''' to '''goog-phish-proto,goog-phish-shavar'''
To use both V4 and V2 at the same time:
# '''urlclassifier.malwareTable''' to '''goog-malware-proto,goog-malware-shavar'''


If you want to completely get rid of v2, you could also set the following preferences to empty string
# <tt>urlclassifier.downloadAllowTable</tt> to <tt>goog-downloadwhite-proto,goog-downloadwhite-digest256</tt>
 
# <tt>urlclassifier.downloadBlockTable</tt> to <tt>goog-badbinurl-proto,goog-badbinurl-shavar</tt>
# '''browser.safebrowsing.provider.google.lists''' to '''""'''
# <tt>urlclassifier.phishTable</tt> to <tt>goog-phish-proto,goog-phish-shavar,test-phish-simple</tt>
then you are ready to go!
# <tt>urlclassifier.malwareTable</tt> to <tt>goog-malware-proto,goog-unwanted-proto,goog-malware-shavar,goog-unwanted-shavar,test-malware-simple,test-unwanted-simple</tt>


= Milestones =
= Milestones =
Confirmed users
908

edits