@twin.org/node-core 0.0.2-next.12 → 0.0.2-next.14
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/dist/cjs/index.cjs +41 -13
- package/dist/esm/index.mjs +43 -15
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +6 -11
- package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +16 -0
- package/docs/changelog.md +14 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +10 -19
- package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +32 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +62 -27
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -153,9 +153,7 @@ async function bootstrap(engineCore, context, envVars) {
|
|
|
153
153
|
await bootstrapBlobEncryption(engineCore, context, envVars);
|
|
154
154
|
await addVerificationMethod(engineCore, context, "attestation", envVars.attestationVerificationMethodId);
|
|
155
155
|
await addVerificationMethod(engineCore, context, "immutable proof", envVars.immutableProofVerificationMethodId);
|
|
156
|
-
|
|
157
|
-
await addVerificationMethod(engineCore, context, "rights management", envVars.rightsManagementVerificationMethodId);
|
|
158
|
-
}
|
|
156
|
+
await addVerificationMethod(engineCore, context, "node to node authentication", envVars.vcAuthenticationVerificationMethodId);
|
|
159
157
|
await bootstrapSynchronisedStorage(engineCore, context, envVars);
|
|
160
158
|
}
|
|
161
159
|
/**
|
|
@@ -494,8 +492,6 @@ async function bootstrapAuth(engineCore, context, envVars, features) {
|
|
|
494
492
|
*/
|
|
495
493
|
async function bootstrapSynchronisedStorage(engineCore, context, envVars, features) {
|
|
496
494
|
if (core.Coerce.boolean(envVars.synchronisedStorageEnabled) ?? false) {
|
|
497
|
-
// Add the verification method to the identity if it doesn't exist
|
|
498
|
-
await addVerificationMethod(engineCore, context, "synchronised storage", envVars.synchronisedStorageVerificationMethodId);
|
|
499
495
|
// If this is a trusted node we need to add the blob encryption key pair
|
|
500
496
|
if (core.Is.stringValue(envVars.synchronisedStorageBlobStorageEncryptionKeyId) &&
|
|
501
497
|
core.Is.stringBase64(envVars.synchronisedStorageBlobStorageKey)) {
|
|
@@ -574,8 +570,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
574
570
|
envVars.blobStorageEnableEncryption ??= "false";
|
|
575
571
|
envVars.blobStorageEncryptionKeyId ??= "blob-encryption";
|
|
576
572
|
envVars.synchronisedStorageBlobStorageEncryptionKeyId ??= "synchronised-storage-blob-encryption";
|
|
577
|
-
envVars.
|
|
578
|
-
envVars.rightsManagementVerificationMethodId ??= "rights-management-assertion";
|
|
573
|
+
envVars.vcAuthenticationVerificationMethodId ??= "node-authentication-assertion";
|
|
579
574
|
const coreConfig = {
|
|
580
575
|
debug: core.Coerce.boolean(envVars.debug) ?? false,
|
|
581
576
|
types: {}
|
|
@@ -602,6 +597,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
602
597
|
configureAuditableItemGraph(coreConfig);
|
|
603
598
|
configureAuditableItemStream(coreConfig);
|
|
604
599
|
configureDocumentManagement(coreConfig);
|
|
600
|
+
configureNodeToNode(coreConfig, envVars);
|
|
605
601
|
configureRightsManagement(coreConfig, envVars);
|
|
606
602
|
configureSynchronisedStorage(coreConfig, envVars);
|
|
607
603
|
configureFederatedCatalogue(coreConfig, envVars);
|
|
@@ -1358,6 +1354,24 @@ function configureDocumentManagement(coreConfig, envVars) {
|
|
|
1358
1354
|
});
|
|
1359
1355
|
}
|
|
1360
1356
|
}
|
|
1357
|
+
/**
|
|
1358
|
+
* Configures the node to node.
|
|
1359
|
+
* @param coreConfig The core config.
|
|
1360
|
+
* @param envVars The environment variables.
|
|
1361
|
+
*/
|
|
1362
|
+
function configureNodeToNode(coreConfig, envVars) {
|
|
1363
|
+
if (core.Is.arrayValue(coreConfig.types.identityComponent)) {
|
|
1364
|
+
// Can only perform VC authentication if identity component is available
|
|
1365
|
+
coreConfig.types.authenticationGeneratorComponent ??= [];
|
|
1366
|
+
coreConfig.types.authenticationGeneratorComponent.push({
|
|
1367
|
+
type: engineTypes.AuthenticationGeneratorComponentType.VerifiableCredential,
|
|
1368
|
+
options: {
|
|
1369
|
+
config: { verificationMethodId: envVars.vcAuthenticationVerificationMethodId ?? "" }
|
|
1370
|
+
},
|
|
1371
|
+
features: ["verifiable-credential"]
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1361
1375
|
/**
|
|
1362
1376
|
* Configures the rights management.
|
|
1363
1377
|
* @param coreConfig The core config.
|
|
@@ -1421,7 +1435,6 @@ function configureRightsManagement(coreConfig, envVars) {
|
|
|
1421
1435
|
: undefined,
|
|
1422
1436
|
config: {
|
|
1423
1437
|
baseCallbackUrl: envVars.rightsManagementBaseCallbackUrl ?? "",
|
|
1424
|
-
rightsManagementMethodId: envVars.rightsManagementVerificationMethodId ?? "",
|
|
1425
1438
|
offers: core.Is.arrayValue(envVars.rightsManagementOffers)
|
|
1426
1439
|
? envVars.rightsManagementOffers
|
|
1427
1440
|
: [],
|
|
@@ -1442,7 +1455,6 @@ function configureRightsManagement(coreConfig, envVars) {
|
|
|
1442
1455
|
type: engineTypes.RightsManagementDarpComponentType.Service,
|
|
1443
1456
|
options: {
|
|
1444
1457
|
config: {
|
|
1445
|
-
rightsManagementMethodId: envVars.rightsManagementVerificationMethodId ?? "",
|
|
1446
1458
|
dataAccessComponentCreator: async (url) => new rightsManagementRestClient.DataAccessPointClient({ endpoint: url })
|
|
1447
1459
|
}
|
|
1448
1460
|
}
|
|
@@ -1482,7 +1494,6 @@ function configureSynchronisedStorage(coreConfig, envVars) {
|
|
|
1482
1494
|
options: {
|
|
1483
1495
|
config: {
|
|
1484
1496
|
verifiableStorageKeyId: verifiableStorageKeyId ?? "",
|
|
1485
|
-
synchronisedStorageMethodId: envVars.synchronisedStorageVerificationMethodId,
|
|
1486
1497
|
blobStorageEncryptionKeyId: envVars.synchronisedStorageBlobStorageEncryptionKeyId,
|
|
1487
1498
|
entityUpdateIntervalMinutes: core.Coerce.number(envVars.synchronisedStorageEntityUpdateIntervalMinutes),
|
|
1488
1499
|
consolidationIntervalMinutes: core.Coerce.number(envVars.synchronisedStorageConsolidationIntervalMinutes),
|
|
@@ -1644,11 +1655,18 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1644
1655
|
});
|
|
1645
1656
|
}
|
|
1646
1657
|
if (!coreEngineConfig.silent) {
|
|
1658
|
+
const includeBody = core.Coerce.boolean(envVars.routeLoggingIncludeBody) ?? coreEngineConfig.debug;
|
|
1659
|
+
const fullBase64 = core.Coerce.boolean(envVars.routeLoggingFullBase64) ?? false;
|
|
1660
|
+
const obfuscateProperties = core.Is.stringValue(envVars.routeLoggingObfuscateProperties)
|
|
1661
|
+
? envVars.routeLoggingObfuscateProperties.split(",")
|
|
1662
|
+
: undefined;
|
|
1647
1663
|
serverConfig.types.restRouteProcessor.push({
|
|
1648
1664
|
type: engineServerTypes.RestRouteProcessorType.Logging,
|
|
1649
1665
|
options: {
|
|
1650
1666
|
config: {
|
|
1651
|
-
includeBody
|
|
1667
|
+
includeBody,
|
|
1668
|
+
fullBase64,
|
|
1669
|
+
obfuscateProperties
|
|
1652
1670
|
}
|
|
1653
1671
|
}
|
|
1654
1672
|
});
|
|
@@ -1656,7 +1674,9 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1656
1674
|
type: engineServerTypes.SocketRouteProcessorType.Logging,
|
|
1657
1675
|
options: {
|
|
1658
1676
|
config: {
|
|
1659
|
-
includeBody
|
|
1677
|
+
includeBody,
|
|
1678
|
+
fullBase64,
|
|
1679
|
+
obfuscateProperties
|
|
1660
1680
|
}
|
|
1661
1681
|
}
|
|
1662
1682
|
});
|
|
@@ -1715,6 +1735,14 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1715
1735
|
}
|
|
1716
1736
|
});
|
|
1717
1737
|
}
|
|
1738
|
+
if (core.Coerce.boolean(envVars.enableVerifiableCredentialRouteProcessors) ?? false) {
|
|
1739
|
+
serverConfig.types.restRouteProcessor.push({
|
|
1740
|
+
type: engineServerTypes.RestRouteProcessorType.AuthVerifiableCredential
|
|
1741
|
+
});
|
|
1742
|
+
serverConfig.types.socketRouteProcessor.push({
|
|
1743
|
+
type: engineServerTypes.SocketRouteProcessorType.AuthVerifiableCredential
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1718
1746
|
engineServer.addDefaultRestPaths(serverConfig);
|
|
1719
1747
|
engineServer.addDefaultSocketPaths(serverConfig);
|
|
1720
1748
|
return serverConfig;
|
|
@@ -1787,7 +1815,7 @@ async function run(nodeOptions) {
|
|
|
1787
1815
|
nodeOptions ??= {};
|
|
1788
1816
|
const serverInfo = {
|
|
1789
1817
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1790
|
-
version: nodeOptions?.serverVersion ?? "0.0.2-next.
|
|
1818
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.14" // x-release-please-version
|
|
1791
1819
|
};
|
|
1792
1820
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1793
1821
|
if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PasswordHelper } from '@twin.org/api-auth-entity-storage-service';
|
|
2
|
-
import { I18n, Is,
|
|
2
|
+
import { I18n, Is, Converter, RandomHelper, StringHelper, Coerce, Urn, GeneralError, ErrorHelper, EnvHelper } from '@twin.org/core';
|
|
3
3
|
import { PasswordGenerator, Bip39 } from '@twin.org/crypto';
|
|
4
4
|
import { AuthenticationComponentType, InformationComponentType, RestRouteProcessorType, SocketRouteProcessorType, AuthenticationAdminComponentType } from '@twin.org/engine-server-types';
|
|
5
|
-
import { WalletConnectorType, IdentityConnectorType, EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, DltConfigType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, TaskSchedulerComponentType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, NftConnectorType, NftComponentType, VerifiableStorageConnectorType, VerifiableStorageComponentType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DocumentManagementComponentType, RightsManagementPapComponentType, RightsManagementPmpComponentType, RightsManagementPipComponentType, RightsManagementPxpComponentType, RightsManagementPdpComponentType, RightsManagementPepComponentType, RightsManagementPnpComponentType, RightsManagementPnapComponentType, RightsManagementDapComponentType, RightsManagementDarpComponentType, SynchronisedStorageComponentType, FederatedCatalogueComponentType, DataSpaceConnectorComponentType } from '@twin.org/engine-types';
|
|
5
|
+
import { WalletConnectorType, IdentityConnectorType, EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, DltConfigType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, TaskSchedulerComponentType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, NftConnectorType, NftComponentType, VerifiableStorageConnectorType, VerifiableStorageComponentType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DocumentManagementComponentType, AuthenticationGeneratorComponentType, RightsManagementPapComponentType, RightsManagementPmpComponentType, RightsManagementPipComponentType, RightsManagementPxpComponentType, RightsManagementPdpComponentType, RightsManagementPepComponentType, RightsManagementPnpComponentType, RightsManagementPnapComponentType, RightsManagementDapComponentType, RightsManagementDarpComponentType, SynchronisedStorageComponentType, FederatedCatalogueComponentType, DataSpaceConnectorComponentType } from '@twin.org/engine-types';
|
|
6
6
|
import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
|
|
7
7
|
import { IdentityProfileConnectorFactory, IdentityConnectorFactory, IdentityResolverConnectorFactory, DocumentHelper } from '@twin.org/identity-models';
|
|
8
8
|
import { VaultConnectorFactory, VaultKeyType } from '@twin.org/vault-models';
|
|
@@ -132,9 +132,7 @@ async function bootstrap(engineCore, context, envVars) {
|
|
|
132
132
|
await bootstrapBlobEncryption(engineCore, context, envVars);
|
|
133
133
|
await addVerificationMethod(engineCore, context, "attestation", envVars.attestationVerificationMethodId);
|
|
134
134
|
await addVerificationMethod(engineCore, context, "immutable proof", envVars.immutableProofVerificationMethodId);
|
|
135
|
-
|
|
136
|
-
await addVerificationMethod(engineCore, context, "rights management", envVars.rightsManagementVerificationMethodId);
|
|
137
|
-
}
|
|
135
|
+
await addVerificationMethod(engineCore, context, "node to node authentication", envVars.vcAuthenticationVerificationMethodId);
|
|
138
136
|
await bootstrapSynchronisedStorage(engineCore, context, envVars);
|
|
139
137
|
}
|
|
140
138
|
/**
|
|
@@ -473,8 +471,6 @@ async function bootstrapAuth(engineCore, context, envVars, features) {
|
|
|
473
471
|
*/
|
|
474
472
|
async function bootstrapSynchronisedStorage(engineCore, context, envVars, features) {
|
|
475
473
|
if (Coerce.boolean(envVars.synchronisedStorageEnabled) ?? false) {
|
|
476
|
-
// Add the verification method to the identity if it doesn't exist
|
|
477
|
-
await addVerificationMethod(engineCore, context, "synchronised storage", envVars.synchronisedStorageVerificationMethodId);
|
|
478
474
|
// If this is a trusted node we need to add the blob encryption key pair
|
|
479
475
|
if (Is.stringValue(envVars.synchronisedStorageBlobStorageEncryptionKeyId) &&
|
|
480
476
|
Is.stringBase64(envVars.synchronisedStorageBlobStorageKey)) {
|
|
@@ -553,8 +549,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
553
549
|
envVars.blobStorageEnableEncryption ??= "false";
|
|
554
550
|
envVars.blobStorageEncryptionKeyId ??= "blob-encryption";
|
|
555
551
|
envVars.synchronisedStorageBlobStorageEncryptionKeyId ??= "synchronised-storage-blob-encryption";
|
|
556
|
-
envVars.
|
|
557
|
-
envVars.rightsManagementVerificationMethodId ??= "rights-management-assertion";
|
|
552
|
+
envVars.vcAuthenticationVerificationMethodId ??= "node-authentication-assertion";
|
|
558
553
|
const coreConfig = {
|
|
559
554
|
debug: Coerce.boolean(envVars.debug) ?? false,
|
|
560
555
|
types: {}
|
|
@@ -581,6 +576,7 @@ function buildEngineConfiguration(envVars) {
|
|
|
581
576
|
configureAuditableItemGraph(coreConfig);
|
|
582
577
|
configureAuditableItemStream(coreConfig);
|
|
583
578
|
configureDocumentManagement(coreConfig);
|
|
579
|
+
configureNodeToNode(coreConfig, envVars);
|
|
584
580
|
configureRightsManagement(coreConfig, envVars);
|
|
585
581
|
configureSynchronisedStorage(coreConfig, envVars);
|
|
586
582
|
configureFederatedCatalogue(coreConfig, envVars);
|
|
@@ -1337,6 +1333,24 @@ function configureDocumentManagement(coreConfig, envVars) {
|
|
|
1337
1333
|
});
|
|
1338
1334
|
}
|
|
1339
1335
|
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Configures the node to node.
|
|
1338
|
+
* @param coreConfig The core config.
|
|
1339
|
+
* @param envVars The environment variables.
|
|
1340
|
+
*/
|
|
1341
|
+
function configureNodeToNode(coreConfig, envVars) {
|
|
1342
|
+
if (Is.arrayValue(coreConfig.types.identityComponent)) {
|
|
1343
|
+
// Can only perform VC authentication if identity component is available
|
|
1344
|
+
coreConfig.types.authenticationGeneratorComponent ??= [];
|
|
1345
|
+
coreConfig.types.authenticationGeneratorComponent.push({
|
|
1346
|
+
type: AuthenticationGeneratorComponentType.VerifiableCredential,
|
|
1347
|
+
options: {
|
|
1348
|
+
config: { verificationMethodId: envVars.vcAuthenticationVerificationMethodId ?? "" }
|
|
1349
|
+
},
|
|
1350
|
+
features: ["verifiable-credential"]
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1340
1354
|
/**
|
|
1341
1355
|
* Configures the rights management.
|
|
1342
1356
|
* @param coreConfig The core config.
|
|
@@ -1400,7 +1414,6 @@ function configureRightsManagement(coreConfig, envVars) {
|
|
|
1400
1414
|
: undefined,
|
|
1401
1415
|
config: {
|
|
1402
1416
|
baseCallbackUrl: envVars.rightsManagementBaseCallbackUrl ?? "",
|
|
1403
|
-
rightsManagementMethodId: envVars.rightsManagementVerificationMethodId ?? "",
|
|
1404
1417
|
offers: Is.arrayValue(envVars.rightsManagementOffers)
|
|
1405
1418
|
? envVars.rightsManagementOffers
|
|
1406
1419
|
: [],
|
|
@@ -1421,7 +1434,6 @@ function configureRightsManagement(coreConfig, envVars) {
|
|
|
1421
1434
|
type: RightsManagementDarpComponentType.Service,
|
|
1422
1435
|
options: {
|
|
1423
1436
|
config: {
|
|
1424
|
-
rightsManagementMethodId: envVars.rightsManagementVerificationMethodId ?? "",
|
|
1425
1437
|
dataAccessComponentCreator: async (url) => new DataAccessPointClient({ endpoint: url })
|
|
1426
1438
|
}
|
|
1427
1439
|
}
|
|
@@ -1461,7 +1473,6 @@ function configureSynchronisedStorage(coreConfig, envVars) {
|
|
|
1461
1473
|
options: {
|
|
1462
1474
|
config: {
|
|
1463
1475
|
verifiableStorageKeyId: verifiableStorageKeyId ?? "",
|
|
1464
|
-
synchronisedStorageMethodId: envVars.synchronisedStorageVerificationMethodId,
|
|
1465
1476
|
blobStorageEncryptionKeyId: envVars.synchronisedStorageBlobStorageEncryptionKeyId,
|
|
1466
1477
|
entityUpdateIntervalMinutes: Coerce.number(envVars.synchronisedStorageEntityUpdateIntervalMinutes),
|
|
1467
1478
|
consolidationIntervalMinutes: Coerce.number(envVars.synchronisedStorageConsolidationIntervalMinutes),
|
|
@@ -1623,11 +1634,18 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1623
1634
|
});
|
|
1624
1635
|
}
|
|
1625
1636
|
if (!coreEngineConfig.silent) {
|
|
1637
|
+
const includeBody = Coerce.boolean(envVars.routeLoggingIncludeBody) ?? coreEngineConfig.debug;
|
|
1638
|
+
const fullBase64 = Coerce.boolean(envVars.routeLoggingFullBase64) ?? false;
|
|
1639
|
+
const obfuscateProperties = Is.stringValue(envVars.routeLoggingObfuscateProperties)
|
|
1640
|
+
? envVars.routeLoggingObfuscateProperties.split(",")
|
|
1641
|
+
: undefined;
|
|
1626
1642
|
serverConfig.types.restRouteProcessor.push({
|
|
1627
1643
|
type: RestRouteProcessorType.Logging,
|
|
1628
1644
|
options: {
|
|
1629
1645
|
config: {
|
|
1630
|
-
includeBody
|
|
1646
|
+
includeBody,
|
|
1647
|
+
fullBase64,
|
|
1648
|
+
obfuscateProperties
|
|
1631
1649
|
}
|
|
1632
1650
|
}
|
|
1633
1651
|
});
|
|
@@ -1635,7 +1653,9 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1635
1653
|
type: SocketRouteProcessorType.Logging,
|
|
1636
1654
|
options: {
|
|
1637
1655
|
config: {
|
|
1638
|
-
includeBody
|
|
1656
|
+
includeBody,
|
|
1657
|
+
fullBase64,
|
|
1658
|
+
obfuscateProperties
|
|
1639
1659
|
}
|
|
1640
1660
|
}
|
|
1641
1661
|
});
|
|
@@ -1694,6 +1714,14 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
|
|
|
1694
1714
|
}
|
|
1695
1715
|
});
|
|
1696
1716
|
}
|
|
1717
|
+
if (Coerce.boolean(envVars.enableVerifiableCredentialRouteProcessors) ?? false) {
|
|
1718
|
+
serverConfig.types.restRouteProcessor.push({
|
|
1719
|
+
type: RestRouteProcessorType.AuthVerifiableCredential
|
|
1720
|
+
});
|
|
1721
|
+
serverConfig.types.socketRouteProcessor.push({
|
|
1722
|
+
type: SocketRouteProcessorType.AuthVerifiableCredential
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1697
1725
|
addDefaultRestPaths(serverConfig);
|
|
1698
1726
|
addDefaultSocketPaths(serverConfig);
|
|
1699
1727
|
return serverConfig;
|
|
@@ -1766,7 +1794,7 @@ async function run(nodeOptions) {
|
|
|
1766
1794
|
nodeOptions ??= {};
|
|
1767
1795
|
const serverInfo = {
|
|
1768
1796
|
name: nodeOptions?.serverName ?? "TWIN Node Server",
|
|
1769
|
-
version: nodeOptions?.serverVersion ?? "0.0.2-next.
|
|
1797
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.14" // x-release-please-version
|
|
1770
1798
|
};
|
|
1771
1799
|
console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
|
|
1772
1800
|
if (!Is.stringValue(nodeOptions?.executionDirectory)) {
|
|
@@ -258,7 +258,7 @@ export interface IEngineEnvironmentVariables {
|
|
|
258
258
|
*/
|
|
259
259
|
hashicorpVaultEndpoint?: string;
|
|
260
260
|
/**
|
|
261
|
-
* The type of
|
|
261
|
+
* The type of logging task connector, can be a comma separated list: console, entity-storage.
|
|
262
262
|
*/
|
|
263
263
|
loggingConnector?: string;
|
|
264
264
|
/**
|
|
@@ -390,11 +390,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
390
390
|
* This only required if using a custom verifiable storage item, otherwise it will default the the network name.
|
|
391
391
|
*/
|
|
392
392
|
synchronisedStorageVerifiableStorageKeyId?: string;
|
|
393
|
-
/**
|
|
394
|
-
* The identity verification method id to use with synchronised storage for signing/verifying changesets.
|
|
395
|
-
* Defaults to synchronised-storage-assertion.
|
|
396
|
-
*/
|
|
397
|
-
synchronisedStorageVerificationMethodId?: string;
|
|
398
393
|
/**
|
|
399
394
|
* The key from the vault which is used to encrypt the synchronised storage blobs.
|
|
400
395
|
* Only required for trusted nodes, as regular nodes will request from the trusted nodes.
|
|
@@ -446,11 +441,6 @@ export interface IEngineEnvironmentVariables {
|
|
|
446
441
|
* What is the base callback url for rights management negotiations e.g. https://my-node/rights-management.
|
|
447
442
|
*/
|
|
448
443
|
rightsManagementBaseCallbackUrl?: string;
|
|
449
|
-
/**
|
|
450
|
-
* The rights management verification method id to use when signing/verifying negotiation requests.
|
|
451
|
-
* Defaults to rights-management-assertion.
|
|
452
|
-
*/
|
|
453
|
-
rightsManagementVerificationMethodId?: string;
|
|
454
444
|
/**
|
|
455
445
|
* The rights management configuration which includes the information sources modules to load.
|
|
456
446
|
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
@@ -499,4 +489,9 @@ export interface IEngineEnvironmentVariables {
|
|
|
499
489
|
* Use the @json: prefix to specify the path to the JSON configuration file.
|
|
500
490
|
*/
|
|
501
491
|
dataSpaceConnectorApps?: string;
|
|
492
|
+
/**
|
|
493
|
+
* Verifiable credential assertion for node to node communication.
|
|
494
|
+
* Defaults to node-authentication-assertion.
|
|
495
|
+
*/
|
|
496
|
+
vcAuthenticationVerificationMethodId?: string;
|
|
502
497
|
}
|
|
@@ -42,8 +42,24 @@ export interface IEngineServerEnvironmentVariables {
|
|
|
42
42
|
* Additional MIME type processors to include, comma separated.
|
|
43
43
|
*/
|
|
44
44
|
mimeTypeProcessors?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Enable to the route processor for verifiable credentials.
|
|
47
|
+
*/
|
|
48
|
+
enableVerifiableCredentialRouteProcessors?: string;
|
|
45
49
|
/**
|
|
46
50
|
* Disable Node Identity route processors.
|
|
47
51
|
*/
|
|
48
52
|
disableNodeIdentity?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Include the body in the REST logging output, useful for debugging.
|
|
55
|
+
*/
|
|
56
|
+
routeLoggingIncludeBody?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Include the full base 64 output in the REST logging output, useful for debugging.
|
|
59
|
+
*/
|
|
60
|
+
routeLoggingFullBase64?: string;
|
|
61
|
+
/**
|
|
62
|
+
* List of properties to obfuscate in the REST logging output, comma separated.
|
|
63
|
+
*/
|
|
64
|
+
routeLoggingObfuscateProperties?: string;
|
|
49
65
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @twin.org/node-core - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.14](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.13...node-core-v0.0.2-next.14) (2025-09-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* additional route logging env vars ([7152c88](https://github.com/twinfoundation/node/commit/7152c887c3ba76778e2d9e68ba57198b8d81d802))
|
|
9
|
+
|
|
10
|
+
## [0.0.2-next.13](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.12...node-core-v0.0.2-next.13) (2025-09-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* update to latest engine ([00d4974](https://github.com/twinfoundation/node/commit/00d4974f9cfb02bf48505cfb4af4a7aba1df4b3d))
|
|
16
|
+
|
|
3
17
|
## [0.0.2-next.12](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.11...node-core-v0.0.2-next.12) (2025-09-19)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -519,7 +519,7 @@ Hashicorp Vault endpoint.
|
|
|
519
519
|
|
|
520
520
|
> `optional` **loggingConnector**: `string`
|
|
521
521
|
|
|
522
|
-
The type of
|
|
522
|
+
The type of logging task connector, can be a comma separated list: console, entity-storage.
|
|
523
523
|
|
|
524
524
|
***
|
|
525
525
|
|
|
@@ -780,15 +780,6 @@ This only required if using a custom verifiable storage item, otherwise it will
|
|
|
780
780
|
|
|
781
781
|
***
|
|
782
782
|
|
|
783
|
-
### synchronisedStorageVerificationMethodId?
|
|
784
|
-
|
|
785
|
-
> `optional` **synchronisedStorageVerificationMethodId**: `string`
|
|
786
|
-
|
|
787
|
-
The identity verification method id to use with synchronised storage for signing/verifying changesets.
|
|
788
|
-
Defaults to synchronised-storage-assertion.
|
|
789
|
-
|
|
790
|
-
***
|
|
791
|
-
|
|
792
783
|
### synchronisedStorageBlobStorageEncryptionKeyId?
|
|
793
784
|
|
|
794
785
|
> `optional` **synchronisedStorageBlobStorageEncryptionKeyId**: `string`
|
|
@@ -904,15 +895,6 @@ What is the base callback url for rights management negotiations e.g. https://my
|
|
|
904
895
|
|
|
905
896
|
***
|
|
906
897
|
|
|
907
|
-
### rightsManagementVerificationMethodId?
|
|
908
|
-
|
|
909
|
-
> `optional` **rightsManagementVerificationMethodId**: `string`
|
|
910
|
-
|
|
911
|
-
The rights management verification method id to use when signing/verifying negotiation requests.
|
|
912
|
-
Defaults to rights-management-assertion.
|
|
913
|
-
|
|
914
|
-
***
|
|
915
|
-
|
|
916
898
|
### rightsManagementInformationSources?
|
|
917
899
|
|
|
918
900
|
> `optional` **rightsManagementInformationSources**: `string`
|
|
@@ -998,3 +980,12 @@ Is the data space connector enabled, defaults to false.
|
|
|
998
980
|
|
|
999
981
|
The application configuration for the data space connector.
|
|
1000
982
|
Use the @json: prefix to specify the path to the JSON configuration file.
|
|
983
|
+
|
|
984
|
+
***
|
|
985
|
+
|
|
986
|
+
### vcAuthenticationVerificationMethodId?
|
|
987
|
+
|
|
988
|
+
> `optional` **vcAuthenticationVerificationMethodId**: `string`
|
|
989
|
+
|
|
990
|
+
Verifiable credential assertion for node to node communication.
|
|
991
|
+
Defaults to node-authentication-assertion.
|
|
@@ -88,8 +88,40 @@ Additional MIME type processors to include, comma separated.
|
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
91
|
+
### enableVerifiableCredentialRouteProcessors?
|
|
92
|
+
|
|
93
|
+
> `optional` **enableVerifiableCredentialRouteProcessors**: `string`
|
|
94
|
+
|
|
95
|
+
Enable to the route processor for verifiable credentials.
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
91
99
|
### disableNodeIdentity?
|
|
92
100
|
|
|
93
101
|
> `optional` **disableNodeIdentity**: `string`
|
|
94
102
|
|
|
95
103
|
Disable Node Identity route processors.
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### routeLoggingIncludeBody?
|
|
108
|
+
|
|
109
|
+
> `optional` **routeLoggingIncludeBody**: `string`
|
|
110
|
+
|
|
111
|
+
Include the body in the REST logging output, useful for debugging.
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### routeLoggingFullBase64?
|
|
116
|
+
|
|
117
|
+
> `optional` **routeLoggingFullBase64**: `string`
|
|
118
|
+
|
|
119
|
+
Include the full base 64 output in the REST logging output, useful for debugging.
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
### routeLoggingObfuscateProperties?
|
|
124
|
+
|
|
125
|
+
> `optional` **routeLoggingObfuscateProperties**: `string`
|
|
126
|
+
|
|
127
|
+
List of properties to obfuscate in the REST logging output, comma separated.
|
|
@@ -771,7 +771,7 @@ Hashicorp Vault endpoint.
|
|
|
771
771
|
|
|
772
772
|
> `optional` **loggingConnector**: `string`
|
|
773
773
|
|
|
774
|
-
The type of
|
|
774
|
+
The type of logging task connector, can be a comma separated list: console, entity-storage.
|
|
775
775
|
|
|
776
776
|
#### Inherited from
|
|
777
777
|
|
|
@@ -1164,19 +1164,6 @@ This only required if using a custom verifiable storage item, otherwise it will
|
|
|
1164
1164
|
|
|
1165
1165
|
***
|
|
1166
1166
|
|
|
1167
|
-
### synchronisedStorageVerificationMethodId?
|
|
1168
|
-
|
|
1169
|
-
> `optional` **synchronisedStorageVerificationMethodId**: `string`
|
|
1170
|
-
|
|
1171
|
-
The identity verification method id to use with synchronised storage for signing/verifying changesets.
|
|
1172
|
-
Defaults to synchronised-storage-assertion.
|
|
1173
|
-
|
|
1174
|
-
#### Inherited from
|
|
1175
|
-
|
|
1176
|
-
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`synchronisedStorageVerificationMethodId`](IEngineEnvironmentVariables.md#synchronisedstorageverificationmethodid)
|
|
1177
|
-
|
|
1178
|
-
***
|
|
1179
|
-
|
|
1180
1167
|
### synchronisedStorageBlobStorageEncryptionKeyId?
|
|
1181
1168
|
|
|
1182
1169
|
> `optional` **synchronisedStorageBlobStorageEncryptionKeyId**: `string`
|
|
@@ -1336,19 +1323,6 @@ What is the base callback url for rights management negotiations e.g. https://my
|
|
|
1336
1323
|
|
|
1337
1324
|
***
|
|
1338
1325
|
|
|
1339
|
-
### rightsManagementVerificationMethodId?
|
|
1340
|
-
|
|
1341
|
-
> `optional` **rightsManagementVerificationMethodId**: `string`
|
|
1342
|
-
|
|
1343
|
-
The rights management verification method id to use when signing/verifying negotiation requests.
|
|
1344
|
-
Defaults to rights-management-assertion.
|
|
1345
|
-
|
|
1346
|
-
#### Inherited from
|
|
1347
|
-
|
|
1348
|
-
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`rightsManagementVerificationMethodId`](IEngineEnvironmentVariables.md#rightsmanagementverificationmethodid)
|
|
1349
|
-
|
|
1350
|
-
***
|
|
1351
|
-
|
|
1352
1326
|
### rightsManagementInformationSources?
|
|
1353
1327
|
|
|
1354
1328
|
> `optional` **rightsManagementInformationSources**: `string`
|
|
@@ -1477,6 +1451,19 @@ Use the @json: prefix to specify the path to the JSON configuration file.
|
|
|
1477
1451
|
|
|
1478
1452
|
***
|
|
1479
1453
|
|
|
1454
|
+
### vcAuthenticationVerificationMethodId?
|
|
1455
|
+
|
|
1456
|
+
> `optional` **vcAuthenticationVerificationMethodId**: `string`
|
|
1457
|
+
|
|
1458
|
+
Verifiable credential assertion for node to node communication.
|
|
1459
|
+
Defaults to node-authentication-assertion.
|
|
1460
|
+
|
|
1461
|
+
#### Inherited from
|
|
1462
|
+
|
|
1463
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`vcAuthenticationVerificationMethodId`](IEngineEnvironmentVariables.md#vcauthenticationverificationmethodid)
|
|
1464
|
+
|
|
1465
|
+
***
|
|
1466
|
+
|
|
1480
1467
|
### port?
|
|
1481
1468
|
|
|
1482
1469
|
> `optional` **port**: `string`
|
|
@@ -1597,6 +1584,18 @@ Additional MIME type processors to include, comma separated.
|
|
|
1597
1584
|
|
|
1598
1585
|
***
|
|
1599
1586
|
|
|
1587
|
+
### enableVerifiableCredentialRouteProcessors?
|
|
1588
|
+
|
|
1589
|
+
> `optional` **enableVerifiableCredentialRouteProcessors**: `string`
|
|
1590
|
+
|
|
1591
|
+
Enable to the route processor for verifiable credentials.
|
|
1592
|
+
|
|
1593
|
+
#### Inherited from
|
|
1594
|
+
|
|
1595
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`enableVerifiableCredentialRouteProcessors`](IEngineServerEnvironmentVariables.md#enableverifiablecredentialrouteprocessors)
|
|
1596
|
+
|
|
1597
|
+
***
|
|
1598
|
+
|
|
1600
1599
|
### disableNodeIdentity?
|
|
1601
1600
|
|
|
1602
1601
|
> `optional` **disableNodeIdentity**: `string`
|
|
@@ -1609,6 +1608,42 @@ Disable Node Identity route processors.
|
|
|
1609
1608
|
|
|
1610
1609
|
***
|
|
1611
1610
|
|
|
1611
|
+
### routeLoggingIncludeBody?
|
|
1612
|
+
|
|
1613
|
+
> `optional` **routeLoggingIncludeBody**: `string`
|
|
1614
|
+
|
|
1615
|
+
Include the body in the REST logging output, useful for debugging.
|
|
1616
|
+
|
|
1617
|
+
#### Inherited from
|
|
1618
|
+
|
|
1619
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`routeLoggingIncludeBody`](IEngineServerEnvironmentVariables.md#routeloggingincludebody)
|
|
1620
|
+
|
|
1621
|
+
***
|
|
1622
|
+
|
|
1623
|
+
### routeLoggingFullBase64?
|
|
1624
|
+
|
|
1625
|
+
> `optional` **routeLoggingFullBase64**: `string`
|
|
1626
|
+
|
|
1627
|
+
Include the full base 64 output in the REST logging output, useful for debugging.
|
|
1628
|
+
|
|
1629
|
+
#### Inherited from
|
|
1630
|
+
|
|
1631
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`routeLoggingFullBase64`](IEngineServerEnvironmentVariables.md#routeloggingfullbase64)
|
|
1632
|
+
|
|
1633
|
+
***
|
|
1634
|
+
|
|
1635
|
+
### routeLoggingObfuscateProperties?
|
|
1636
|
+
|
|
1637
|
+
> `optional` **routeLoggingObfuscateProperties**: `string`
|
|
1638
|
+
|
|
1639
|
+
List of properties to obfuscate in the REST logging output, comma separated.
|
|
1640
|
+
|
|
1641
|
+
#### Inherited from
|
|
1642
|
+
|
|
1643
|
+
[`IEngineServerEnvironmentVariables`](IEngineServerEnvironmentVariables.md).[`routeLoggingObfuscateProperties`](IEngineServerEnvironmentVariables.md#routeloggingobfuscateproperties)
|
|
1644
|
+
|
|
1645
|
+
***
|
|
1646
|
+
|
|
1612
1647
|
### features?
|
|
1613
1648
|
|
|
1614
1649
|
> `optional` **features**: `string`
|