node-opcua-server-configuration 2.63.1 → 2.64.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 -1
- package/dist/clientTools/index.js +13 -13
- package/dist/clientTools/push_certificate_management_client.d.ts +176 -176
- package/dist/clientTools/push_certificate_management_client.js +465 -465
- package/dist/index.d.ts +10 -10
- package/dist/index.js +23 -23
- package/dist/push_certificate_manager.d.ts +141 -141
- package/dist/push_certificate_manager.js +2 -2
- package/dist/push_certificate_manager_helpers.d.ts +6 -0
- package/dist/push_certificate_manager_helpers.js +331 -0
- package/dist/push_certificate_manager_helpers.js.map +1 -0
- package/dist/server/install_CertificateAlarm.d.ts +5 -5
- package/dist/server/install_CertificateAlarm.js +37 -37
- package/dist/server/install_push_certitifate_management.d.ts +15 -15
- package/dist/server/install_push_certitifate_management.js +214 -214
- package/dist/server/promote_trust_list.d.ts +6 -6
- package/dist/server/promote_trust_list.js +175 -175
- package/dist/server/push_certificate_manager_helpers.d.ts +7 -7
- package/dist/server/push_certificate_manager_helpers.js +306 -306
- package/dist/server/push_certificate_manager_server_impl.d.ts +48 -48
- package/dist/server/push_certificate_manager_server_impl.js +522 -522
- package/dist/server/roles_and_permissions.d.ts +3 -3
- package/dist/server/roles_and_permissions.js +40 -40
- package/dist/server/tools.d.ts +3 -3
- package/dist/server/tools.js +19 -19
- package/dist/server/trust_list_server.d.ts +13 -13
- package/dist/server/trust_list_server.js +89 -89
- package/dist/standard_certificate_types.d.ts +6 -6
- package/dist/standard_certificate_types.js +13 -13
- package/dist/trust_list.d.ts +79 -79
- package/dist/trust_list.js +2 -2
- package/dist/trust_list_impl.js +25 -25
- package/package.json +27 -27
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module node-opcua-server-configuration
|
|
4
|
+
*/
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.installPushCertificateManagement = void 0;
|
|
16
|
+
const util_1 = require("util");
|
|
17
|
+
const node_opcua_address_space_1 = require("node-opcua-address-space");
|
|
18
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
19
|
+
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
20
|
+
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
21
|
+
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
22
|
+
const install_CertificateAlarm_1 = require("./server/install_CertificateAlarm");
|
|
23
|
+
const push_certificate_manager_server_impl_1 = require("./server/push_certificate_manager_server_impl");
|
|
24
|
+
const node_opcua_file_transfer_1 = require("node-opcua-file-transfer");
|
|
25
|
+
const trust_list_server_1 = require("./server/trust_list_server");
|
|
26
|
+
const memfs_1 = require("memfs");
|
|
27
|
+
const debugLog = node_opcua_debug_1.make_debugLog("ServerConfiguration");
|
|
28
|
+
const doDebug = node_opcua_debug_1.checkDebugFlag("ServerConfiguration");
|
|
29
|
+
const errorLog = debugLog;
|
|
30
|
+
function hasExpectedUserAccess(context) {
|
|
31
|
+
if (!context ||
|
|
32
|
+
!context.session ||
|
|
33
|
+
!context.session.userIdentityToken) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const currentUserRole = context.getCurrentUserRole();
|
|
37
|
+
return !!currentUserRole.match(node_opcua_address_space_1.WellKnownRoles.SecurityAdmin);
|
|
38
|
+
}
|
|
39
|
+
function hasEncryptedChannel(context) {
|
|
40
|
+
// todo
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
function expected(variant, dataType, variantArrayType) {
|
|
44
|
+
if (!variant) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
if (variant.dataType !== dataType) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (variant.arrayType !== variantArrayType) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function getPushCertificateManager(method) {
|
|
56
|
+
const serverConfiguration = method.addressSpace.rootFolder.objects.server.serverConfiguration;
|
|
57
|
+
const serverConfigurationPriv = serverConfiguration;
|
|
58
|
+
if (serverConfigurationPriv.$pushCertificateManager) {
|
|
59
|
+
return serverConfigurationPriv.$pushCertificateManager;
|
|
60
|
+
}
|
|
61
|
+
// throw new Error("Cannot find pushCertificateManager object");
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
function _createSigningRequest(inputArguments, context) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const certificateGroupIdVariant = inputArguments[0];
|
|
67
|
+
const certificateTypeIdVariant = inputArguments[1];
|
|
68
|
+
const subjectNameVariant = inputArguments[2];
|
|
69
|
+
const regeneratePrivateKeyVariant = inputArguments[3];
|
|
70
|
+
const nonceVariant = inputArguments[4];
|
|
71
|
+
if (!expected(certificateGroupIdVariant, node_opcua_variant_1.DataType.NodeId, node_opcua_variant_1.VariantArrayType.Scalar)) {
|
|
72
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInvalidArgument };
|
|
73
|
+
}
|
|
74
|
+
if (!expected(certificateTypeIdVariant, node_opcua_variant_1.DataType.NodeId, node_opcua_variant_1.VariantArrayType.Scalar)) {
|
|
75
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInvalidArgument };
|
|
76
|
+
}
|
|
77
|
+
if (!expected(subjectNameVariant, node_opcua_variant_1.DataType.String, node_opcua_variant_1.VariantArrayType.Scalar)) {
|
|
78
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInvalidArgument };
|
|
79
|
+
}
|
|
80
|
+
if (!expected(regeneratePrivateKeyVariant, node_opcua_variant_1.DataType.Boolean, node_opcua_variant_1.VariantArrayType.Scalar)) {
|
|
81
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInvalidArgument };
|
|
82
|
+
}
|
|
83
|
+
if (!expected(regeneratePrivateKeyVariant, node_opcua_variant_1.DataType.Boolean, node_opcua_variant_1.VariantArrayType.Scalar)) {
|
|
84
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInvalidArgument };
|
|
85
|
+
}
|
|
86
|
+
if (!hasEncryptedChannel(context)) {
|
|
87
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient };
|
|
88
|
+
}
|
|
89
|
+
if (!hasExpectedUserAccess(context)) {
|
|
90
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied };
|
|
91
|
+
}
|
|
92
|
+
const certificateGroupId = certificateGroupIdVariant.value;
|
|
93
|
+
const certificateTypeId = certificateTypeIdVariant.value;
|
|
94
|
+
const subjectName = subjectNameVariant.value;
|
|
95
|
+
const regeneratePrivateKey = regeneratePrivateKeyVariant.value;
|
|
96
|
+
const nonce = nonceVariant.value;
|
|
97
|
+
const pushCertificateManager = getPushCertificateManager(this);
|
|
98
|
+
if (!pushCertificateManager) {
|
|
99
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadNotImplemented };
|
|
100
|
+
}
|
|
101
|
+
const result = yield pushCertificateManager.createSigningRequest(certificateGroupId, certificateTypeId, subjectName, regeneratePrivateKey, nonce);
|
|
102
|
+
if (result.statusCode !== node_opcua_status_code_1.StatusCodes.Good) {
|
|
103
|
+
return { statusCode: result.statusCode };
|
|
104
|
+
}
|
|
105
|
+
const callMethodResult = {
|
|
106
|
+
outputArguments: [
|
|
107
|
+
{
|
|
108
|
+
dataType: node_opcua_variant_1.DataType.ByteString,
|
|
109
|
+
value: result.certificateSigningRequest
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
statusCode: result.statusCode
|
|
113
|
+
};
|
|
114
|
+
return callMethodResult;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function _updateCertificate(inputArguments, context) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const certificateGroupId = inputArguments[0].value;
|
|
120
|
+
const certificateTypeId = inputArguments[1].value;
|
|
121
|
+
const certificate = inputArguments[2].value;
|
|
122
|
+
const issuerCertificates = inputArguments[3].value;
|
|
123
|
+
const privateKeyFormat = inputArguments[4].value;
|
|
124
|
+
const privateKey = inputArguments[5].value;
|
|
125
|
+
// This Method requires an encrypted channel and that the Client provides credentials with
|
|
126
|
+
// administrative rights on the Server
|
|
127
|
+
if (!hasEncryptedChannel(context)) {
|
|
128
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient };
|
|
129
|
+
}
|
|
130
|
+
if (!hasExpectedUserAccess(context)) {
|
|
131
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied };
|
|
132
|
+
}
|
|
133
|
+
if (privateKeyFormat && privateKeyFormat !== "" && privateKeyFormat.toLowerCase() !== "pem") {
|
|
134
|
+
errorLog("_updateCertificate: Invalid PEM format requested " + privateKeyFormat);
|
|
135
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInvalidArgument };
|
|
136
|
+
}
|
|
137
|
+
const pushCertificateManager = getPushCertificateManager(this);
|
|
138
|
+
if (!pushCertificateManager) {
|
|
139
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadNotImplemented };
|
|
140
|
+
}
|
|
141
|
+
const result = yield pushCertificateManager.updateCertificate(certificateGroupId, certificateTypeId, certificate, issuerCertificates, privateKeyFormat, privateKey);
|
|
142
|
+
// todo raise a CertificateUpdatedAuditEventType
|
|
143
|
+
if (result.statusCode !== node_opcua_status_code_1.StatusCodes.Good) {
|
|
144
|
+
return { statusCode: result.statusCode };
|
|
145
|
+
}
|
|
146
|
+
const callMethodResult = {
|
|
147
|
+
outputArguments: [
|
|
148
|
+
{
|
|
149
|
+
dataType: node_opcua_variant_1.DataType.Boolean,
|
|
150
|
+
value: !!result.applyChangesRequired
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
statusCode: result.statusCode
|
|
154
|
+
};
|
|
155
|
+
return callMethodResult;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function _getRejectedList(inputArguments, context) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
if (!hasEncryptedChannel(context)) {
|
|
161
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient };
|
|
162
|
+
}
|
|
163
|
+
if (!hasExpectedUserAccess(context)) {
|
|
164
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied };
|
|
165
|
+
}
|
|
166
|
+
const pushCertificateManager = getPushCertificateManager(this);
|
|
167
|
+
if (!pushCertificateManager) {
|
|
168
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadNotImplemented };
|
|
169
|
+
}
|
|
170
|
+
const result = yield pushCertificateManager.getRejectedList();
|
|
171
|
+
if (result.statusCode !== node_opcua_status_code_1.StatusCodes.Good) {
|
|
172
|
+
return { statusCode: result.statusCode };
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
outputArguments: [
|
|
176
|
+
{
|
|
177
|
+
arrayType: node_opcua_variant_1.VariantArrayType.Array,
|
|
178
|
+
dataType: node_opcua_variant_1.DataType.ByteString,
|
|
179
|
+
value: result.certificates
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Good
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function _applyChanges(inputArguments, context) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
// This Method requires an encrypted channel and that the Client provide credentials with
|
|
189
|
+
// administrative rights on the Server.
|
|
190
|
+
if (!hasEncryptedChannel(context)) {
|
|
191
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient };
|
|
192
|
+
}
|
|
193
|
+
if (!hasExpectedUserAccess(context)) {
|
|
194
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied };
|
|
195
|
+
}
|
|
196
|
+
const pushCertificateManager = getPushCertificateManager(this);
|
|
197
|
+
if (!pushCertificateManager) {
|
|
198
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadNotImplemented };
|
|
199
|
+
}
|
|
200
|
+
const statusCode = yield pushCertificateManager.applyChanges();
|
|
201
|
+
return { statusCode };
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
// in TrustList
|
|
205
|
+
function _addCertificate(inputArguments, context) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
console.log("_addCertificate");
|
|
208
|
+
if (!hasEncryptedChannel(context)) {
|
|
209
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient };
|
|
210
|
+
}
|
|
211
|
+
if (!hasExpectedUserAccess(context)) {
|
|
212
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied };
|
|
213
|
+
}
|
|
214
|
+
const trustList = context.object;
|
|
215
|
+
const cm = trustList.$$certificateManager || null;
|
|
216
|
+
if (!cm) {
|
|
217
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadInternalError };
|
|
218
|
+
}
|
|
219
|
+
const certificate = inputArguments[0].value;
|
|
220
|
+
const isTrustedCertificate = inputArguments[1].value;
|
|
221
|
+
if (isTrustedCertificate) {
|
|
222
|
+
yield cm.trustCertificate(certificate);
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
yield cm.addIssuer(certificate);
|
|
226
|
+
}
|
|
227
|
+
console.log("_addCertificate - done");
|
|
228
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.Good };
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function _removeCertificate(inputArguments, context) {
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
if (!hasEncryptedChannel(context)) {
|
|
234
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient };
|
|
235
|
+
}
|
|
236
|
+
if (!hasExpectedUserAccess(context)) {
|
|
237
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied };
|
|
238
|
+
}
|
|
239
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.Good };
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
let counter = 0;
|
|
243
|
+
function bindCertificateManager(addressSpace, options) {
|
|
244
|
+
const serverConfiguration = addressSpace.rootFolder.objects.server.serverConfiguration;
|
|
245
|
+
const defaultApplicationGroup = serverConfiguration.certificateGroups.getComponentByName("DefaultApplicationGroup");
|
|
246
|
+
if (defaultApplicationGroup) {
|
|
247
|
+
const trustList = defaultApplicationGroup.getComponentByName("TrustList");
|
|
248
|
+
if (trustList) {
|
|
249
|
+
trustList.$$certificateManager = options.applicationGroup;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const defaultTokenGroup = serverConfiguration.certificateGroups.getComponentByName("DefaultUserTokenGroup");
|
|
253
|
+
if (defaultTokenGroup) {
|
|
254
|
+
const trustList = defaultTokenGroup.getComponentByName("TrustList");
|
|
255
|
+
if (trustList) {
|
|
256
|
+
trustList.$$certificateManager = options.userTokenGroup;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function installPushCertificateManagement(addressSpace, options) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
const serverConfiguration = addressSpace.rootFolder.objects.server.serverConfiguration;
|
|
263
|
+
const serverConfigurationPriv = serverConfiguration;
|
|
264
|
+
if (serverConfigurationPriv.$pushCertificateManager) {
|
|
265
|
+
return;
|
|
266
|
+
throw new Error("PushCertificateManagement has already been installed");
|
|
267
|
+
}
|
|
268
|
+
serverConfigurationPriv.$pushCertificateManager = new push_certificate_manager_server_impl_1.PushCertificateManagerServerImpl(options);
|
|
269
|
+
serverConfiguration.supportedPrivateKeyFormats.setValueFromSource({
|
|
270
|
+
arrayType: node_opcua_variant_1.VariantArrayType.Array,
|
|
271
|
+
dataType: node_opcua_variant_1.DataType.String,
|
|
272
|
+
value: ["PEM"]
|
|
273
|
+
});
|
|
274
|
+
serverConfiguration.createSigningRequest.bindMethod(util_1.callbackify(_createSigningRequest));
|
|
275
|
+
serverConfiguration.updateCertificate.bindMethod(util_1.callbackify(_updateCertificate));
|
|
276
|
+
serverConfiguration.getRejectedList.bindMethod(util_1.callbackify(_getRejectedList));
|
|
277
|
+
if (serverConfiguration.applyChanges) {
|
|
278
|
+
serverConfiguration.applyChanges.bindMethod(util_1.callbackify(_applyChanges));
|
|
279
|
+
}
|
|
280
|
+
install_CertificateAlarm_1.installCertificateExpirationAlarm(addressSpace);
|
|
281
|
+
function _closeAndUpdate(inputArguments, context) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
return { statusCode: node_opcua_status_code_1.StatusCodes.Good };
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function promoteCertificateGroup(certificateGroup) {
|
|
287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
+
const trustList = certificateGroup.getChildByName("TrustList");
|
|
289
|
+
if (trustList) {
|
|
290
|
+
const filename = "/tmpFile" + counter;
|
|
291
|
+
counter += 1;
|
|
292
|
+
node_opcua_file_transfer_1.installFileType(trustList, { filename, fileSystem: memfs_1.fs });
|
|
293
|
+
const closeAndUpdate = trustList.getChildByName("CloseAndUpdate");
|
|
294
|
+
closeAndUpdate === null || closeAndUpdate === void 0 ? void 0 : closeAndUpdate.bindMethod(util_1.callbackify(_closeAndUpdate));
|
|
295
|
+
// change open methos
|
|
296
|
+
const open = trustList.getChildByName("Open");
|
|
297
|
+
const _asyncExecutionFunction = open._asyncExecutionFunction;
|
|
298
|
+
open.bindMethod(function (inputArgs, context, callback) {
|
|
299
|
+
//
|
|
300
|
+
const certificateMangaer = trustList.$$certificateManager || undefined;
|
|
301
|
+
if (certificateMangaer) {
|
|
302
|
+
trust_list_server_1.writeTrustList(memfs_1.fs, filename, certificateMangaer).then(() => {
|
|
303
|
+
_asyncExecutionFunction.call(this, inputArgs, context, callback);
|
|
304
|
+
}).catch((err) => {
|
|
305
|
+
callback(err);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
console.log("do something to update the document before we open it");
|
|
310
|
+
return _asyncExecutionFunction.call(this, inputArgs, context, callback);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
const addCertificate = trustList.getChildByName("AddCertificate");
|
|
314
|
+
addCertificate.bindMethod(util_1.callbackify(_addCertificate));
|
|
315
|
+
const removeCertificate = trustList.getChildByName("RemoveCertificate");
|
|
316
|
+
removeCertificate.bindMethod(util_1.callbackify(_removeCertificate));
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
const cg = serverConfiguration.certificateGroups.getComponents();
|
|
321
|
+
for (const certificateGroup of cg) {
|
|
322
|
+
if (certificateGroup.nodeClass !== node_opcua_data_model_1.NodeClass.Object) {
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
yield promoteCertificateGroup(certificateGroup);
|
|
326
|
+
}
|
|
327
|
+
yield bindCertificateManager(addressSpace, options);
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
exports.installPushCertificateManagement = installPushCertificateManagement;
|
|
331
|
+
//# sourceMappingURL=push_certificate_manager_helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push_certificate_manager_helpers.js","sourceRoot":"","sources":["../source/push_certificate_manager_helpers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAEH,+BAAmC;AAEnC,uEAA8H;AAC9H,uDAAiE;AAEjE,mEAAqD;AAErD,2DAAyE;AACzE,iEAAkD;AAIlD,gFAE2C;AAC3C,wGAGuD;AAEvD,uEAAuE;AAEvE,kEAA4D;AAC5D,iCAAoC;AAGpC,MAAM,QAAQ,GAAG,gCAAa,CAAC,qBAAqB,CAAC,CAAC;AACtD,MAAM,OAAO,GAAG,iCAAc,CAAC,qBAAqB,CAAC,CAAC;AACtD,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B,SAAS,qBAAqB,CAAC,OAAuB;IAClD,IAAI,CAAC,OAAO;QACR,CAAC,OAAO,CAAC,OAAO;QAChB,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE;QACpC,OAAO,KAAK,CAAC;KAChB;IACD,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IACrD,OAAO,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,yCAAc,CAAC,aAAa,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAuB;IAChD,OAAO;IACP,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,QAAQ,CACb,OAA4B,EAC5B,QAAkB,EAClB,gBAAkC;IAElC,IAAI,CAAC,OAAO,EAAE;QACV,OAAO,KAAK,CAAC;KAChB;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAC/B,OAAO,KAAK,CAAC;KAChB;IACD,IAAI,OAAO,CAAC,SAAS,KAAK,gBAAgB,EAAE;QACxC,OAAO,KAAK,CAAC;KAChB;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAgB;IAE/C,MAAM,mBAAmB,GAAG,MAAM,CA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I,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;4BACrE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gCACb,QAAQ,CAAC,GAAG,CAAC,CAAC;4BAClB,CAAC,CAAC,CAAA;yBACL;6BAAM;4BACH,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAA;4BACpE,OAAO,uBAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;yBAC3E;oBACL,CAAC,CAAC,CAAA;oBAEF,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC,gBAAgB,CAAa,CAAC;oBAC9E,cAAc,CAAC,UAAU,CAAC,kBAAW,CAAC,eAAe,CAAC,CAAC,CAAC;oBACxD,MAAM,iBAAiB,GAAG,SAAS,CAAC,cAAc,CAAC,mBAAmB,CAAa,CAAC;oBACpF,iBAAiB,CAAC,UAAU,CAAC,kBAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;iBAGjE;YACL,CAAC;SAAA;QACD,MAAM,EAAE,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;QACjE,KAAK,MAAM,gBAAgB,IAAI,EAAE,EAAE;YAC/B,IAAI,gBAAgB,CAAC,SAAS,KAAK,iCAAS,CAAC,MAAM,EAAE;gBACjD,SAAS;aACZ;YACD,MAAM,uBAAuB,CAAC,gBAA4B,CAAC,CAAC;SAC/D;QACD,MAAM,sBAAsB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CAAA;AAtFD,4EAsFC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-server-configuration-server
|
|
3
|
-
*/
|
|
4
|
-
import { AddressSpace } from "node-opcua-address-space";
|
|
5
|
-
export declare function installCertificateExpirationAlarm(addressSpace: AddressSpace): void;
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-server-configuration-server
|
|
3
|
+
*/
|
|
4
|
+
import { AddressSpace } from "node-opcua-address-space";
|
|
5
|
+
export declare function installCertificateExpirationAlarm(addressSpace: AddressSpace): void;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installCertificateExpirationAlarm = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-server-configuration-server
|
|
6
|
-
*/
|
|
7
|
-
const node_opcua_address_space_1 = require("node-opcua-address-space");
|
|
8
|
-
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
9
|
-
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
10
|
-
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
11
|
-
const debugLog = (0, node_opcua_debug_1.make_debugLog)("ServerConfiguration");
|
|
12
|
-
const errorLog = (0, node_opcua_debug_1.make_errorLog)("ServerConfiguration");
|
|
13
|
-
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)("ServerConfiguration");
|
|
14
|
-
function installCertificateExpirationAlarm(addressSpace) {
|
|
15
|
-
var _a;
|
|
16
|
-
debugLog("installCertificateExpirationAlarm");
|
|
17
|
-
const server = addressSpace.rootFolder.objects.server;
|
|
18
|
-
const namespace = addressSpace.getOwnNamespace();
|
|
19
|
-
const certificateExpirationAlarmType = addressSpace.findEventType("CertificateExpirationAlarmType");
|
|
20
|
-
const options = {
|
|
21
|
-
browseName: "ServerCertificateAlarm",
|
|
22
|
-
conditionSource: null,
|
|
23
|
-
eventSourceOf: server,
|
|
24
|
-
inputNode: new node_opcua_nodeid_1.NodeId(),
|
|
25
|
-
normalState: new node_opcua_nodeid_1.NodeId()
|
|
26
|
-
};
|
|
27
|
-
const data = {};
|
|
28
|
-
const alarm = node_opcua_address_space_1.UACertificateExpirationAlarmImpl.instantiate(namespace, options, data);
|
|
29
|
-
// const alarm = namespace.instantiateOffNormalAlarm({) as UACertificateExpirationAlarm;
|
|
30
|
-
alarm.currentBranch().setRetain(true);
|
|
31
|
-
alarm.activeState.setValue(false);
|
|
32
|
-
alarm.ackedState.setValue(false);
|
|
33
|
-
(_a = alarm.suppressedState) === null || _a === void 0 ? void 0 : _a.setValue(false);
|
|
34
|
-
alarm.certificate.setValueFromSource({ dataType: node_opcua_variant_1.DataType.ByteString, value: null });
|
|
35
|
-
alarm.eventId.setValueFromSource({ dataType: node_opcua_variant_1.DataType.ByteString, value: null });
|
|
36
|
-
}
|
|
37
|
-
exports.installCertificateExpirationAlarm = installCertificateExpirationAlarm;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.installCertificateExpirationAlarm = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module node-opcua-server-configuration-server
|
|
6
|
+
*/
|
|
7
|
+
const node_opcua_address_space_1 = require("node-opcua-address-space");
|
|
8
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
9
|
+
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
10
|
+
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
11
|
+
const debugLog = (0, node_opcua_debug_1.make_debugLog)("ServerConfiguration");
|
|
12
|
+
const errorLog = (0, node_opcua_debug_1.make_errorLog)("ServerConfiguration");
|
|
13
|
+
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)("ServerConfiguration");
|
|
14
|
+
function installCertificateExpirationAlarm(addressSpace) {
|
|
15
|
+
var _a;
|
|
16
|
+
debugLog("installCertificateExpirationAlarm");
|
|
17
|
+
const server = addressSpace.rootFolder.objects.server;
|
|
18
|
+
const namespace = addressSpace.getOwnNamespace();
|
|
19
|
+
const certificateExpirationAlarmType = addressSpace.findEventType("CertificateExpirationAlarmType");
|
|
20
|
+
const options = {
|
|
21
|
+
browseName: "ServerCertificateAlarm",
|
|
22
|
+
conditionSource: null,
|
|
23
|
+
eventSourceOf: server,
|
|
24
|
+
inputNode: new node_opcua_nodeid_1.NodeId(),
|
|
25
|
+
normalState: new node_opcua_nodeid_1.NodeId()
|
|
26
|
+
};
|
|
27
|
+
const data = {};
|
|
28
|
+
const alarm = node_opcua_address_space_1.UACertificateExpirationAlarmImpl.instantiate(namespace, options, data);
|
|
29
|
+
// const alarm = namespace.instantiateOffNormalAlarm({) as UACertificateExpirationAlarm;
|
|
30
|
+
alarm.currentBranch().setRetain(true);
|
|
31
|
+
alarm.activeState.setValue(false);
|
|
32
|
+
alarm.ackedState.setValue(false);
|
|
33
|
+
(_a = alarm.suppressedState) === null || _a === void 0 ? void 0 : _a.setValue(false);
|
|
34
|
+
alarm.certificate.setValueFromSource({ dataType: node_opcua_variant_1.DataType.ByteString, value: null });
|
|
35
|
+
alarm.eventId.setValueFromSource({ dataType: node_opcua_variant_1.DataType.ByteString, value: null });
|
|
36
|
+
}
|
|
37
|
+
exports.installCertificateExpirationAlarm = installCertificateExpirationAlarm;
|
|
38
38
|
//# sourceMappingURL=install_CertificateAlarm.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { OPCUACertificateManager } from "node-opcua-certificate-manager";
|
|
2
|
-
import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
|
|
3
|
-
import { ICertificateKeyPairProvider } from "node-opcua-secure-channel";
|
|
4
|
-
import { OPCUAServer } from "node-opcua-server";
|
|
5
|
-
import { ApplicationDescriptionOptions } from "node-opcua-types";
|
|
6
|
-
export interface OPCUAServerPartial extends ICertificateKeyPairProvider {
|
|
7
|
-
serverInfo?: ApplicationDescriptionOptions;
|
|
8
|
-
serverCertificateManager: OPCUACertificateManager;
|
|
9
|
-
privateKeyFile: string;
|
|
10
|
-
certificateFile: string;
|
|
11
|
-
$$privateKeyPEM: PrivateKeyPEM;
|
|
12
|
-
$$certificate?: Certificate;
|
|
13
|
-
$$certificateChain: Certificate;
|
|
14
|
-
}
|
|
15
|
-
export declare function installPushCertificateManagementOnServer(server: OPCUAServer): Promise<void>;
|
|
1
|
+
import { OPCUACertificateManager } from "node-opcua-certificate-manager";
|
|
2
|
+
import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
|
|
3
|
+
import { ICertificateKeyPairProvider } from "node-opcua-secure-channel";
|
|
4
|
+
import { OPCUAServer } from "node-opcua-server";
|
|
5
|
+
import { ApplicationDescriptionOptions } from "node-opcua-types";
|
|
6
|
+
export interface OPCUAServerPartial extends ICertificateKeyPairProvider {
|
|
7
|
+
serverInfo?: ApplicationDescriptionOptions;
|
|
8
|
+
serverCertificateManager: OPCUACertificateManager;
|
|
9
|
+
privateKeyFile: string;
|
|
10
|
+
certificateFile: string;
|
|
11
|
+
$$privateKeyPEM: PrivateKeyPEM;
|
|
12
|
+
$$certificate?: Certificate;
|
|
13
|
+
$$certificateChain: Certificate;
|
|
14
|
+
}
|
|
15
|
+
export declare function installPushCertificateManagementOnServer(server: OPCUAServer): Promise<void>;
|