http://security.slashdot.jp/story/13/02/24/0858210/
Firefox 22のCookieに関するポリシー変更(予定)で具体的にどういう悪影響が懸念されるのかについて書きます。
この変更は「サードパーティCookieをデフォルトでブロック」と言われて想像するものと少し違います。
正確には既にCookieが保存されているドメインであれば3rd party cookieの読み書きを緩和して、新規での3rd party cookieの保存をブロックするというものです。Safariの現行のポリシーとほぼ同じものです。
- 自分は直接的な不利益を受ける立場ではない。
- 自分の所属している企業のWebサイトの多くは広告収益に依存しているが、この変更があっても「巨大な」インパクトは恐らくない。
- 常用している全てのブラウザで3rd party cookieをブロックしているし、30%ぐらいのユーザーがそうであって良いと思っている。
パッチが取り込まれるのは分かるし、選択肢が増えるのは基本的に良いことだ。Safari likeなポリシーを「新設」するのは悪くない。それを必要とする人がいるだろう。(トラッキングCookieを「概ね」拒否したいが、普段使っているサイトがいきなり動かなくなるのは困る、といった人たち)
けれども、それをデフォルトにするのは、本当に良くないことだ。10年前ならいざしらず、今この変更を行うのは非常に悪手であると考えている。純然たるトラッキングcookieだけを破壊して、likeボタンは壊さない。それを副作用が少なく、ウェブを壊さないというならMozillaが「破壊して良いもの」と「破壊してはマズイもの」の選別を行っていることだ。ログイン出来なくなるのは「ウェブを壊す」けれど、広告の精度が下がるのは「ウェブを壊さない」というのか?この変更によってもたらされる影響の割には、bugzillaやMLでのやり取りは、いささかクローズドである。最初からトラッキングは邪悪なものであるという結論ありきで、少人数での意思決定が行われている。
影響が少ないのは当たり前だ。それは単に見かけ上、表面上の影響が少ないだけだ。
- Web開発者がSafariとFirefoxのために特別なコードを追加しても
- 広告のクリック率やコンバージョン率が下がって収益が低下しても
- あるいはそれらが正確に測定できなくなることによる予期できない影響があっても
- 広告収益が低下した結果ユーザーの負担が5ドル増えても、社員の給料が下がっても
- 代わりに大規模なログデータの交換やIPアドレスやfingerprintによるトラッキングが行われるようになっていても
ユーザーは気付かないだろう。Webがぶっ壊れたことに気付かないだろう。
この変更の副作用は少ないでしょう、しかし問題は確実に起きます。Safariの最近のバージョンアップで既に経験しています。問題が起きないとすれば、Safariを特別扱いして、迂回策を取っているからです。あるいは、単に動かないサイトに見切りをつけて黙って去るか、動作する別のブラウザに移行しています。
日本のSNSでのsafariワークアラウンド
- https://docs.developer.gree.net/ja/technicalspecs/featurephone/transitionpointsforsmartphone
- http://developer.mixi.co.jp/page-apps/spec/cookie_enable_api/
iframe内でcookieをセットするために、first partyとしてcookieをセットするようにリダイレクトするという回避策が取られています。
Firefoxが新しいポリシーに移行した場合どうなるかというと
バージョンアップしても取り敢えずそのまま動く(既存cookieあれば) → 履歴消去やブラウザリセットしたら突然動かなくなる(Safariと同等になる)
という状況が発生することが予想されます。これは「ちょっと特殊」な状態だ。「ほとんどのケースで問題を起こさない」だろう。だからこそ、問題が発生したときに原因が特定しにくい、再現が困難になる。Web開発者には混乱を引き起こすでしょう。何か問題が発生したときにはとりあえず「ブラウザをリセット」「Cookieを削除」といったユーザーサポートがよく行われるが、この場合は逆に動かなくなる。
で、iframe内アプリは、世の中に結構あるはずだ。表面的な問題を起こさないだけでcookieがセット出来ないことによる問題が起きている可能性もある。safariのための迂回処理を入れてたアプリは今度はFirefoxか、となる。とにかくCookieは全部有効にしろ or 別のブラウザを推奨、となってもおかしくない。とにかくChromeが強いし推奨しない理由がない。Chromeが最もWebサイトとの互換性に優れたブラウザになるだろう。
例えば、Facebook Exchangeのことを考えてみる。Facebookは外部の広告会社と連携してFacebook内に表示する広告でリターゲティングとRTBを行う広告メニューを持っている。これはそれなりにうまくいっているようだ。「Facebookが直接外部サイトをトラッキングをせず」「広告会社からはFacebook idが分からない」ようになっている。
Firefoxがcookieのポリシーを変えるとxx%のユーザーでこれが動かなくなる。「広告会社のドメインを直接訪問」なんてことは基本的にしないからね。(バージョンアップ直後は動くだろうけど徐々に動かなくなる)
何となくクリック率高そうなのを出す、のではなく、リターゲティングのような、そのサイトを訪問したことを使っている場合、これはトラッキングに強く依存している。精度が下がるどころのレベルじゃなくて、まるで成立しなくなるわけだ。トラッキング出来てないなら出来てないで、地域、言語、OSブラウザ、時間帯などに応じて「その場限り」のターゲティングを行って、無難な広告を出せばいいわけだけど、リターゲティングが主力であれば、最適化のヒントがまるで無い。
Safari likeなポリシーが普及した暁には、純粋なサードパーティCookieのセットが困難になるので、失われた売り上げを回復しようとした場合、Facebookは、facebook.com 上に、広告目的のためのユーザーのプロフィールと関連付けない「匿名の」トラッキングidを作ることになるだろう。これは本当に悪魔の囁きのような悪い手段だけれども、safari likeなポリシーの割合が増えれば増えるほど、これをやらざるを得ない、正当化される状況になるだろう。
facebook.com のcookieの利用目的は、facebookのサインアップ時に説明をして、デフォルト有効のチェックボックスが用意され、ユーザーはそれに同意をする。望めばオプトアウトが出来る。これには何の問題もなく全ての国で合法だろう。サードパーティCookieがセット出来ることに強く依存している、トラッキング専業の会社はこのタイミングで早々に死んでいるかも知れない。いくつかの広告会社は、広告のクリック時にfirst partyとしてcookieをセットすることが出来るだろう。だが、分業化、専業化が進んでいることで、いくつかの事業者は、first partyとしてcookieをセットする機会が「全くない」。
今まではこう:広告会社はFacebookに直接履歴を提供しないし、Facebookは広告会社にFacebookのプロフィールやidを提供しない。ユーザーから見たら「裏で悪いことをしてても分からない?」本当にそうだろうか。これは「広告会社」と「Facebook」の2社が関わる契約だ。結託しないと悪事が出来ない。これは単独で悪事ができる場合と比べて遙かにマシだ。あなたが直接的に広告会社にユーザー登録しない限り、広告会社はあなたが誰であるのかを知らない。知りたいとすら思わないだろう、最適な広告が配信出来ればそれでいいのだから。
これがFacebookが単独で、匿名のidを新規に作ってトラッキングをしていますが、プロフィールとは関連付けません、とした場合どうだろうか。これは、Facebook 1社だけで成り立つ。内部でどう処理をしているのか分からない。裏でこっそり、Facebookのidと紐付けて別の個人データをヒントにしていても、特定ユーザーの訪問サイトを気軽に集計できるようにインデックスが張られていても、分からない。Facebookが信頼できないという話ではない、匿名idでトラッキングをするというなら、それは多分匿名idでのトラッキングになるのだろう。それが守られていることを外部から保証することが出来ない。
https://www.facebook.com/help/293506123997323/ "データの使用に関するポリシーに記載されるように、弊社はFacebook内外で広告を表示する際にクッキーを使用します。あなたがログインしているかどうかに関わらず、弊社は、あなたが[いいね!]ボタンまたは他のソーシャルプラグインが実装されたサイトにアクセスした際に送信される情報を、第三者のサイトでのあなたのブラウズ行為のプロフィールを作成して、広告を表示させるために使用することはありません。"
Facebookは、likeボタンを使ってユーザーのブラウズ行為のプロフィールを作成したり広告目的に使うことはないと明言している。なぜそれをやらないのか、やる必要がないのか。Facebookは広告枠だけを提供し、外部サイトのトラッキングは外部の広告会社に任せることが出来るからである。今、3rd party cookieをブロックするということは、こういった広告システムの生態系を破壊することになる。
既に何人かが指摘していることだが、この変更はfirst partyとしてcookieをセットする機会が多い、big playerに優位性を与える。しかし、これは単に優位性を与えるという話ではない。google.com facebook.com amazon.com yahoo.com のような、ログインしている可能性が高く、実世界の住所氏名などを併せて持っている可能性が高い企業が、既にcookieを持っている可能性の高いドメインでのトラッキングを行う、そのような状況を作ってしまうことは危険である。
ユーザーに取っての不利益が大きく、避けなければならないことは何か。A:実世界でのプロフィールを伴う広範なWebサイトのトラッキング B:ユーザーから変更が困難な情報を使ったトラッキング(IPアドレス、fingerprint) である。今、3rd party cookieをブロックすることは、むしろ、A,Bを促進することに繋がるだろう。3rd party cookieを「使ってくれている」のであれば、それは「善良な」事業者である。匿名idでのトラッキングを行い、オプトアウト手段を用意し、DNTを尊重してくれるだろう。
サードパーティCookieがブロックされることで、よりユーザーから見て、透明性が低く、悪事が発覚しにくい手法が取られるようになる。いや、そのような手法を取らざるを得なくなる。既に大規模なサービスを展開して広告事業も行っている会社は、SNSを提供しているドメインで、同時に広告向けのトラッキングを行うようになるだろう。今までサードパーティCookieに依存していた広告会社はfingerprint技術を使ったトラッキングや、大規模なログデータの交換に手を出すだろう。Cookieはブロックすればそれで拒否できるが、fingerprintやログ交換が行われていることはユーザーから感知すら出来ない。こういった裏側でのデータの取扱にまでユーザーの意思を反映させようとしたら、ハードブロックしたければTorを使い、ソフトブロックしたければDNTになるだろう。そしてDNTはサイト毎の設定ができず、全てのトラッキングを拒否することになる。
DNTの「拒否するならすべて拒否」という大雑把さが原因で、悪質な事業者が一つでもあればユーザーはDNTをグローバルに有効にしなければいけなくなる。そして、SNS事業者は利用規約と同意のチェックボックスで「上書き」して、DNTが有効か無効かとは無関係に、トラッキングを行うことができるだろう。結局のところ、強い事業者はより強く、弱い事業者は滅びる。
トラッキングはオプトインであると考える人にとって、この変更は第一歩かもしれません。しかし、単にリダイレクトすれば良い。対話なく、3rd party cookieを有効化できる。ユーザーとの対話が重要で、オプトインにすべきだと考えるなら、サイト毎のDNT設定や、Webサイト側からサードパーティCookieの例外を追加するためのAPIを用意することが優先すべきことです。この変更が招くことは、不用意な混乱や別のブラウザへの乗り換えや、「とにかくCookieを全て受け入れるように」といった案内や、別のより制御しにくい手段でのトラッキングへの移行でしょう。
サードパーティによるトラッキング自体について、オプトインで行うことが求められている国ではどうだろうか。真面目なサイトであれば、そのサイトに登録して「トラッキングを有効化する」ように選択した場合や、first party cookieによってオプトインのフラグを持っている場合にのみ、サードパーティのトラッキングコードを読み込むような変更が行われているだろう。
Safariがiframe内でのform post時にcookie受け入れを緩和するというポリシーを持っている場合は、ユーザー体験を妨げること無く、iframe内のformポストによって「オプトイン」を実現することが出来た。しかし、iframe+form postでの緩和ポリシーは現在では削除されている(Google+Safari問題以降)。今は「既にcookieを持っているドメインであれば緩和」のポリシーのみである。
ブラウザが「初見の3rd party cookieをブロックする」というポリシーを採用した場合、ユーザーがオプトインで有効化したとしても、3rd party cookieはブロックされる、正確にはセット出来るかどうかが予測できない。cookieのクリア直後であれば、確実に画像やiframeではcookieを新規セットすることが出来ない。first partyとしてcookieをセットするために、使用する全てのサードパーティのドメインにリダイレクトしなければ、オプトイン機能が実現できないことになる。この特殊な挙動はSafariだけであったので、恐らく多くのサイトは単にcookieをセット出来なければ諦めて、無視してきた。あるいはSafariでも使えるような代替Cookieによるトラッキングを行ってきた。
これが、Firefoxが追随して、代替Cookieが制限され「リダイレクトによってfirst partyとしてcookieをセットする」という慣習が一般的になった場合どうなるだろうか。
ユーザーがオプトインしていて、サードパーティのドメインのcookieが空であった場合、期限が切れた、個別に削除された、セキュリティソフトが削除した、様々な理由が考えられるが、そのような場合には再びトラッキングcookieをセットするためにサードパーティのドメインにリダイレクトせねばならなくなるだろう。開発者がそこまで熟練しておらず、ユーザーがオプトインしつつCookieを拒否しているような場合、不幸にもリダイレクトループが発生することになるだろう。平均的なWeb技術者はこのような問題を解決できないし、単にCookieを有効にしてくれというだろう。Facebookですら(3rd party cookieブロック時に)likeボタンを押したときに無限にポップアップウィンドウを開く。
ブラウザに対して「このドメインは3rd party cookieを使用するので例外に追加してくれ」という許可を求めるためのインターフェースが存在していない。唯一の手段が腐ったP3Pだけだ。トラッキングはオプトインで行うべきだ、と考えている人にとっても、そのような法律がある国であっても、この変更はWebサイト運営者の負担を増加させるだけで、解決手段を与えていない。影響が少ないというならばそれはSafariのシェアが低くて無視されているだけか、あるいは既にlocalStorageを使ったトラッキングに移行している結果だ(モバイル市場において既に広く使われてしまっている)。