Can Google's Digital Asset Links file caching mechanism be manipulated?

随声附和 提交于 2021-01-29 08:36:11

问题


I am noticing the effects of a caching mechanism between my device & the DAL hosted at https://example.com/.well-known/assetlinks.json and I'm looking to understand how it works, and if it can be bypassed.

The issue is that I'm prototyping changes to the DAL (specifically adding another app, but the change should be irrelevant here for the purpose of the question), and changes aren't visible from the app's perspective. Example:

  1. I start with this DAL:
[
  {
    "relation": [
      "delegate_permission/common.handle_all_urls"
    ],
    "target": {
      "sha256_cert_fingerprints": [
        "<redacted>"
      ],
      "namespace": "android_app",
      "package_name": "com.my_app"
    }
  }
]
  1. I install com.my_app, verification succeeds.

  2. I edit the DAL to be the following (notice the addition of a second app entry):

[
  {
    "relation": [
      "delegate_permission/common.handle_all_urls"
    ],
    "target": {
      "sha256_cert_fingerprints": [
        "<redacted>"
      ],
      "namespace": "android_app",
      "package_name": "com.my_app"
    }
  },
  {
    "relation": [
      "delegate_permission/common.handle_all_urls"
    ],
    "target": {
      "sha256_cert_fingerprints": [
        "<redacted>"
      ],
      "namespace": "android_app",
      "package_name": "com.my_other_app"
    }
  }
]
  1. I install com.my_other_app, verification fails.
  2. Wait 24 hours, re-install com.my_other_app, verification succeeds.

The same can be observed using the Statement List Tester by Google; it will continue to reflect the specifications of an earlier DAL, for up to 24 hours (and so the issue isn't confined to a particular device/it's not an on-device caching layer that can be cleared).

This leads me to believe Google has a DAL cache that both the Statement List Tester & Android devices use. As I'm prototyping changes to understand undocumented behavior of DALs, having to wait an arbitrary and long amount of time is counter productive.

My question is: is the caching duration known, and can it be bypassed, reset?

来源:https://stackoverflow.com/questions/64915391/can-googles-digital-asset-links-file-caching-mechanism-be-manipulated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!