@bedrock/kms 10.1.0 → 11.0.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.
@@ -1,62 +0,0 @@
1
- /*!
2
- * Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
3
- */
4
- import * as webkmsContext from '@digitalbazaar/webkms-context';
5
- import * as aesContext from 'aes-key-wrapping-2019-context';
6
- import * as hmacContext from 'sha256-hmac-key-2019-context';
7
- import {cryptoLd} from './cryptoLd.js';
8
-
9
- const {CONTEXT_URL: WEBKMS_CONTEXT_URL} = webkmsContext;
10
- const {CONTEXT_URL: AES_2019_CONTEXT_URL} = aesContext;
11
- const {CONTEXT_URL: HMAC_2019_CONTEXT_URL} = hmacContext;
12
-
13
- export const mockData = {};
14
- const operations = mockData.operations = {};
15
-
16
- const symmetric = new Map([
17
- ['AesKeyWrappingKey2019', AES_2019_CONTEXT_URL],
18
- ['Sha256HmacKey2019', HMAC_2019_CONTEXT_URL]
19
- ]);
20
-
21
- operations.generate = ({type}) => {
22
- let suiteContextUrl = symmetric.get(type);
23
- if(!suiteContextUrl) {
24
- ({SUITE_CONTEXT: suiteContextUrl} = cryptoLd.suites.get(type) || {});
25
- if(!suiteContextUrl) {
26
- throw new Error(`Unknown key type: "${type}".`);
27
- }
28
- }
29
-
30
- return {
31
- '@context': [WEBKMS_CONTEXT_URL, suiteContextUrl],
32
- type: 'GenerateKeyOperation',
33
- invocationTarget: {
34
- id: '',
35
- type: '',
36
- controller: 'https://example.com/bar'
37
- },
38
- proof: {
39
- verificationMethod: 'https://example.com/bar'
40
- }
41
- };
42
- };
43
-
44
- operations.sign = {
45
- '@context': WEBKMS_CONTEXT_URL,
46
- type: 'SignOperation',
47
- invocationTarget: '',
48
- verifyData: '',
49
- proof: {
50
- verificationMethod: 'https://example.com/bar'
51
- }
52
- };
53
-
54
- operations.verify = {
55
- '@context': WEBKMS_CONTEXT_URL,
56
- type: 'VerifyOperation',
57
- invocationTarget: '',
58
- verifyData: '',
59
- proof: {
60
- verificationMethod: 'https://example.com/bar'
61
- }
62
- };
package/test/package.json DELETED
@@ -1,51 +0,0 @@
1
- {
2
- "name": "bedrock-kms-test",
3
- "version": "0.0.1-0",
4
- "type": "module",
5
- "description": "Bedrock KMS test",
6
- "private": true,
7
- "scripts": {
8
- "test": "node --preserve-symlinks test.js test",
9
- "coverage": "cross-env NODE_ENV=test c8 --reporter=lcov --reporter=text-summary npm test",
10
- "coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly npm test",
11
- "coverage-report": "c8 report"
12
- },
13
- "dependencies": {
14
- "@bedrock/core": "^6.0.0",
15
- "@bedrock/did-context": "^4.0.0",
16
- "@bedrock/did-io": "^8.0.0",
17
- "@bedrock/https-agent": "^4.0.0",
18
- "@bedrock/jsonld-document-loader": "^3.0.0",
19
- "@bedrock/kms": "file:..",
20
- "@bedrock/ledger-context": "^23.0.0",
21
- "@bedrock/mongodb": "^10.0.0",
22
- "@bedrock/package-manager": "^3.0.0",
23
- "@bedrock/security-context": "^7.0.0",
24
- "@bedrock/ssm-mongodb": "^9.0.0",
25
- "@bedrock/test": "^8.0.0",
26
- "@bedrock/veres-one-context": "^14.0.0",
27
- "@digitalbazaar/ed25519-verification-key-2018": "^3.1.1",
28
- "@digitalbazaar/ed25519-verification-key-2020": "^3.1.0",
29
- "@digitalbazaar/webkms-context": "^2.0.0",
30
- "@digitalbazaar/webkms-switch": "^9.0.3",
31
- "@digitalbazaar/x25519-key-agreement-key-2019": "^5.1.1",
32
- "@digitalbazaar/x25519-key-agreement-key-2020": "^2.0.0",
33
- "aes-key-wrapping-2019-context": "^1.0.3",
34
- "bnid": "^2.0.0",
35
- "c8": "^7.11.0",
36
- "cross-env": "^7.0.3",
37
- "crypto-ld": "^6.0.0",
38
- "klona": "^2.0.5",
39
- "sha256-hmac-key-2019-context": "^1.0.3",
40
- "uuid": "^8.3.2"
41
- },
42
- "c8": {
43
- "excludeNodeModules": false,
44
- "include": [
45
- "node_modules/@bedrock/kms/**"
46
- ],
47
- "exclude": [
48
- "node_modules/@bedrock/kms/node_modules/**"
49
- ]
50
- }
51
- }
@@ -1,17 +0,0 @@
1
- /*!
2
- * Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
3
- */
4
- import {config} from '@bedrock/core';
5
- import {fileURLToPath} from 'node:url';
6
- import path from 'node:path';
7
- import '@bedrock/mongodb';
8
-
9
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
-
11
- config.mocha.tests.push(path.join(__dirname, 'mocha'));
12
-
13
- // MongoDB
14
- config.mongodb.name = 'bedrock_kms_test';
15
- config.mongodb.dropCollections = {};
16
- config.mongodb.dropCollections.onInit = true;
17
- config.mongodb.dropCollections.collections = [];
package/test/test.js DELETED
@@ -1,9 +0,0 @@
1
- /*!
2
- * Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
3
- */
4
- import * as bedrock from '@bedrock/core';
5
- import '@bedrock/kms';
6
- import '@bedrock/ssm-mongodb';
7
- import '@bedrock/test';
8
-
9
- bedrock.start();