@gospodin.bodurov I played around with this library. https://github.com/Valve/fingerprintjs2
Seems to be good solution, it collects 28 different parameters to build device fingerprint and produces hash from them. Also we can include user's public keys to improve entropy.
There is a list of parameters (I already included public key string here) which producing hash 061c99b4ab264dd272efe2cb34c29aef. We can exclude some of them from resulting hash if we want.
List of details can be retrieved from different clients.
Mac OS
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"browser: {"name":"Chrome","version":"70.0.3538.110","major":"70"}engine: {"name":"WebKit","version":"537.36"}os: {"name":"Mac OS","version":"10.14.1"}device: {}cpu: {}
Windows
ua: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 YaBrowser/18.10.2.163 Yowser/2.5 Safari/537.36"browser: {"name":"Yandex","version":"18.10.2.163","major":"18"}engine: {"name":"WebKit","version":"537.36"}os: {"name":"Windows","version":"7"}device: {}cpu: {"architecture":"amd64"}
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1"browser: {"name":"Mobile Safari","version":"12.0","major":"12"}engine: {"name":"WebKit","version":"605.1.15"}os: {"name":"iOS","version":"12.1"}device: {"vendor":"Apple","model":"iPhone","type":"mobile"}cpu: {}
Android
"Mozilla/5.0 (Linux; Android 8.0.0; SM-A320F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36"browser: {"name":"Chrome","version":"70.0.3538.80","major":"70"}engine: {"name":"WebKit","version":"537.36"}os: {"name":"Android","version":"8.0.0"}device: {"vendor":"Samsung","model":"SM-A320F","type":"mobile"}cpu: {}
Ok, please implement an utility function getting this info and synchronize with @damyan.mitev in order to store it somewhere on the backend. After that you have to implement challenge.
@damyan.mitev please take a look at the meta data above. Let's decide if we need all this info. According to latest @gilesvincent comments in https://code.vereign.com/code/dashboard/issues/138 we only need detect Device Type, Device ID, and Browser. We have browser details and since desktop systems doesn't provide device details, Device Type will be defined as OS for them (Mac OS 10.14.1, Windows 7, Ubuntu).
And finally device ID may be represented as hash string taken from concatenated identity public key + user agent string.
All this can be done via library, so in the end backend will deal with the object containing device id, device type and browser.
I will implement new Audit Log Agent, which will store this metadata.
The most interesting parts for now seem to be User Agent and OS.
I agree on the generating hash strategy.
@damyan.mitev okay, so to be clear, you will need only User Agent, OS, and Device ID, right? I can cut out rest properties for now (browser, engine, device, cpu)?