<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>213471</bug_id>
          
          <creation_ts>2020-06-22 10:17:38 -0700</creation_ts>
          <short_desc>[WPE][GTK]  Add API to configure deviceidhashsalts directory to WebKitWebsiteDataManager</short_desc>
          <delta_ts>2022-09-19 10:31:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=239521</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=242438</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alex</cc>
    
    <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>rexlsf99</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1665086</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-06-22 10:17:38 -0700</bug_when>
    <thetext>I noticed I have a ~/.var/app/org.gnome.Epiphany.Devel/data/webkitgtk/deviceidhashsalts directory. ~/.var/app/org.gnome.Epiphany.Devel/data/webkitgtk/ should not exist at all because it indicates that WebKit is improperly saving website data outside Epiphany&apos;s base data directory (although fortunately the directory is empty?. We should fix it to use the configured base data directory, and maybe also expose API. (But: what are these really, deviceidhashsalts? What are they actually for?)

We should probably add a warning comment to WebsiteDataStoreGLib.cpp to warn not to add new default storage directories without hooking them up to base data directory in WebKitWebsiteDataManager.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665304</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-06-22 23:07:15 -0700</bug_when>
    <thetext>This is used by the DeviceIdHashSaltStorage, but I don&apos;t remember what this was for, WebRTC? Alex?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665307</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2020-06-22 23:45:52 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #1)
&gt; This is used by the DeviceIdHashSaltStorage, but I don&apos;t remember what this
&gt; was for, WebRTC? Alex?

Yep, it is for WebRTC, they are used to create the device id&apos;s the browser send to identify the mic and the camera in the enumerateDevices function. It avoids fingerprinting creating different ids per origin, but allows the user to configure a default device per origin. More information here:

https://w3c.github.io/mediacapture-main/#enumerating-devices

I think there is some API in WebsiteDataStoreConfiguration to change the directory but I don&apos;t remember if there is a way to change that from the glib API. This is the original commit:

https://trac.webkit.org/changeset/239513/webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665308</commentid>
    <comment_count>3</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2020-06-22 23:50:24 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; I noticed I have a
&gt; ~/.var/app/org.gnome.Epiphany.Devel/data/webkitgtk/deviceidhashsalts
&gt; directory. ~/.var/app/org.gnome.Epiphany.Devel/data/webkitgtk/ should not
&gt; exist at all because it indicates that WebKit is improperly saving website
&gt; data outside Epiphany&apos;s base data directory (although fortunately the
&gt; directory is empty?. We should fix it to use the configured base data
&gt; directory, and maybe also expose API. (But: what are these really,
&gt; deviceidhashsalts? What are they actually for?)
&gt; 

I agree, I think we should use the configured base data directory, they are removed when cookies are removed so the user has control over them, I don&apos;t think we need new API. It is a bug, we probably forgot to add the change of this directory and it is using the default location.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665310</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-06-23 00:14:08 -0700</bug_when>
    <thetext>(In reply to Alejandro G. Castro from comment #3)
&gt; (In reply to Michael Catanzaro from comment #0)
&gt; &gt; I noticed I have a
&gt; &gt; ~/.var/app/org.gnome.Epiphany.Devel/data/webkitgtk/deviceidhashsalts
&gt; &gt; directory. ~/.var/app/org.gnome.Epiphany.Devel/data/webkitgtk/ should not
&gt; &gt; exist at all because it indicates that WebKit is improperly saving website
&gt; &gt; data outside Epiphany&apos;s base data directory (although fortunately the
&gt; &gt; directory is empty?. We should fix it to use the configured base data
&gt; &gt; directory, and maybe also expose API. (But: what are these really,
&gt; &gt; deviceidhashsalts? What are they actually for?)
&gt; &gt; 
&gt; 
&gt; I agree, I think we should use the configured base data directory, they are
&gt; removed when cookies are removed so the user has control over them, I don&apos;t
&gt; think we need new API. It is a bug, we probably forgot to add the change of
&gt; this directory and it is using the default location.

Why are they removed with cookies? It&apos;s a website data type, so you can fetch and remove it individually like any other type.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665327</commentid>
    <comment_count>5</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2020-06-23 03:58:14 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #4)
&gt;
&gt; [...]
&gt;
&gt; &gt; I agree, I think we should use the configured base data directory, they are
&gt; &gt; removed when cookies are removed so the user has control over them, I don&apos;t
&gt; &gt; think we need new API. It is a bug, we probably forgot to add the change of
&gt; &gt; this directory and it is using the default location.
&gt; 
&gt; Why are they removed with cookies? It&apos;s a website data type, so you can
&gt; fetch and remove it individually like any other type.

It is a recommendation in the spec of how to handle the security information to do it like cookies. It means, we can add support to remove this specific information for a website, but I think currently we just implemented removing it when cookies are removed, this was a long time ago but if I recall correctly this is the code added:

https://trac.webkit.org/changeset/239513/webkit/trunk/Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1665356</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-06-23 06:10:03 -0700</bug_when>
    <thetext>Maybe the spec&apos;s recommendation was intended for browsers that don&apos;t expose separate website data types in the user interface.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881265</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-07-07 02:39:34 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; Maybe the spec&apos;s recommendation was intended for browsers that don&apos;t expose
&gt; separate website data types in the user interface.

I think we can choose to expose the data type in the API, but still
recommend in the documentation that regular browsers should clear
it along with cookies—unless they have a compelling reason.

Also FTR, I agree that we don&apos;t want to expose an ever-increasing
amount of settings for each single small bit of data. Deriving from
the base directories should be the norm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899529</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-19 10:31:31 -0700</bug_when>
    <thetext>These APIs are all deprecated since 253824@main. Don&apos;t need to add more.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>