@moonbase.sh/licensing 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,11 @@
3
3
  "version": 2,
4
4
  "materialPrefix": "moonbase:fingerprint:v2",
5
5
  "stampPrefix": "mbd2_",
6
+ "sourceTags": {
7
+ "identity": "",
8
+ "deviceName": "n",
9
+ "scoped": "s"
10
+ },
6
11
  "canonicalizeValue": [
7
12
  {
8
13
  "description": "trailing newline from a sysfs read",
@@ -59,6 +64,7 @@
59
64
  {
60
65
  "description": "macOS, the single identity parameter",
61
66
  "platform": "mac",
67
+ "source": "identity",
62
68
  "params": [
63
69
  [
64
70
  "ioPlatformUuid",
@@ -72,6 +78,7 @@
72
78
  {
73
79
  "description": "Linux, machine-id plus world-readable DMI model fields",
74
80
  "platform": "linux",
81
+ "source": "identity",
75
82
  "params": [
76
83
  [
77
84
  "machineId",
@@ -101,6 +108,7 @@
101
108
  {
102
109
  "description": "Windows, first System and Baseboard structures",
103
110
  "platform": "windows",
111
+ "source": "identity",
104
112
  "params": [
105
113
  [
106
114
  "systemManufacturer",
@@ -134,6 +142,7 @@
134
142
  {
135
143
  "description": "empty and whitespace-only values are dropped, order preserved",
136
144
  "platform": "linux",
145
+ "source": "identity",
137
146
  "params": [
138
147
  [
139
148
  "machineId",
@@ -163,6 +172,7 @@
163
172
  {
164
173
  "description": "parameter order is significant (same pairs, swapped)",
165
174
  "platform": "linux",
175
+ "source": "identity",
166
176
  "params": [
167
177
  [
168
178
  "sysVendor",
@@ -180,6 +190,7 @@
180
190
  {
181
191
  "description": "control characters are dropped, so a value cannot forge an extra line",
182
192
  "platform": "linux",
193
+ "source": "identity",
183
194
  "params": [
184
195
  [
185
196
  "machineId",
@@ -193,6 +204,7 @@
193
204
  {
194
205
  "description": "non-ASCII is dropped, making the firmware-string decoding choice immaterial",
195
206
  "platform": "windows",
207
+ "source": "identity",
196
208
  "params": [
197
209
  [
198
210
  "systemManufacturer",
@@ -214,6 +226,7 @@
214
226
  {
215
227
  "description": "NFC runs before the ASCII filter, so a decomposed e-acute leaves no bare \"e\"",
216
228
  "platform": "windows",
229
+ "source": "identity",
217
230
  "params": [
218
231
  [
219
232
  "systemManufacturer",
@@ -231,6 +244,7 @@
231
244
  {
232
245
  "description": "values are capped at 128 characters",
233
246
  "platform": "linux",
247
+ "source": "identity",
234
248
  "params": [
235
249
  [
236
250
  "machineId",
@@ -244,6 +258,7 @@
244
258
  {
245
259
  "description": "an unprogrammed serial is dropped, but a real system UUID still identifies the machine",
246
260
  "platform": "windows",
261
+ "source": "identity",
247
262
  "params": [
248
263
  [
249
264
  "systemManufacturer",
@@ -269,6 +284,7 @@
269
284
  {
270
285
  "description": "filler detection applies to identifying params only \u2014 a model may genuinely be named \"None\"",
271
286
  "platform": "linux",
287
+ "source": "identity",
272
288
  "params": [
273
289
  [
274
290
  "machineId",
@@ -283,9 +299,38 @@
283
299
  "digest": "063d7bf0605a0da040b0046007a4993eaf41b557e414bea99105800560f6efdc",
284
300
  "deviceId": "mbd2_063d7bf0605a0da040b0046007a4993eaf41b557e414bea99105800560f6efdc"
285
301
  },
302
+ {
303
+ "description": "iOS offers only a vendor-scoped identifier, so the id is stamped mbd2s_",
304
+ "platform": "ios",
305
+ "source": "scoped",
306
+ "params": [
307
+ [
308
+ "identifierForVendor",
309
+ "0123456789ABCDEF0123456789ABCDEF"
310
+ ]
311
+ ],
312
+ "material": "moonbase:fingerprint:v2\nplatform=ios\nidentifierForVendor=0123456789ABCDEF0123456789ABCDEF",
313
+ "digest": "298ced47f8d983939db1d5fce6d4b4f2f8766aa19e3e17536fcd1604a81febf1",
314
+ "deviceId": "mbd2s_298ced47f8d983939db1d5fce6d4b4f2f8766aa19e3e17536fcd1604a81febf1"
315
+ },
316
+ {
317
+ "description": "Android ANDROID_ID from Settings.Secure.getString, lowercased and scoped to the signing key",
318
+ "platform": "android",
319
+ "source": "scoped",
320
+ "params": [
321
+ [
322
+ "androidId",
323
+ "a1b2c3d4e5f60718\n"
324
+ ]
325
+ ],
326
+ "material": "moonbase:fingerprint:v2\nplatform=android\nandroidId=a1b2c3d4e5f60718",
327
+ "digest": "ca988ecf5c529964bfaa80734da3dbe070dd41881aa43f8c472f3a5d512b4eff",
328
+ "deviceId": "mbd2s_ca988ecf5c529964bfaa80734da3dbe070dd41881aa43f8c472f3a5d512b4eff"
329
+ },
286
330
  {
287
331
  "description": "the deviceName fallback material (stamped mbd2n_, see stamps)",
288
332
  "platform": "unknown",
333
+ "source": "deviceName",
289
334
  "params": [
290
335
  [
291
336
  "deviceName",
@@ -295,6 +340,24 @@
295
340
  "material": "moonbase:fingerprint:v2\nplatform=unknown\ndeviceName=PC-1",
296
341
  "digest": "493978eb157552e60a13694bd6861b2a82d0dba2746431a5f7921951ed460045",
297
342
  "deviceId": "mbd2n_493978eb157552e60a13694bd6861b2a82d0dba2746431a5f7921951ed460045"
343
+ },
344
+ {
345
+ "description": "a rejected androidId constant is still a valid baseboard serial: per-parameter rejections must not leak across platforms",
346
+ "platform": "windows",
347
+ "source": "identity",
348
+ "params": [
349
+ [
350
+ "systemManufacturer",
351
+ "ACME"
352
+ ],
353
+ [
354
+ "baseboardSerialNumber",
355
+ "9774d56d682e549c"
356
+ ]
357
+ ],
358
+ "material": "moonbase:fingerprint:v2\nplatform=windows\nsystemManufacturer=ACME\nbaseboardSerialNumber=9774d56d682e549c",
359
+ "digest": "cdd01d6f586662f25e5aaa542ccaf373eea6cfb1271a2c94efd5ab828611b477",
360
+ "deviceId": "mbd2_cdd01d6f586662f25e5aaa542ccaf373eea6cfb1271a2c94efd5ab828611b477"
298
361
  }
299
362
  ],
300
363
  "materialErrors": [
@@ -515,6 +578,94 @@
515
578
  ]
516
579
  ],
517
580
  "error": "InsufficientDeviceIdentity"
581
+ },
582
+ {
583
+ "description": "iOS with no identifierForVendor yet has nothing else to offer",
584
+ "platform": "ios",
585
+ "params": [
586
+ [
587
+ "identifierForVendor",
588
+ ""
589
+ ]
590
+ ],
591
+ "error": "InsufficientDeviceIdentity"
592
+ },
593
+ {
594
+ "description": "Android with no androidId has nothing else to offer",
595
+ "platform": "android",
596
+ "params": [
597
+ [
598
+ "androidId",
599
+ ""
600
+ ]
601
+ ],
602
+ "error": "InsufficientDeviceIdentity"
603
+ },
604
+ {
605
+ "description": "the literal \"android_id\" is the key name, not an id: reading the static field instead of calling getString gives every device on the platform the same value",
606
+ "platform": "android",
607
+ "params": [
608
+ [
609
+ "androidId",
610
+ "android_id"
611
+ ]
612
+ ],
613
+ "error": "InsufficientDeviceIdentity"
614
+ },
615
+ {
616
+ "description": "Build.SERIAL returns \"unknown\" without a privileged permission, which is a fleet-wide constant",
617
+ "platform": "android",
618
+ "params": [
619
+ [
620
+ "androidId",
621
+ "unknown"
622
+ ]
623
+ ],
624
+ "error": "InsufficientDeviceIdentity"
625
+ },
626
+ {
627
+ "description": "9774d56d682e549c is a real ANDROID_ID shared by a large batch of devices whose ro.serialno was unset",
628
+ "platform": "android",
629
+ "params": [
630
+ [
631
+ "androidId",
632
+ "9774d56d682e549c"
633
+ ]
634
+ ],
635
+ "error": "InsufficientDeviceIdentity"
636
+ },
637
+ {
638
+ "description": "an androidId that is not lowercase hex did not come from Settings.Secure",
639
+ "platform": "android",
640
+ "params": [
641
+ [
642
+ "androidId",
643
+ "A1B2C3D4E5F60718"
644
+ ]
645
+ ],
646
+ "error": "InsufficientDeviceIdentity"
647
+ },
648
+ {
649
+ "description": "the host-name fallback is forbidden on iOS, where gethostname() returns \"localhost\" on every device",
650
+ "platform": "ios",
651
+ "params": [
652
+ [
653
+ "deviceName",
654
+ "iPhone"
655
+ ]
656
+ ],
657
+ "error": "InsufficientDeviceIdentity"
658
+ },
659
+ {
660
+ "description": "the host-name fallback is forbidden on Android, where the host name is a model name or an image-wide constant",
661
+ "platform": "android",
662
+ "params": [
663
+ [
664
+ "deviceName",
665
+ "localhost"
666
+ ]
667
+ ],
668
+ "error": "InsufficientDeviceIdentity"
518
669
  }
519
670
  ],
520
671
  "smbios": [
@@ -698,6 +849,7 @@
698
849
  "deviceId": "mbd2_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
699
850
  "parsed": {
700
851
  "version": 2,
852
+ "sourceTag": "",
701
853
  "source": "identity",
702
854
  "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
703
855
  }
@@ -707,6 +859,7 @@
707
859
  "deviceId": "mbd2n_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
708
860
  "parsed": {
709
861
  "version": 2,
862
+ "sourceTag": "n",
710
863
  "source": "deviceName",
711
864
  "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
712
865
  }
@@ -716,6 +869,7 @@
716
869
  "deviceId": "mbd7_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
717
870
  "parsed": {
718
871
  "version": 7,
872
+ "sourceTag": "",
719
873
  "source": "identity",
720
874
  "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
721
875
  }
@@ -739,6 +893,56 @@
739
893
  "description": "a truncated digest is not a stamp",
740
894
  "deviceId": "mbd2_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e3",
741
895
  "parsed": null
896
+ },
897
+ {
898
+ "description": "the current version, app-scoped identity",
899
+ "deviceId": "mbd2s_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
900
+ "parsed": {
901
+ "version": 2,
902
+ "sourceTag": "s",
903
+ "source": "scoped",
904
+ "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
905
+ }
906
+ },
907
+ {
908
+ "description": "an unrecognised source tag still parses, so the id is compared literally rather than rejected as \"not a Moonbase id\"",
909
+ "deviceId": "mbd2x_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
910
+ "parsed": {
911
+ "version": 2,
912
+ "sourceTag": "x",
913
+ "source": null,
914
+ "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
915
+ }
916
+ },
917
+ {
918
+ "description": "a multi-character tag parses too, so a future tag needs no version bump",
919
+ "deviceId": "mbd2zz_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
920
+ "parsed": {
921
+ "version": 2,
922
+ "sourceTag": "zz",
923
+ "source": null,
924
+ "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
925
+ }
926
+ },
927
+ {
928
+ "description": "an uppercase source tag is not a stamp",
929
+ "deviceId": "mbd2S_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
930
+ "parsed": null
931
+ },
932
+ {
933
+ "description": "a tag with a digit in it is not a stamp",
934
+ "deviceId": "mbd2n2_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
935
+ "parsed": null
936
+ },
937
+ {
938
+ "description": "a tag that names a language built-in is still just an unknown tag: look tags up in a real map, not an object with a prototype",
939
+ "deviceId": "mbd2constructor_b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32",
940
+ "parsed": {
941
+ "version": 2,
942
+ "sourceTag": "constructor",
943
+ "source": null,
944
+ "digest": "b465194056ff7721bf549799b4532bfca0bc72fffc0f6969c77c46d6b8e28e32"
945
+ }
742
946
  }
743
947
  ]
744
948
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/licensing",
3
3
  "type": "module",
4
- "version": "3.0.0",
4
+ "version": "3.1.0",
5
5
  "description": "Package to add sotftware licensing using Moonbase.sh to your node.js apps",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",