vaultkeeper 0.7.1 → 0.8.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.
- package/README.md +5 -1
- package/dist/index.cjs +27 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +27 -9
- package/dist/index.js.map +1 -1
- package/dist/one-password-worker.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -480,7 +480,11 @@ consecutive required-presence operations each demand their own distinct fresh ac
|
|
|
480
480
|
> intrinsic to the cryptographic operation.
|
|
481
481
|
|
|
482
482
|
Real-hardware confirmation for each backend is documented as a manual verification test in
|
|
483
|
-
[`docs/manual-tests/presence-per-use.md`](../../docs/manual-tests/presence-per-use.md).
|
|
483
|
+
[`docs/manual-tests/presence-per-use.md`](../../docs/manual-tests/presence-per-use.md). The
|
|
484
|
+
release-process-referenced register of what manual residue remains per backend once its paired
|
|
485
|
+
in-memory double runs the shared conformance corpus in CI — and the cadence/cost of running that
|
|
486
|
+
corpus against the real adapter — lives in
|
|
487
|
+
[`docs/manual-tests/manual-residue-register.md`](../../docs/manual-tests/manual-residue-register.md).
|
|
484
488
|
|
|
485
489
|
## Doctor / preflight checks
|
|
486
490
|
|
package/dist/index.cjs
CHANGED
|
@@ -473,6 +473,21 @@ var RotationInProgressError = class extends VaultError {
|
|
|
473
473
|
this.name = "RotationInProgressError";
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
|
+
var TestDoubleMisuseError = class extends VaultError {
|
|
477
|
+
/** The name of the test double class that refused to construct. */
|
|
478
|
+
doubleName;
|
|
479
|
+
/**
|
|
480
|
+
* The environment value (e.g. `process.env.NODE_ENV`) that triggered the
|
|
481
|
+
* refusal.
|
|
482
|
+
*/
|
|
483
|
+
detectedEnvironment;
|
|
484
|
+
constructor(message, doubleName, detectedEnvironment) {
|
|
485
|
+
super(message);
|
|
486
|
+
this.name = "TestDoubleMisuseError";
|
|
487
|
+
this.doubleName = doubleName;
|
|
488
|
+
this.detectedEnvironment = detectedEnvironment;
|
|
489
|
+
}
|
|
490
|
+
};
|
|
476
491
|
|
|
477
492
|
// src/backend/registry.ts
|
|
478
493
|
var BackendRegistry = class {
|
|
@@ -1460,6 +1475,9 @@ var DpapiBackend = class {
|
|
|
1460
1475
|
// src/backend/secret-tool-backend.ts
|
|
1461
1476
|
var ATTRIBUTE_KEY = "vaultkeeper-id";
|
|
1462
1477
|
var LABEL_PREFIX = "vaultkeeper: ";
|
|
1478
|
+
function stripSecretToolTrailingNewline(stdout) {
|
|
1479
|
+
return stdout.endsWith("\n") ? stdout.slice(0, -1) : stdout;
|
|
1480
|
+
}
|
|
1463
1481
|
var SecretToolBackend = class {
|
|
1464
1482
|
type = "secret-tool";
|
|
1465
1483
|
displayName = "Linux Secret Service (secret-tool)";
|
|
@@ -1476,29 +1494,29 @@ var SecretToolBackend = class {
|
|
|
1476
1494
|
}
|
|
1477
1495
|
async store(id, secret) {
|
|
1478
1496
|
const label = `${LABEL_PREFIX}${id}`;
|
|
1479
|
-
await execCommand("secret-tool", ["store", "--label", label, ATTRIBUTE_KEY, id], {
|
|
1497
|
+
await execCommand("secret-tool", ["store", "--label", label, "--", ATTRIBUTE_KEY, id], {
|
|
1480
1498
|
stdin: secret
|
|
1481
1499
|
});
|
|
1482
1500
|
}
|
|
1483
1501
|
async retrieve(id) {
|
|
1484
|
-
const result = await execCommandFull("secret-tool", ["lookup", ATTRIBUTE_KEY, id]);
|
|
1485
|
-
if (result.exitCode !== 0
|
|
1502
|
+
const result = await execCommandFull("secret-tool", ["lookup", "--", ATTRIBUTE_KEY, id]);
|
|
1503
|
+
if (result.exitCode !== 0) {
|
|
1486
1504
|
throw new SecretNotFoundError(`Secret not found in Secret Service: ${id}`);
|
|
1487
1505
|
}
|
|
1488
|
-
return result.stdout
|
|
1506
|
+
return stripSecretToolTrailingNewline(result.stdout);
|
|
1489
1507
|
}
|
|
1490
1508
|
async delete(id) {
|
|
1491
|
-
const result = await execCommandFull("secret-tool", ["clear", ATTRIBUTE_KEY, id]);
|
|
1509
|
+
const result = await execCommandFull("secret-tool", ["clear", "--", ATTRIBUTE_KEY, id]);
|
|
1492
1510
|
if (result.exitCode !== 0) {
|
|
1493
1511
|
throw new SecretNotFoundError(`Secret not found in Secret Service: ${id}`);
|
|
1494
1512
|
}
|
|
1495
1513
|
}
|
|
1496
1514
|
async exists(id) {
|
|
1497
|
-
const result = await execCommandFull("secret-tool", ["lookup", ATTRIBUTE_KEY, id]);
|
|
1498
|
-
return result.exitCode === 0
|
|
1515
|
+
const result = await execCommandFull("secret-tool", ["lookup", "--", ATTRIBUTE_KEY, id]);
|
|
1516
|
+
return result.exitCode === 0;
|
|
1499
1517
|
}
|
|
1500
1518
|
async list() {
|
|
1501
|
-
const result = await execCommandFull("secret-tool", ["search", ATTRIBUTE_KEY, ""]);
|
|
1519
|
+
const result = await execCommandFull("secret-tool", ["search", "--", ATTRIBUTE_KEY, ""]);
|
|
1502
1520
|
if (result.exitCode !== 0) {
|
|
1503
1521
|
return [];
|
|
1504
1522
|
}
|
|
@@ -4716,6 +4734,7 @@ exports.SetupError = SetupError;
|
|
|
4716
4734
|
exports.SigningKeyAlreadyExistsError = SigningKeyAlreadyExistsError;
|
|
4717
4735
|
exports.SigningKeyNotFoundError = SigningKeyNotFoundError;
|
|
4718
4736
|
exports.SigningNotSupportedError = SigningNotSupportedError;
|
|
4737
|
+
exports.TestDoubleMisuseError = TestDoubleMisuseError;
|
|
4719
4738
|
exports.TokenExpiredError = TokenExpiredError;
|
|
4720
4739
|
exports.TokenRevokedError = TokenRevokedError;
|
|
4721
4740
|
exports.UnknownBackendTypeError = UnknownBackendTypeError;
|