node-opcua-server-configuration 2.98.0 → 2.98.1
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/clientTools/index.d.ts +1 -0
- package/dist/clientTools/index.js +18 -0
- package/dist/clientTools/index.js.map +1 -0
- package/dist/clientTools/push_certificate_management_client.d.ts +176 -0
- package/dist/clientTools/push_certificate_management_client.js +464 -0
- package/dist/clientTools/push_certificate_management_client.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/push_certificate_manager.d.ts +141 -0
- package/dist/push_certificate_manager.js +3 -0
- package/dist/push_certificate_manager.js.map +1 -0
- package/dist/server/install_certificate_file_watcher.d.ts +5 -0
- package/dist/server/install_certificate_file_watcher.js +24 -0
- package/dist/server/install_certificate_file_watcher.js.map +1 -0
- package/dist/server/install_push_certitifate_management.d.ts +19 -0
- package/dist/server/install_push_certitifate_management.js +216 -0
- package/dist/server/install_push_certitifate_management.js.map +1 -0
- package/dist/server/promote_trust_list.d.ts +6 -0
- package/dist/server/promote_trust_list.js +176 -0
- package/dist/server/promote_trust_list.js.map +1 -0
- package/dist/server/push_certificate_manager_helpers.d.ts +4 -0
- package/dist/server/push_certificate_manager_helpers.js +412 -0
- package/dist/server/push_certificate_manager_helpers.js.map +1 -0
- package/dist/server/push_certificate_manager_server_impl.d.ts +47 -0
- package/dist/server/push_certificate_manager_server_impl.js +526 -0
- package/dist/server/push_certificate_manager_server_impl.js.map +1 -0
- package/dist/server/roles_and_permissions.d.ts +3 -0
- package/dist/server/roles_and_permissions.js +39 -0
- package/dist/server/roles_and_permissions.js.map +1 -0
- package/dist/server/tools.d.ts +3 -0
- package/dist/server/tools.js +20 -0
- package/dist/server/tools.js.map +1 -0
- package/dist/server/trust_list_server.d.ts +13 -0
- package/dist/server/trust_list_server.js +90 -0
- package/dist/server/trust_list_server.js.map +1 -0
- package/dist/standard_certificate_types.d.ts +6 -0
- package/dist/standard_certificate_types.js +14 -0
- package/dist/standard_certificate_types.js.map +1 -0
- package/dist/trust_list.d.ts +79 -0
- package/dist/trust_list.js +3 -0
- package/dist/trust_list.js.map +1 -0
- package/dist/trust_list_impl.d.ts +0 -0
- package/dist/trust_list_impl.js +26 -0
- package/dist/trust_list_impl.js.map +1 -0
- package/package.json +31 -27
- package/bin/configurator.ts +0 -304
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push_certificate_management_client.js","sourceRoot":"","sources":["../../source/clientTools/push_certificate_management_client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,yDAAsE;AAEtE,mEAAiE;AACjE,2DAA6E;AAC7E,uEAAoE;AACpE,iEAA4G;AAC5G,uGAA0E;AAE1E,uDAAqD;AACrD,uEAAwD;AAYxD,MAAM,yBAAyB,GAAG,IAAA,iCAAa,EAAC,qBAAqB,CAAC,CAAC;AACvE,MAAM,0BAA0B,GAAG,IAAA,iCAAa,EAAC,0CAA0C,CAAC,CAAC;AAC7F,MAAM,qBAAqB,GAAG,IAAA,iCAAa,EAAC,qCAAqC,CAAC,CAAC;AACnF,MAAM,uBAAuB,GAAG,IAAA,iCAAa,EAAC,uCAAuC,CAAC,CAAC;AACvF,MAAM,iBAAiB,GAAG,IAAA,iCAAa,EAAC,uCAAuC,CAAC,CAAC;AACjF,MAAM,kBAAkB,GAAG,IAAA,iCAAa,EAAC,kCAAkC,CAAC,CAAC;AAC7E,MAAM,gCAAgC,GAAG,IAAA,iCAAa,EAAC,gDAAgD,CAAC,CAAC;AAEzG,MAAM,uBAAuB,GAAG,IAAA,iCAAa,EAAC,+DAA+D,CAAC,CAAC;AAC/G,MAAM,iBAAiB,GAAG,IAAA,iCAAa,EAAC,yDAAyD,CAAC,CAAC;AACnG,MAAM,qBAAqB,GAAG,IAAA,iCAAa,EAAC,6DAA6D,CAAC,CAAC;AAE3G,SAAS,wBAAwB,CAAC,sBAA8B;IAC5D,OAAO,MAAM,CAAC;AAClB,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AAmB,CAAC,uBAAuB,CAAC,CAAC;QAC7D,CAAC;KAAA;;AAzRa,mEAAmC,GAAW,IAAA,iCAAa,EAAC,SAAS,CAAC,CAAC;AAD5E,0EAA+B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-server-configuration
|
|
3
|
+
*/
|
|
4
|
+
export * from "./push_certificate_manager";
|
|
5
|
+
export * from "./clientTools/push_certificate_management_client";
|
|
6
|
+
export * from "./standard_certificate_types";
|
|
7
|
+
export * from "./server/install_push_certitifate_management";
|
|
8
|
+
export * from "./server/push_certificate_manager_server_impl";
|
|
9
|
+
export * from "./server/push_certificate_manager_helpers";
|
|
10
|
+
export * from "./server/promote_trust_list";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* @module node-opcua-server-configuration
|
|
19
|
+
*/
|
|
20
|
+
// export * from "./trust_list_impl";
|
|
21
|
+
__exportStar(require("./push_certificate_manager"), exports);
|
|
22
|
+
__exportStar(require("./clientTools/push_certificate_management_client"), exports);
|
|
23
|
+
__exportStar(require("./standard_certificate_types"), exports);
|
|
24
|
+
__exportStar(require("./server/install_push_certitifate_management"), exports);
|
|
25
|
+
__exportStar(require("./server/push_certificate_manager_server_impl"), exports);
|
|
26
|
+
__exportStar(require("./server/push_certificate_manager_helpers"), exports);
|
|
27
|
+
__exportStar(require("./server/promote_trust_list"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qCAAqC;AACrC,6DAA2C;AAC3C,mFAAiE;AACjE,+DAA6C;AAE7C,+EAA6D;AAC7D,gFAA8D;AAC9D,4EAA0D;AAC1D,8DAA4C"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* @module node-opcua-server-configuration
|
|
4
|
+
*/
|
|
5
|
+
import { ByteString, UAString } from "node-opcua-basic-types";
|
|
6
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
7
|
+
import { StatusCode } from "node-opcua-status-code";
|
|
8
|
+
export interface CreateSigningRequestResult {
|
|
9
|
+
statusCode: StatusCode;
|
|
10
|
+
certificateSigningRequest?: Buffer;
|
|
11
|
+
}
|
|
12
|
+
export interface GetRejectedListResult {
|
|
13
|
+
statusCode: StatusCode;
|
|
14
|
+
certificates?: Buffer[];
|
|
15
|
+
}
|
|
16
|
+
export interface UpdateCertificateResult {
|
|
17
|
+
statusCode: StatusCode;
|
|
18
|
+
applyChangesRequired?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface PushCertificateManager {
|
|
21
|
+
/**
|
|
22
|
+
* The SupportedPrivateKeyFormats specifies the PrivateKey formats supported by the Server.
|
|
23
|
+
* Possible values include “PEM” (see RFC 5958) or “PFX” (see PKCS #12). The array is empty
|
|
24
|
+
* if the Server does not allow external Clients to update the PrivateKey
|
|
25
|
+
*/
|
|
26
|
+
getSupportedPrivateKeyFormats(): Promise<string[]>;
|
|
27
|
+
/**
|
|
28
|
+
* UpdateCertificate is used to update a Certificate for a Server.
|
|
29
|
+
* There are the following three use cases for this Method:
|
|
30
|
+
* • The new Certificate was created based on a signing request created with the Method
|
|
31
|
+
* CreateSigningRequest defined in 7.7.6. In this case there is no privateKey provided.
|
|
32
|
+
* • A new privateKey and Certificate was created outside the Server and both are updated
|
|
33
|
+
* with this Method.
|
|
34
|
+
* • A new Certificate was created and signed with the information from the old Certificate.
|
|
35
|
+
* In this case there is no privateKey provided.
|
|
36
|
+
* The Server shall do all normal integrity checks on the Certificate and all of the issuer
|
|
37
|
+
* Certificates. If errors occur the Bad_SecurityChecksFailed error is returned.
|
|
38
|
+
* The Server shall report an error if the public key does not match the existing Certificate and
|
|
39
|
+
* the privateKey was not provided.
|
|
40
|
+
*
|
|
41
|
+
* @param certificateGroupId - The NodeId of the Certificate Group Object which is affected by the update.
|
|
42
|
+
* If null the DefaultApplicationGroup is used.
|
|
43
|
+
* @param certificateTypeId - The type of Certificate being updated. The set of permitted types is specified by
|
|
44
|
+
* the CertificateTypes Property belonging to the Certificate Group.
|
|
45
|
+
* @param certificate - The DER encoded Certificate which replaces the existing Certificate
|
|
46
|
+
* @param issuerCertificates - The issuer Certificates needed to verify the signature on the new Certificate
|
|
47
|
+
* @param privateKeyFormat - The format of the Private Key (PEM or PFX). If the privateKey is not specified
|
|
48
|
+
* the privateKeyFormat is null or empty
|
|
49
|
+
* @param privateKey - the Private Key encoded in the privateKeyFormat.
|
|
50
|
+
* @return applyChangesRequired - Indicates that the ApplyChanges Method shall be called before the new
|
|
51
|
+
* Certificate will be used.
|
|
52
|
+
*
|
|
53
|
+
*
|
|
54
|
+
* Result Code Description
|
|
55
|
+
* BadInvalidArgument The certificateTypeId or certificateGroupId is not valid.
|
|
56
|
+
* BadCertificateInvalid The Certificate is invalid or the format is not supported.
|
|
57
|
+
* BadNotSupported The PrivateKey is invalid or the format is not supported.
|
|
58
|
+
* BadUserAccessDenied The current user does not have the rights required.
|
|
59
|
+
* BadSecurityChecksFailed Some failure occurred verifying the integrity of the Certificate.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
updateCertificate(certificateGroupId: NodeId | string, certificateTypeId: NodeId | string, certificate: ByteString, issuerCertificates: ByteString[], privateKeyFormat: UAString, privateKey: ByteString): Promise<UpdateCertificateResult>;
|
|
63
|
+
/**
|
|
64
|
+
* The ApplyChanges Method is used to apply any security related changes if the Server sets
|
|
65
|
+
* the applyChangesRequired flag when another Method is called. Servers should minimize the
|
|
66
|
+
* impact of applying the new configuration, however, it could require that all existing Sessions
|
|
67
|
+
* be closed and re-opened by the Clients.
|
|
68
|
+
*
|
|
69
|
+
*
|
|
70
|
+
* ApplyChanges is used to tell the Server to apply any security changes.
|
|
71
|
+
* This Method should only be called if a previous call to a Method that changed the
|
|
72
|
+
* configuration returns applyChangesRequired=true (see 7.7.4).
|
|
73
|
+
* If the Server Certificate has changed, Secure Channels using the old Certificate will
|
|
74
|
+
* eventually be interrupted. The only leeway the Server has is with the timing. In the best case,
|
|
75
|
+
* the Server can close the TransportConnections for the affected Endpoints and leave any
|
|
76
|
+
* Subscriptions intact. This should appear no different than a network interruption from the
|
|
77
|
+
* perspective of the Client. The Client should be prepared to deal with Certificate changes
|
|
78
|
+
* during its reconnect logic. In the worst case, a full shutdown which affects all connected
|
|
79
|
+
* Clients will be necessary. In the latter case, the Server shall advertise its intent to interrupt
|
|
80
|
+
* connections by setting the SecondsTillShutdown and ShutdownReason Properties in the
|
|
81
|
+
* ServerStatus Variable.
|
|
82
|
+
*
|
|
83
|
+
* If the Secure Channel being used to call this Method will be affected by the Certificate change
|
|
84
|
+
* then the Server shall introduce a delay long enough to allow the caller to receive a reply.
|
|
85
|
+
* This Method requires an encrypted channel and that the Client provide credentials with
|
|
86
|
+
* administrative rights on the Server.
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* Result Code Description
|
|
90
|
+
* Bad_UserAccessDenied The current user does not have the rights required.
|
|
91
|
+
*/
|
|
92
|
+
applyChanges(): Promise<StatusCode>;
|
|
93
|
+
/**
|
|
94
|
+
* The CreateSigningRequest Method asks the Server to create a PKCS #10 encoded Certificate
|
|
95
|
+
* Request that is signed with the Server’s private key.
|
|
96
|
+
*
|
|
97
|
+
* CreateSigningRequest Method asks the Server to create a PKCS #10 DER encoded
|
|
98
|
+
* Certificate Request that is signed with the Server’s private key. This request can be then used
|
|
99
|
+
* to request a Certificate from a CA that expects requests in this format.
|
|
100
|
+
* This Method requires an encrypted channel and that the Client provide credentials with
|
|
101
|
+
* administrative rights on the Server.
|
|
102
|
+
*
|
|
103
|
+
* @param certificateGroupId - The NodeId of the Certificate Group Object which is affected by the request.
|
|
104
|
+
* If null the DefaultApplicationGroup is used.
|
|
105
|
+
* @param certificateTypeId - The type of Certificate being requested. The set of permitted types is specified by
|
|
106
|
+
* the CertificateTypes Property belonging to the Certificate Group.
|
|
107
|
+
* @param subjectName - The subject name to use in the Certificate Request.
|
|
108
|
+
* If not specified the SubjectName from the current Certificate is used.
|
|
109
|
+
* The format of the subjectName is defined in 7.6.4
|
|
110
|
+
* @param regeneratePrivateKey - If TRUE the Server shall create a new Private Key which it stores until the
|
|
111
|
+
* matching signed Certificate is uploaded with the UpdateCertificate Method.
|
|
112
|
+
* Previously created Private Keys may be discarded if UpdateCertificate was not
|
|
113
|
+
* called before calling this method again. If FALSE the Server uses its existing
|
|
114
|
+
* Private Key.
|
|
115
|
+
* @param nonce - Additional entropy which the caller shall provide if regeneratePrivateKey is TRUE.
|
|
116
|
+
* It shall be at least 32 bytes long
|
|
117
|
+
* @return certificateRequest - The PKCS #10 DER encoded Certificate Request.
|
|
118
|
+
*
|
|
119
|
+
*
|
|
120
|
+
* Result Code Description
|
|
121
|
+
* Bad_InvalidArgument The certificateTypeId, certificateGroupId or subjectName is not valid.
|
|
122
|
+
* Bad_UserAccessDenied The current user does not have the rights required.
|
|
123
|
+
*/
|
|
124
|
+
createSigningRequest(certificateGroupId: NodeId | string, certificateTypeId: NodeId | string, subjectName: string | null, regeneratePrivateKey?: boolean, nonce?: ByteString): Promise<CreateSigningRequestResult>;
|
|
125
|
+
/**
|
|
126
|
+
* GetRejectedList Method returns the list of Certificates that have been rejected by the Server.
|
|
127
|
+
* No rules are defined for how the Server updates this list or how long a Certificate is kept in
|
|
128
|
+
* the list. It is recommended that every valid but untrusted Certificate be added to the rejected
|
|
129
|
+
* list as long as storage is available. Servers should omit older entries from the list returned if
|
|
130
|
+
* the maximum message size is not large enough to allow the entire list to be returned.
|
|
131
|
+
* This Method requires an encrypted channel and that the Client provides credentials with
|
|
132
|
+
* administrative rights on the Server.
|
|
133
|
+
*
|
|
134
|
+
* Argument Description
|
|
135
|
+
* certificates out - The DER encoded form of the Certificates rejected by the Server.
|
|
136
|
+
*
|
|
137
|
+
* Result Code Description
|
|
138
|
+
* Bad_UserAccessDenied The current user does not have the rights required
|
|
139
|
+
*/
|
|
140
|
+
getRejectedList(): Promise</*certificates*/ GetRejectedListResult>;
|
|
141
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push_certificate_manager.js","sourceRoot":"","sources":["../source/push_certificate_manager.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UAObject } from "node-opcua-address-space-base";
|
|
2
|
+
export interface ChangeDetector {
|
|
3
|
+
on(eventName: "certificateChange", handler: () => void): this;
|
|
4
|
+
}
|
|
5
|
+
export declare function installCertificateFileWatcher(node: UAObject, certificateFile: string): ChangeDetector;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.installCertificateFileWatcher = void 0;
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
7
|
+
const debugLog = (0, node_opcua_debug_1.make_debugLog)("ServerConfiguration");
|
|
8
|
+
function installCertificateFileWatcher(node, certificateFile) {
|
|
9
|
+
const fileToWatch = path.basename(certificateFile);
|
|
10
|
+
const fsWatcher = fs.watch(path.dirname(certificateFile), { persistent: false }, (eventType, filename) => {
|
|
11
|
+
/** */
|
|
12
|
+
if (filename === fileToWatch) {
|
|
13
|
+
debugLog("filename changed = ", filename, fileToWatch);
|
|
14
|
+
node.emit("certificateChange");
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const addressSpace = node.addressSpace;
|
|
18
|
+
addressSpace.registerShutdownTask(() => {
|
|
19
|
+
fsWatcher.close();
|
|
20
|
+
});
|
|
21
|
+
return node;
|
|
22
|
+
}
|
|
23
|
+
exports.installCertificateFileWatcher = installCertificateFileWatcher;
|
|
24
|
+
//# sourceMappingURL=install_certificate_file_watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install_certificate_file_watcher.js","sourceRoot":"","sources":["../../source/server/install_certificate_file_watcher.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,uDAAiD;AAEjD,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,qBAAqB,CAAC,CAAC;AAKtD,SAAgB,6BAA6B,CAAC,IAAc,EAAE,eAAuB;IACjF,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,SAA8B,EAAE,QAAQ,EAAE,EAAE;QAC1H,MAAM;QACN,IAAI,QAAQ,KAAK,WAAW,EAAE;YAC1B,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;YACvD,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;SAClC;IACL,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,CAAC,YAAa,CAAC;IACxC,YAAY,CAAC,oBAAoB,CAAC,GAAG,EAAE;QACnC,SAAS,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,IAAiC,CAAC;AAC7C,CAAC;AAdD,sEAcC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AddressSpace } from "node-opcua-address-space";
|
|
2
|
+
import { OPCUACertificateManager } from "node-opcua-certificate-manager";
|
|
3
|
+
import { Certificate, PrivateKey } from "node-opcua-crypto";
|
|
4
|
+
import { ICertificateKeyPairProviderPriv } from "node-opcua-common";
|
|
5
|
+
import { OPCUAServer } from "node-opcua-server";
|
|
6
|
+
import { ApplicationDescriptionOptions } from "node-opcua-types";
|
|
7
|
+
export interface OPCUAServerPartial extends ICertificateKeyPairProviderPriv {
|
|
8
|
+
serverInfo?: ApplicationDescriptionOptions;
|
|
9
|
+
serverCertificateManager: OPCUACertificateManager;
|
|
10
|
+
privateKeyFile: string;
|
|
11
|
+
certificateFile: string;
|
|
12
|
+
$$certificate: null | Certificate;
|
|
13
|
+
$$certificateChain: null | Certificate;
|
|
14
|
+
$$privateKey: null | PrivateKey;
|
|
15
|
+
engine: {
|
|
16
|
+
addressSpace?: AddressSpace;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare function installPushCertificateManagementOnServer(server: OPCUAServer): Promise<void>;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.installPushCertificateManagementOnServer = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* @module node-opcua-server-configuration-server
|
|
15
|
+
*/
|
|
16
|
+
const fs = require("fs");
|
|
17
|
+
const os = require("os");
|
|
18
|
+
const path = require("path");
|
|
19
|
+
const crypto_1 = require("crypto");
|
|
20
|
+
const chalk = require("chalk");
|
|
21
|
+
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
22
|
+
const node_opcua_crypto_1 = require("node-opcua-crypto");
|
|
23
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
24
|
+
const node_opcua_hostname_1 = require("node-opcua-hostname");
|
|
25
|
+
const push_certificate_manager_helpers_1 = require("./push_certificate_manager_helpers");
|
|
26
|
+
// node 14 onward : import { readFile } from "fs/promises";
|
|
27
|
+
const { readFile } = fs.promises;
|
|
28
|
+
const debugLog = (0, node_opcua_debug_1.make_debugLog)("ServerConfiguration");
|
|
29
|
+
const errorLog = (0, node_opcua_debug_1.make_errorLog)("ServerConfiguration");
|
|
30
|
+
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)("ServerConfiguration");
|
|
31
|
+
function getCertificate() {
|
|
32
|
+
if (!this.$$certificate) {
|
|
33
|
+
const certificateChain = getCertificateChain.call(this);
|
|
34
|
+
this.$$certificate = (0, node_opcua_crypto_1.split_der)(certificateChain)[0];
|
|
35
|
+
}
|
|
36
|
+
return this.$$certificate;
|
|
37
|
+
}
|
|
38
|
+
function getCertificateChain() {
|
|
39
|
+
if (!this.$$certificateChain) {
|
|
40
|
+
throw new Error("internal Error. cannot find $$certificateChain");
|
|
41
|
+
}
|
|
42
|
+
return this.$$certificateChain;
|
|
43
|
+
}
|
|
44
|
+
function getPrivateKey() {
|
|
45
|
+
// istanbul ignore next
|
|
46
|
+
if (!this.$$privateKey) {
|
|
47
|
+
throw new Error("internal Error. cannot find $$privateKey");
|
|
48
|
+
}
|
|
49
|
+
return this.$$privateKey;
|
|
50
|
+
}
|
|
51
|
+
function getIpAddresses() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const ipAddresses = [];
|
|
54
|
+
const netInterfaces = os.networkInterfaces();
|
|
55
|
+
for (const interfaceName of Object.keys(netInterfaces)) {
|
|
56
|
+
if (!netInterfaces[interfaceName]) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
for (const interFace of netInterfaces[interfaceName]) {
|
|
60
|
+
if ("IPv4" !== interFace.family || interFace.internal !== false) {
|
|
61
|
+
// skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
ipAddresses.push(interFace.address);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return ipAddresses;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
function install() {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
debugLog("install push certificate management", this.serverCertificateManager.rootDir);
|
|
76
|
+
this.__defineGetter__("privateKeyFile", () => this.serverCertificateManager.privateKey);
|
|
77
|
+
this.__defineGetter__("certificateFile", () => path.join(this.serverCertificateManager.rootDir, "own/certs/certificate.pem"));
|
|
78
|
+
if (!this.$$privateKey) {
|
|
79
|
+
this.$$privateKey = (0, crypto_1.createPrivateKey)(yield readFile(this.serverCertificateManager.privateKey, "utf8"));
|
|
80
|
+
}
|
|
81
|
+
if (!this.$$certificateChain) {
|
|
82
|
+
const certificateFile = this.certificateFile;
|
|
83
|
+
if (!fs.existsSync(certificateFile)) {
|
|
84
|
+
// this is the first time server is launch
|
|
85
|
+
// let's create a default self signed certificate with limited validity
|
|
86
|
+
const fqdn = yield (0, node_opcua_hostname_1.getFullyQualifiedDomainName)();
|
|
87
|
+
const ipAddresses = yield getIpAddresses();
|
|
88
|
+
const applicationUri = (this.serverInfo ? this.serverInfo.applicationUri : null) || "uri:MISSING";
|
|
89
|
+
const options = {
|
|
90
|
+
applicationUri,
|
|
91
|
+
dns: [fqdn],
|
|
92
|
+
ip: ipAddresses,
|
|
93
|
+
subject: "/CN=" + applicationUri + ";/L=Paris",
|
|
94
|
+
startDate: new Date(),
|
|
95
|
+
validity: 365 * 5,
|
|
96
|
+
/* */
|
|
97
|
+
outputFile: certificateFile
|
|
98
|
+
};
|
|
99
|
+
debugLog("creating self signed certificate", options);
|
|
100
|
+
yield this.serverCertificateManager.createSelfSignedCertificate(options);
|
|
101
|
+
}
|
|
102
|
+
const certificatePEM = yield readFile(certificateFile, "utf8");
|
|
103
|
+
this.$$certificateChain = (0, node_opcua_crypto_1.convertPEMtoDER)(certificatePEM);
|
|
104
|
+
// await this.serverCertificateManager.trustCertificate( this.$$certificateChain);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function getCertificateChainEP() {
|
|
109
|
+
const certificateFile = path.join(this.certificateManager.rootDir, "own/certs/certificate.pem");
|
|
110
|
+
const certificatePEM = fs.readFileSync(certificateFile, "utf8");
|
|
111
|
+
const $$certificateChain = (0, node_opcua_crypto_1.convertPEMtoDER)(certificatePEM);
|
|
112
|
+
const thumbprint = (0, node_opcua_crypto_1.makeSHA1Thumbprint)($$certificateChain);
|
|
113
|
+
return $$certificateChain;
|
|
114
|
+
}
|
|
115
|
+
function getPrivateKeyEP() {
|
|
116
|
+
const $$privateKey = (0, crypto_1.createPrivateKey)(fs.readFileSync(this.certificateManager.privateKey, "utf8"));
|
|
117
|
+
return $$privateKey;
|
|
118
|
+
}
|
|
119
|
+
function onCertificateAboutToChange(server) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
debugLog(chalk.yellow(" onCertificateAboutToChange => Suspending End points"));
|
|
122
|
+
yield server.suspendEndPoints();
|
|
123
|
+
debugLog(chalk.yellow(" onCertificateAboutToChange => End points suspended"));
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* onCertificateChange is called when the serverConfiguration notifies
|
|
128
|
+
* that the server certificate and/or private key has changed.
|
|
129
|
+
*
|
|
130
|
+
* this function suspends all endpoint listeners and stop all existing channels
|
|
131
|
+
* then start all endpoint listener
|
|
132
|
+
*
|
|
133
|
+
* @param server
|
|
134
|
+
*/
|
|
135
|
+
function onCertificateChange(server) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
debugLog("on CertificateChanged");
|
|
138
|
+
const _server = server;
|
|
139
|
+
_server.$$privateKey = (0, crypto_1.createPrivateKey)(fs.readFileSync(server.serverCertificateManager.privateKey, "utf8"));
|
|
140
|
+
const certificateFile = path.join(server.serverCertificateManager.rootDir, "own/certs/certificate.pem");
|
|
141
|
+
const certificatePEM = fs.readFileSync(certificateFile, "utf8");
|
|
142
|
+
const privateKeyFile = server.serverCertificateManager.privateKey;
|
|
143
|
+
const privateKey = (0, crypto_1.createPrivateKey)(fs.readFileSync(privateKeyFile, "utf8"));
|
|
144
|
+
// also reread the private key
|
|
145
|
+
_server.$$certificateChain = (0, node_opcua_crypto_1.convertPEMtoDER)(certificatePEM);
|
|
146
|
+
_server.$$privateKey = privateKey;
|
|
147
|
+
// note : $$certificate will be reconstructed on demand
|
|
148
|
+
_server.$$certificate = (0, node_opcua_crypto_1.split_der)(_server.$$certificateChain)[0];
|
|
149
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
try {
|
|
151
|
+
debugLog(chalk.yellow(" onCertificateChange => shutting down channels"));
|
|
152
|
+
yield server.shutdownChannels();
|
|
153
|
+
debugLog(chalk.yellow(" onCertificateChange => channels shut down"));
|
|
154
|
+
debugLog(chalk.yellow(" onCertificateChange => resuming end points"));
|
|
155
|
+
yield server.resumeEndPoints();
|
|
156
|
+
debugLog(chalk.yellow(" onCertificateChange => end points resumed"));
|
|
157
|
+
debugLog(chalk.yellow("channels have been closed -> client should reconnect "));
|
|
158
|
+
}
|
|
159
|
+
catch (err) {
|
|
160
|
+
if (err instanceof Error) {
|
|
161
|
+
errorLog("Error in CertificateChanged handler ", err.message);
|
|
162
|
+
}
|
|
163
|
+
debugLog("err = ", err);
|
|
164
|
+
}
|
|
165
|
+
}), 2000);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function installPushCertificateManagementOnServer(server) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
if (!server.engine || !server.engine.addressSpace) {
|
|
171
|
+
throw new Error("Server must have a valid address space." +
|
|
172
|
+
"you need to call installPushCertificateManagementOnServer after server has been initialized");
|
|
173
|
+
}
|
|
174
|
+
yield install.call(server);
|
|
175
|
+
server.getCertificate = getCertificate;
|
|
176
|
+
server.getCertificateChain = getCertificateChain;
|
|
177
|
+
server.getPrivateKey = getPrivateKey;
|
|
178
|
+
for (const endpoint of server.endpoints) {
|
|
179
|
+
const endpointPriv = endpoint;
|
|
180
|
+
endpointPriv._certificateChain = null;
|
|
181
|
+
endpointPriv._privateKey = null;
|
|
182
|
+
endpoint.getCertificateChain = getCertificateChainEP;
|
|
183
|
+
endpoint.getPrivateKey = getPrivateKeyEP;
|
|
184
|
+
for (const e of endpoint.endpointDescriptions()) {
|
|
185
|
+
// e.serverCertificate = null;
|
|
186
|
+
e.__defineGetter__("serverCertificate", function () {
|
|
187
|
+
return endpoint.getCertificate();
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
yield (0, push_certificate_manager_helpers_1.installPushCertificateManagement)(server.engine.addressSpace, {
|
|
192
|
+
applicationGroup: server.serverCertificateManager,
|
|
193
|
+
userTokenGroup: server.userCertificateManager,
|
|
194
|
+
applicationUri: server.serverInfo.applicationUri || "InvalidURI"
|
|
195
|
+
});
|
|
196
|
+
const serverConfiguration = server.engine.addressSpace.rootFolder.objects.server.getChildByName("ServerConfiguration");
|
|
197
|
+
const serverConfigurationPriv = serverConfiguration;
|
|
198
|
+
(0, node_opcua_assert_1.assert)(serverConfigurationPriv.$pushCertificateManager);
|
|
199
|
+
serverConfigurationPriv.$pushCertificateManager.on("CertificateAboutToChange", (actionQueue) => {
|
|
200
|
+
actionQueue.push(() => __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
debugLog("CertificateAboutToChange Event received");
|
|
202
|
+
yield onCertificateAboutToChange(server);
|
|
203
|
+
debugLog("CertificateAboutToChange Event processed");
|
|
204
|
+
}));
|
|
205
|
+
});
|
|
206
|
+
serverConfigurationPriv.$pushCertificateManager.on("CertificateChanged", (actionQueue) => {
|
|
207
|
+
actionQueue.push(() => __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
debugLog("CertificateChanged Event received");
|
|
209
|
+
yield onCertificateChange(server);
|
|
210
|
+
debugLog("CertificateChanged Event processed");
|
|
211
|
+
}));
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
exports.installPushCertificateManagementOnServer = installPushCertificateManagementOnServer;
|
|
216
|
+
//# sourceMappingURL=install_push_certitifate_management.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install_push_certitifate_management.js","sourceRoot":"","sources":["../../source/server/install_push_certitifate_management.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;GAEG;AACH,yBAAyB;AACzB,yBAAyB;AACzB,6BAA6B;AAC7B,mCAA0C;AAE1C,+BAA+B;AAG/B,yDAA2C;AAE3C,yDAA2H;AAC3H,uDAAgF;AAChF,6DAAkE;AAKlE,yFAAsF;AAGtF,4DAA4D;AAC5D,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC;AAEjC,MAAM,QAA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-configuration
|
|
3
|
+
*/
|
|
4
|
+
import { UATrustList, UAObject, UAVariable } from "node-opcua-address-space";
|
|
5
|
+
export declare function promoteTrustList(trustList: UATrustList): Promise<void>;
|
|
6
|
+
export declare function installAccessRestrictionOnTrustList(trustList: UAVariable | UAObject): void;
|