security - How to restrict Chrome Apps to only work on specific computers? -


i'm developing pos client using chrome (packaged) apps. run locally on installed computers , interact server via web service. app should run on specific computers @ stores.

i know can go each store , install .crx file in case don't have publish app chrome web store. however, want published chrome web store can take advantage of auto-updating feature.

what should make sure app can run @ stores' computers? (i can go the stores , setup needed @ first installation).

options have thought of:

  1. create secret key , enter app @ first time of running.
  2. build small tool (winforms application) generate time-based tokens , install on computers. staff need enter token each time opening app.

any better idea how accomplish this?

you said app needs talk web service work. that's key simple approach. (assume don't care whether staff acquires nonfunctional copy of client app.)

  • at startup, app checks existence of validation of kind stored in chrome.storage.local. if exists, startup continues.
  • if validation missing, app checks existence of guid stored in chrome.storage.local.
  • if guid missing, generate , store 1 using window.crypto.getrandomvalues().
  • ask server validation sending guid , getting response.
  • if validation comes back, save in chrome.storage.local , go start of sequence.
  • otherwise tell user lost.

a full-strength version of approach have additional features:

  • use hmac(guid, secret) validation. i'm assuming staff aren't tech superstars, simple boolean suffice.
  • optionally add per-launch step sends guid , validation , confirms it's still valid each time.
  • when validation requested, might prompt secret key mentioned in question. in normal cases needed @ provisioning time.
  • in case haven't figured out yet, server acting simple licensing server, it's decide how decide whether validation request succeeds. maybe allows n validations exist @ once, or after you're done provisioning hardcode future validations fail. maybe limits validation requests ip addresses. choose.

that's gist. it's simple drm system easier manage enter-secret-at-installation method, won't withstand attack of more 30 minutes (since smart attacker inject machine's guid , hmac validation duplicate machine's chrome.storage.local).


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -