這種 Google LVL 政策實施是否合理安全? (Would this Google LVL policy implementation be reasonably secure?)


問題描述

這種 Google LVL 政策實施是否合理安全? (Would this Google LVL policy implementation be reasonably secure?)

The default ServerManagedPolicy that Google provides in their License Verification Library relies on the server responses to determine the license revalidation interval. This results in requiring a revalidation every few days, in perpetuity. This is not only a nuisance to users, it can be a serious problem for users who go extended periods with no connectivity. (We just had an inquiry from a user who expects to be without Internet connectivity for several weeks, which is what motivates this question.)

In summary, I'm looking for an algorithm that will accomplish two things: 

  1. drastically reduce the connectivity requirements compared to ServerManagedPolicy;
  2. provide the same level of anti‑piracy protection.

In an answer to this question the suggested policy algorithm is to ignore the times provided in the response from Google's server and instead to use a LICENSED expiration period of about a month, with license checks being attempted every few days (to extend the expiration period if a LICENSED response is received).

While this approach partially addresses the first goal, it still requires users to be connected once a month while using the app, so it would not work for (at least one of) our users.

The following algorithm accomplishes the first goal, but I don't know about the second. Any comments pointing out weaknesses of this algorithm, or suggestions for another approach, would be welcome.

  1. On first run, do a license check and insist on a LICENSED response before providing full functionality. Once received, set a relatively short expiration period (but longer than the refund period that Google Play provides, currently 15 minutes). Also register a grace period of a few days beyond that.
  2. The app would start checking again after the license expiration period. If it failed to connect (airplane mode, etc.), it would still function until the expiration of the grace period.
  3. After expiration of the grace period, insist on a second LICENSED response before allowing normal app functioning.
  4. After receiving the second LICENSED response, permanently enable all features of the app and never bother checking again.
  5. If an UNLICENSED response is received at any point, permanently disable full functionality. (The user can, of course, revert to step 1 by deleting all app data.)

Additional points: 

  • A suggestion was made to forgo the first license check and wait until the expiration of the return period before doing a license check. The purpose of insisting on the first LICENSED response is to prevent the exploit where, after a license check fails, the user simply stops the app process, clears the app data, and restarts the app. (The app provides value even if usable for only 15 minutes at a time.)
  • The purpose of insisting on a second LICENSED response is to get around the buy‑run‑backup‑return‑restore exploit.
  • I'm not asking whether call‑back license checking is a good idea or not (that's what Google offers in place of their deprecated copy protection mechanism). I'm also well aware that no anti‑piracy protection is foolproof and Google's entire licensing mechanism can be circumvented (in which case all questions about design of a policy algorithm are irrelevant). The main point of this question is the relative risks (to us) and benefits (to the user) of the above algorithm as compared to other policies (such as the ServerManagedPolicy).

‑‑‑‑‑

參考解法

方法 1:

In regards to piracy, there's always going to be a risk, nothing you do will prevent it completely.

As opposed to other risks, you risk upsetting your customers with an app they can't use. 

I would expect a lot of 0* reviews from unhappy customers who can't even use an application they paid for as it's been disabled, whereas the people who got the app for free will likely have no interruptions. It's like buying a dvd and getting your face full of copyright warnings, when the pirates receive uninterrupted viewing.

I would insist on a licensed response when purchasing the app, and not bother with the second response. If someone can find their way around one response, they will find their away around the second. 

Edit: I agree with kcoppock that a licensed check 20 minutes after purchasing would cause the least interference to customers and avoid the refund bug you've mentioned

(by Ted HoppAlex)

參考文件

  1. Would this Google LVL policy implementation be reasonably secure? (CC BY‑SA 3.0/4.0)

#android-lvl #algorithm #Android #access-rights #google-play






相關問題

這種 Google LVL 政策實施是否合理安全? (Would this Google LVL policy implementation be reasonably secure?)

在 SDK 管理器中找不到 Google 市場許可包 (Cant find Google Market Licensing package in SDK Manager)

在 Google Play 上查詢應用程序當前版本的更快方法? (Faster Way to Query Application's Current Version on Google Play?)

Android 應用許可檢查 (Android app licensing check)

Ứng dụng Giấy phép Android hiển thị Không được cấp phép? (Android License App showing Not-licensed?)

導入 com.google.android.vending 無法在導入的 android 項目中解析 (The import com.google.android.vending cannot be resolved in an imported android project)

Android“Not_Market_Managed”錯誤 (Android “Not_Market_Managed” error)

是否可以向服務添加許可證檢查(使用許可證驗證庫)? (Is it possible to add a license check (using License Verification Library) to a Service?)

應用程序許可和 android 唯一 ID (Application Licensing and android unique id)

Android 許可 - 每個 Android 開發者帳戶只有一個公鑰? (Android Licensing - Only one public key per Android Developer account?)

測試 Android LVL,許可證檢查總是失敗,沒有網絡 (Testing Android LVL, license check always fails with no network)

什麼時候從服務器返回 LICENSED_OLD_KEY? (When is LICENSED_OLD_KEY returned from server?)







留言討論