@dotrino/vault 0.90.2 → 0.90.3
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.
- package/package.json +1 -1
- package/src/core/libVersion.js +1 -1
- package/src/deviceInfo.js +2 -4
- package/src/service.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/vault",
|
|
3
|
-
"version": "0.90.
|
|
3
|
+
"version": "0.90.3",
|
|
4
4
|
"description": "La bóveda de Dotrino como librería: el MISMO núcleo que el binario corriendo en el navegador (`@dotrino/vault/browser`), el mostrador de emparejamiento y el cliente de SERVICIO (Node): un proyecto se enrola una vez y jala sus credenciales del vault en vez del .env (`import '@dotrino/vault/config'`).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/core/libVersion.js
CHANGED
package/src/deviceInfo.js
CHANGED
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* Sirve cualquier enlace con la forma común `{ device: { publickey }, cert, iss, proxy }`
|
|
15
15
|
* (el de remote-agent y el de un servicio de dotrino-env).
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { keyLabel } from '@dotrino/identity/capabilities'
|
|
18
18
|
|
|
19
19
|
/** El id corto de una llave, como lo enseña la bóveda: `AB12-CD34`. */
|
|
20
|
-
export
|
|
21
|
-
return (await pubkeyId(publickey)).slice(0, 8).toUpperCase().replace(/(.{4})(.{4})/, '$1-$2')
|
|
22
|
-
}
|
|
20
|
+
export const shortId = keyLabel
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* La información del aparato a partir de su enlace.
|
package/src/service.js
CHANGED
|
@@ -23,7 +23,7 @@ import path from 'node:path'
|
|
|
23
23
|
import { createHash } from 'node:crypto'
|
|
24
24
|
import {
|
|
25
25
|
makeDeviceKey, makeDeviceEncKey, importDeviceEncKey, signWithDevice,
|
|
26
|
-
verifyDeviceSig, makePairingCode, commitCode, pubkeyId } from '@dotrino/identity/capabilities'
|
|
26
|
+
verifyDeviceSig, makePairingCode, commitCode, pubkeyId, keyLabel } from '@dotrino/identity/capabilities'
|
|
27
27
|
import { openWrap, wrapForMember, decryptWithCek } from '@dotrino/identity/content'
|
|
28
28
|
import { verifyActa, sealKeyAt, memberCan, checkVaultReply } from '@dotrino/identity/acta'
|
|
29
29
|
import { MSG, secretsScope, isValidSecretsNs, VAULT_PROTOCOL, VAULT_SPEAKS } from './protocol.js'
|
|
@@ -373,7 +373,7 @@ export async function enrollWithVault ({ qr, label = 'agent', expectedScope = nu
|
|
|
373
373
|
// aparato entra al acta pero no le llega ningún secreto, y no da error. Un replicador
|
|
374
374
|
// entra así A PROPÓSITO (ver `withEncKey`): reparte sobres cerrados y no abre ninguno.
|
|
375
375
|
const enc = withEncKey ? await makeDeviceEncKey() : null
|
|
376
|
-
const deviceId =
|
|
376
|
+
const deviceId = await keyLabel(device.publickey)
|
|
377
377
|
// Código de emparejamiento ALEATORIO: se muestra y NO se envía. La bóveda lo
|
|
378
378
|
// aprende solo cuando un humano lo tipea → aprobar exige TENER esta máquina.
|
|
379
379
|
const code = makePairingCode()
|