@device-management-toolkit/wsman-messages 5.15.0 → 6.0.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/WSMan.d.ts +1 -1
- package/WSMan.js +307 -310
- package/WSMan.js.map +1 -1
- package/amt/actions.js +4 -7
- package/amt/actions.js.map +1 -1
- package/amt/classes.js +2 -5
- package/amt/classes.js.map +1 -1
- package/amt/index.d.ts +6 -6
- package/amt/index.js +5 -12
- package/amt/index.js.map +1 -1
- package/amt/messages.d.ts +6 -6
- package/amt/messages.js +722 -806
- package/amt/messages.js.map +1 -1
- package/amt/methods.js +2 -5
- package/amt/methods.js.map +1 -1
- package/amt/models.d.ts +2 -2
- package/amt/models.js +1 -2
- package/amt/models.js.map +1 -1
- package/amt/types.js +1 -2
- package/amt/types.js.map +1 -1
- package/cim/actions.js +2 -5
- package/cim/actions.js.map +1 -1
- package/cim/classes.js +2 -5
- package/cim/classes.js.map +1 -1
- package/cim/index.d.ts +6 -6
- package/cim/index.js +5 -11
- package/cim/index.js.map +1 -1
- package/cim/messages.d.ts +4 -4
- package/cim/messages.js +152 -224
- package/cim/messages.js.map +1 -1
- package/cim/methods.js +2 -5
- package/cim/methods.js.map +1 -1
- package/cim/models.d.ts +2 -2
- package/cim/models.js +1 -2
- package/cim/models.js.map +1 -1
- package/cim/types.js +1 -2
- package/cim/types.js.map +1 -1
- package/dist +12 -11
- package/index.d.ts +4 -4
- package/index.js +5 -44
- package/index.js.map +1 -1
- package/ips/actions.js +2 -5
- package/ips/actions.js.map +1 -1
- package/ips/classes.js +2 -5
- package/ips/classes.js.map +1 -1
- package/ips/index.d.ts +6 -6
- package/ips/index.js +5 -11
- package/ips/index.js.map +1 -1
- package/ips/messages.d.ts +4 -4
- package/ips/messages.js +217 -253
- package/ips/messages.js.map +1 -1
- package/ips/methods.js +2 -5
- package/ips/methods.js.map +1 -1
- package/ips/models.d.ts +2 -2
- package/ips/models.js +1 -2
- package/ips/models.js.map +1 -1
- package/ips/types.js +1 -2
- package/ips/types.js.map +1 -1
- package/models/common.js +45 -2
- package/models/common.js.map +1 -1
- package/models/index.d.ts +1 -1
- package/models/index.js +2 -38
- package/models/index.js.map +1 -1
- package/package.json +12 -11
- package/amt/messages.test.d.ts +0 -5
- package/amt/messages.test.js +0 -1116
- package/amt/messages.test.js.map +0 -1
- package/cim/messages.test.d.ts +0 -5
- package/cim/messages.test.js +0 -442
- package/cim/messages.test.js.map +0 -1
- package/ips/messages.test.d.ts +0 -5
- package/ips/messages.test.js +0 -296
- package/ips/messages.test.js.map +0 -1
- package/wsman.test.d.ts +0 -5
- package/wsman.test.js +0 -479
- package/wsman.test.js.map +0 -1
package/amt/messages.js
CHANGED
|
@@ -1,845 +1,761 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*********************************************************************
|
|
3
2
|
* Copyright (c) Intel Corporation 2021
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
**********************************************************************/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* @param alarmClockService An instance of AlarmClockService
|
|
41
|
-
* @returns string
|
|
42
|
-
*/
|
|
43
|
-
this.Put = (alarmClockService) => this.protectedPut(alarmClockService, false);
|
|
44
|
-
}
|
|
5
|
+
import { CIM } from '../index.js';
|
|
6
|
+
import { Base, BaseActions, WSManErrors, WSManMessageCreator } from '../WSMan.js';
|
|
7
|
+
import { Classes, Actions, Methods } from './index.js';
|
|
8
|
+
class AlarmClockService extends Base {
|
|
9
|
+
className = Classes.ALARM_CLOCK_SERVICE;
|
|
10
|
+
/**
|
|
11
|
+
* This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
|
|
12
|
+
* @param alarmClockOccurrence IPS.Models.AlarmClockOccurrence Object
|
|
13
|
+
* @returns string
|
|
14
|
+
*/
|
|
15
|
+
AddAlarm = (alarmClockOccurrence) => {
|
|
16
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_ALARM, this.className);
|
|
17
|
+
// toIsoString() is adding milliseconds... remove them by taking everything before the '.' and adding back the 'Z'
|
|
18
|
+
const startTime = alarmClockOccurrence.StartTime.toISOString().split('.')[0] + 'Z';
|
|
19
|
+
let body = `<Body><p:AddAlarm_INPUT xmlns:p="${this.wsmanMessageCreator.resourceUriBase}AMT_AlarmClockService"><p:AlarmTemplate><s:InstanceID xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.InstanceID}</s:InstanceID>`;
|
|
20
|
+
if (alarmClockOccurrence.ElementName != null) {
|
|
21
|
+
body += `<s:ElementName xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.ElementName}</s:ElementName>`;
|
|
22
|
+
}
|
|
23
|
+
body += `<s:StartTime xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">${startTime}</p:Datetime></s:StartTime>`;
|
|
24
|
+
if (alarmClockOccurrence.Interval != null) {
|
|
25
|
+
const minutes = alarmClockOccurrence.Interval % 60;
|
|
26
|
+
const hours = Math.floor(alarmClockOccurrence.Interval / 60) % 24;
|
|
27
|
+
const days = Math.floor(alarmClockOccurrence.Interval / 1440);
|
|
28
|
+
body += `<s:Interval xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">P${days}DT${hours}H${minutes}M</p:Interval></s:Interval>`;
|
|
29
|
+
}
|
|
30
|
+
body += `<s:DeleteOnCompletion xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${String(alarmClockOccurrence.DeleteOnCompletion)}</s:DeleteOnCompletion></p:AlarmTemplate></p:AddAlarm_INPUT></Body>`;
|
|
31
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Changes properties of the selected instance
|
|
35
|
+
* @param alarmClockService An instance of AlarmClockService
|
|
36
|
+
* @returns string
|
|
37
|
+
*/
|
|
38
|
+
Put = (alarmClockService) => this.protectedPut(alarmClockService, false);
|
|
45
39
|
}
|
|
46
|
-
class AuditLog extends
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
40
|
+
class AuditLog extends Base {
|
|
41
|
+
className = Classes.AUDIT_LOG;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a list of consecutive audit log records in chronological order: The first record in the returned array is the oldest record stored in the log. The record entries are returned as an array of base64Binary elements.
|
|
44
|
+
* @param startIndex Identifies the position of the first record to retrieve. An index of 1 indicates the first record in the log. If startIndex isn't provided, defaults to 1.
|
|
45
|
+
* @returns string
|
|
46
|
+
*/
|
|
47
|
+
ReadRecords = (startIndex) => {
|
|
48
|
+
if (startIndex === undefined) {
|
|
49
|
+
startIndex = 1;
|
|
50
|
+
}
|
|
51
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.READ_RECORDS, this.className);
|
|
52
|
+
const body = this.wsmanMessageCreator.createBody('ReadRecords_INPUT', this.className, [{ StartIndex: startIndex }]);
|
|
53
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
54
|
+
};
|
|
64
55
|
}
|
|
65
|
-
class AuthorizationService extends
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
56
|
+
class AuthorizationService extends Base {
|
|
57
|
+
className = Classes.AUTHORIZATION_SERVICE;
|
|
58
|
+
/**
|
|
59
|
+
* Adds a user entry to the Intel(R) AMT device.
|
|
60
|
+
* @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
|
|
61
|
+
* @param realms Array of interface names the ACL entry is allowed to access.
|
|
62
|
+
* @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
|
|
63
|
+
* @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
|
|
64
|
+
* @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
|
|
65
|
+
* @returns string
|
|
66
|
+
*/
|
|
67
|
+
AddUserAclEntryEx = (accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
|
|
68
|
+
if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
|
|
69
|
+
throw new Error(WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
|
|
70
|
+
}
|
|
71
|
+
if (digestUsername && digestUsername.length > 16) {
|
|
72
|
+
throw new Error(WSManErrors.USERNAME_TOO_LONG);
|
|
73
|
+
}
|
|
74
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_USER_ACL_ENTRY_EX, this.className);
|
|
75
|
+
const aclObject = {
|
|
76
|
+
DigestUsername: digestUsername,
|
|
77
|
+
DigestPassword: digestPassword,
|
|
78
|
+
KerberosUserSid: kerberosUserSid,
|
|
79
|
+
AccessPermission: accessPermission,
|
|
80
|
+
Realms: realms
|
|
81
|
+
};
|
|
82
|
+
const body = this.wsmanMessageCreator.createBody('AddUserAclEntryEx_INPUT', this.className, [aclObject]);
|
|
83
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Enumerates entries in the User Access Control List (ACL). Only 50 handles can be returned, so in order to get others startIndex should be bigger than 1.
|
|
87
|
+
* @param startIndex Indicates the first ACL entry to retrieve. if startIndex isn't provided, it will be set to 1
|
|
88
|
+
* @returns string
|
|
89
|
+
*/
|
|
90
|
+
EnumerateUserAclEntries = (startIndex) => {
|
|
91
|
+
if (!startIndex)
|
|
92
|
+
startIndex = 1;
|
|
93
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ENUMERATE_USER_ACL_ENTRIES, this.className);
|
|
94
|
+
const body = this.wsmanMessageCreator.createBody('EnumerateUserAclEntries_INPUT', this.className, [
|
|
95
|
+
{ StartIndex: startIndex }
|
|
96
|
+
]);
|
|
97
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Gets the state of a user ACL entry (enabled/disabled)
|
|
101
|
+
* @param handle Specifies the ACL entry
|
|
102
|
+
* @returns string
|
|
103
|
+
*/
|
|
104
|
+
GetAclEnabledState = (handle) => {
|
|
105
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_ACL_ENABLED_STATE, this.className);
|
|
106
|
+
const body = this.wsmanMessageCreator.createBody('GetAclEnabledState_INPUT', this.className, [
|
|
107
|
+
{ Handle: handle }
|
|
108
|
+
]);
|
|
109
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Returns the username attribute of the Admin ACL.
|
|
113
|
+
* @returns string
|
|
114
|
+
*/
|
|
115
|
+
GetAdminAclEntry = () => {
|
|
116
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_ADMIN_ACL_ENTRY, this.className);
|
|
117
|
+
const body = this.wsmanMessageCreator.createBody('GetAdminAclEntry_INPUT', this.className, [{}]);
|
|
118
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Reads the Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
|
|
122
|
+
* @returns string
|
|
123
|
+
*/
|
|
124
|
+
GetAdminAclEntryStatus = () => {
|
|
125
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_ADMIN_ACL_ENTRY_STATUS, this.className);
|
|
126
|
+
const body = this.wsmanMessageCreator.createBody('GetAdminAclEntryStatus_INPUT', this.className, [{}]);
|
|
127
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Reads the remote Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the remote admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
|
|
131
|
+
* @returns string
|
|
132
|
+
*/
|
|
133
|
+
GetAdminNetAclEntryStatus = () => {
|
|
134
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_ADMIN_NET_ACL_ENTRY_STATUS, this.className);
|
|
135
|
+
const body = this.wsmanMessageCreator.createBody('GetAdminNetAclEntryStatus_INPUT', this.className, [{}]);
|
|
136
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Reads a user entry from the Intel(R) AMT device. Note: confidential information, such as password (hash) is omitted or zeroed in the response.
|
|
140
|
+
* @param handle Specifies the ACL entry to fetch.
|
|
141
|
+
* @returns string
|
|
142
|
+
*/
|
|
143
|
+
GetUserAclEntryEx = (handle) => {
|
|
144
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_USER_ACL_ENTRY_EX, this.className);
|
|
145
|
+
const body = this.wsmanMessageCreator.createBody('GetUserAclEntryEx_INPUT', this.className, [
|
|
146
|
+
{ Handle: handle }
|
|
147
|
+
]);
|
|
148
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Removes an entry from the User Access Control List (ACL), given a handle.
|
|
152
|
+
* @param handle Specifies the ACL entry to be removed.
|
|
153
|
+
* @returns string
|
|
154
|
+
*/
|
|
155
|
+
RemoveUserAclEntry = (handle) => {
|
|
156
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.REMOVE_USER_ACL_ENTRY, this.className);
|
|
157
|
+
const body = this.wsmanMessageCreator.createBody('RemoveUserAclEntry_INPUT', this.className, [
|
|
158
|
+
{ Handle: handle }
|
|
159
|
+
]);
|
|
160
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Enables or disables a user ACL entry.Disabling ACL entries is useful when accounts that cannot be removed (system accounts - starting with $$) are required to be disabled.
|
|
164
|
+
* @param handle Specifies the ACL entry to update
|
|
165
|
+
* @param enabled Specifies the state of the ACL entry
|
|
166
|
+
* @returns string
|
|
167
|
+
*/
|
|
168
|
+
SetAclEnabledState = (handle, enabled) => {
|
|
169
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.SET_ACL_ENABLED_STATE, this.className);
|
|
170
|
+
const body = this.wsmanMessageCreator.createBody('SetAclEnabledState_INPUT', this.className, [
|
|
171
|
+
{ Handle: handle, Enabled: enabled }
|
|
172
|
+
]);
|
|
173
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Updates an Admin entry in the Intel(R) AMT device.
|
|
177
|
+
* @param username Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
|
|
178
|
+
* @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings.
|
|
179
|
+
* @returns string
|
|
180
|
+
*/
|
|
181
|
+
SetAdminACLEntryEx = (username, digestPassword) => {
|
|
182
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.SET_ADMIN_ACL_ENTRY_EX, this.className);
|
|
183
|
+
const body = this.wsmanMessageCreator.createBody('SetAdminAclEntryEx_INPUT', this.className, [
|
|
184
|
+
{
|
|
185
|
+
Username: username,
|
|
186
|
+
DigestPassword: digestPassword
|
|
84
187
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
this.
|
|
116
|
-
|
|
117
|
-
const body = this.wsmanMessageCreator.createBody('GetAclEnabledState_INPUT', this.className, [
|
|
118
|
-
{ Handle: handle }
|
|
119
|
-
]);
|
|
120
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* Returns the username attribute of the Admin ACL.
|
|
124
|
-
* @returns string
|
|
125
|
-
*/
|
|
126
|
-
this.GetAdminAclEntry = () => {
|
|
127
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_ACL_ENTRY, this.className);
|
|
128
|
-
const body = this.wsmanMessageCreator.createBody('GetAdminAclEntry_INPUT', this.className, [{}]);
|
|
129
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Reads the Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
|
|
133
|
-
* @returns string
|
|
134
|
-
*/
|
|
135
|
-
this.GetAdminAclEntryStatus = () => {
|
|
136
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_ACL_ENTRY_STATUS, this.className);
|
|
137
|
-
const body = this.wsmanMessageCreator.createBody('GetAdminAclEntryStatus_INPUT', this.className, [{}]);
|
|
138
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* Reads the remote Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the remote admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
|
|
142
|
-
* @returns string
|
|
143
|
-
*/
|
|
144
|
-
this.GetAdminNetAclEntryStatus = () => {
|
|
145
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_NET_ACL_ENTRY_STATUS, this.className);
|
|
146
|
-
const body = this.wsmanMessageCreator.createBody('GetAdminNetAclEntryStatus_INPUT', this.className, [{}]);
|
|
147
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Reads a user entry from the Intel(R) AMT device. Note: confidential information, such as password (hash) is omitted or zeroed in the response.
|
|
151
|
-
* @param handle Specifies the ACL entry to fetch.
|
|
152
|
-
* @returns string
|
|
153
|
-
*/
|
|
154
|
-
this.GetUserAclEntryEx = (handle) => {
|
|
155
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_USER_ACL_ENTRY_EX, this.className);
|
|
156
|
-
const body = this.wsmanMessageCreator.createBody('GetUserAclEntryEx_INPUT', this.className, [
|
|
157
|
-
{ Handle: handle }
|
|
158
|
-
]);
|
|
159
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* Removes an entry from the User Access Control List (ACL), given a handle.
|
|
163
|
-
* @param handle Specifies the ACL entry to be removed.
|
|
164
|
-
* @returns string
|
|
165
|
-
*/
|
|
166
|
-
this.RemoveUserAclEntry = (handle) => {
|
|
167
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.REMOVE_USER_ACL_ENTRY, this.className);
|
|
168
|
-
const body = this.wsmanMessageCreator.createBody('RemoveUserAclEntry_INPUT', this.className, [
|
|
169
|
-
{ Handle: handle }
|
|
170
|
-
]);
|
|
171
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* Enables or disables a user ACL entry.Disabling ACL entries is useful when accounts that cannot be removed (system accounts - starting with $$) are required to be disabled.
|
|
175
|
-
* @param handle Specifies the ACL entry to update
|
|
176
|
-
* @param enabled Specifies the state of the ACL entry
|
|
177
|
-
* @returns string
|
|
178
|
-
*/
|
|
179
|
-
this.SetAclEnabledState = (handle, enabled) => {
|
|
180
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_ACL_ENABLED_STATE, this.className);
|
|
181
|
-
const body = this.wsmanMessageCreator.createBody('SetAclEnabledState_INPUT', this.className, [
|
|
182
|
-
{ Handle: handle, Enabled: enabled }
|
|
183
|
-
]);
|
|
184
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* Updates an Admin entry in the Intel(R) AMT device.
|
|
188
|
-
* @param username Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
|
|
189
|
-
* @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings.
|
|
190
|
-
* @returns string
|
|
191
|
-
*/
|
|
192
|
-
this.SetAdminACLEntryEx = (username, digestPassword) => {
|
|
193
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_ADMIN_ACL_ENTRY_EX, this.className);
|
|
194
|
-
const body = this.wsmanMessageCreator.createBody('SetAdminAclEntryEx_INPUT', this.className, [
|
|
195
|
-
{
|
|
196
|
-
Username: username,
|
|
197
|
-
DigestPassword: digestPassword
|
|
198
|
-
}
|
|
199
|
-
]);
|
|
200
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
201
|
-
};
|
|
202
|
-
/**
|
|
203
|
-
* Updates a user entry in the Intel(R) AMT device.
|
|
204
|
-
* @param handle Creation handle to a User ACL entry.
|
|
205
|
-
* @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
|
|
206
|
-
* @param realms Array of interface names the ACL entry is allowed to access.
|
|
207
|
-
* @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
|
|
208
|
-
* @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
|
|
209
|
-
* @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
|
|
210
|
-
* @returns string
|
|
211
|
-
*/
|
|
212
|
-
this.UpdateUserAclEntryEx = (handle, accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
|
|
213
|
-
if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
|
|
214
|
-
throw new Error(WSMan_1.WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
|
|
215
|
-
}
|
|
216
|
-
if (digestUsername && digestUsername.length > 16) {
|
|
217
|
-
throw new Error(WSMan_1.WSManErrors.USERNAME_TOO_LONG);
|
|
218
|
-
}
|
|
219
|
-
const header = this.wsmanMessageCreator.createHeader(_1.Actions.UPDATE_USER_ACL_ENTRY_EX, this.className);
|
|
220
|
-
const aclObject = {
|
|
221
|
-
Handle: handle,
|
|
222
|
-
DigestUsername: digestUsername,
|
|
223
|
-
DigestPassword: digestPassword,
|
|
224
|
-
KerberosUserSid: kerberosUserSid,
|
|
225
|
-
AccessPermission: accessPermission,
|
|
226
|
-
Realms: realms
|
|
227
|
-
};
|
|
228
|
-
const body = this.wsmanMessageCreator.createBody('UpdateUserAclEntryEx_INPUT', this.className, [aclObject]);
|
|
229
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
230
|
-
};
|
|
231
|
-
}
|
|
188
|
+
]);
|
|
189
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Updates a user entry in the Intel(R) AMT device.
|
|
193
|
+
* @param handle Creation handle to a User ACL entry.
|
|
194
|
+
* @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
|
|
195
|
+
* @param realms Array of interface names the ACL entry is allowed to access.
|
|
196
|
+
* @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
|
|
197
|
+
* @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
|
|
198
|
+
* @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
|
|
199
|
+
* @returns string
|
|
200
|
+
*/
|
|
201
|
+
UpdateUserAclEntryEx = (handle, accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
|
|
202
|
+
if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
|
|
203
|
+
throw new Error(WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
|
|
204
|
+
}
|
|
205
|
+
if (digestUsername && digestUsername.length > 16) {
|
|
206
|
+
throw new Error(WSManErrors.USERNAME_TOO_LONG);
|
|
207
|
+
}
|
|
208
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.UPDATE_USER_ACL_ENTRY_EX, this.className);
|
|
209
|
+
const aclObject = {
|
|
210
|
+
Handle: handle,
|
|
211
|
+
DigestUsername: digestUsername,
|
|
212
|
+
DigestPassword: digestPassword,
|
|
213
|
+
KerberosUserSid: kerberosUserSid,
|
|
214
|
+
AccessPermission: accessPermission,
|
|
215
|
+
Realms: realms
|
|
216
|
+
};
|
|
217
|
+
const body = this.wsmanMessageCreator.createBody('UpdateUserAclEntryEx_INPUT', this.className, [aclObject]);
|
|
218
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
219
|
+
};
|
|
232
220
|
}
|
|
233
|
-
class BootCapabilities extends
|
|
234
|
-
|
|
235
|
-
super(...arguments);
|
|
236
|
-
this.className = _1.Classes.BOOT_CAPABILITIES;
|
|
237
|
-
}
|
|
221
|
+
class BootCapabilities extends Base {
|
|
222
|
+
className = Classes.BOOT_CAPABILITIES;
|
|
238
223
|
}
|
|
239
|
-
class BootSettingData extends
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
*/
|
|
248
|
-
this.Put = (bootSettingData) => this.protectedPut(bootSettingData, false);
|
|
249
|
-
}
|
|
224
|
+
class BootSettingData extends Base {
|
|
225
|
+
className = Classes.BOOT_SETTING_DATA;
|
|
226
|
+
/**
|
|
227
|
+
* Changes properties of BootSettingData.
|
|
228
|
+
* @param bootSettingData BootSettingData Object.
|
|
229
|
+
* @returns string
|
|
230
|
+
*/
|
|
231
|
+
Put = (bootSettingData) => this.protectedPut(bootSettingData, false);
|
|
250
232
|
}
|
|
251
|
-
class EnvironmentDetectionSettingData extends
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
*/
|
|
260
|
-
this.Put = (environmentDetectionSettingData) => this.protectedPut(environmentDetectionSettingData, true);
|
|
261
|
-
}
|
|
233
|
+
class EnvironmentDetectionSettingData extends Base {
|
|
234
|
+
className = Classes.ENVIRONMENT_DETECTION_SETTING_DATA;
|
|
235
|
+
/**
|
|
236
|
+
* Changes properties of EnvironmentDetectionSettingData.
|
|
237
|
+
* @param environmentDetectionSettingData EnvironmentDetectionSettingData Object.
|
|
238
|
+
* @returns string
|
|
239
|
+
*/
|
|
240
|
+
Put = (environmentDetectionSettingData) => this.protectedPut(environmentDetectionSettingData, true);
|
|
262
241
|
}
|
|
263
|
-
class EthernetPortSettings extends
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
288
|
-
};
|
|
289
|
-
}
|
|
242
|
+
class EthernetPortSettings extends Base {
|
|
243
|
+
className = Classes.ETHERNET_PORT_SETTINGS;
|
|
244
|
+
/**
|
|
245
|
+
* Changes properties of the EthernetPortSettings.
|
|
246
|
+
* @param ethernetPortObject EthernetPortSettings Object.
|
|
247
|
+
* @returns string
|
|
248
|
+
*/
|
|
249
|
+
Put = (ethernetPortObject) => this.protectedPut(ethernetPortObject, true);
|
|
250
|
+
/**
|
|
251
|
+
* Sets link preference with timeout.
|
|
252
|
+
* @param linkPreference 1 = ME | 2 = HOST
|
|
253
|
+
* @param timeout Timeout in seconds before preference expires.
|
|
254
|
+
* @param instanceID The InstanceID selector for the specific Ethernet port (e.g., "Intel(r) AMT Ethernet Port Settings 1")
|
|
255
|
+
* @returns string
|
|
256
|
+
*/
|
|
257
|
+
SetLinkPreference = (linkPreference, timeout, instanceID = 'Intel(r) AMT Ethernet Port Settings 1') => {
|
|
258
|
+
const selector = { name: 'InstanceID', value: instanceID };
|
|
259
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.SET_LINK_PREFERENCE, this.className, selector);
|
|
260
|
+
const body = this.wsmanMessageCreator.createBody('SetLinkPreference_INPUT', this.className, [
|
|
261
|
+
{ LinkPreference: linkPreference },
|
|
262
|
+
{ Timeout: timeout }
|
|
263
|
+
]);
|
|
264
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
265
|
+
};
|
|
290
266
|
}
|
|
291
|
-
class GeneralSettings extends
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
*/
|
|
300
|
-
this.Put = (generalSettings) => this.protectedPut(generalSettings, false);
|
|
301
|
-
}
|
|
267
|
+
class GeneralSettings extends Base {
|
|
268
|
+
className = Classes.GENERAL_SETTINGS;
|
|
269
|
+
/**
|
|
270
|
+
* Changes properties of GeneralSettings.
|
|
271
|
+
* @param generalSettings GeneralSettings Object.
|
|
272
|
+
* @returns string
|
|
273
|
+
*/
|
|
274
|
+
Put = (generalSettings) => this.protectedPut(generalSettings, false);
|
|
302
275
|
}
|
|
303
|
-
class IEEE8021xCredentialContext extends
|
|
304
|
-
|
|
305
|
-
super(...arguments);
|
|
306
|
-
this.className = _1.Classes.IEEE8021X_CREDENTIAL_CONTEXT;
|
|
307
|
-
}
|
|
276
|
+
class IEEE8021xCredentialContext extends Base {
|
|
277
|
+
className = Classes.IEEE8021X_CREDENTIAL_CONTEXT;
|
|
308
278
|
}
|
|
309
|
-
class IEEE8021xProfile extends
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
*/
|
|
318
|
-
this.Put = (ieee8021xProfile) => this.protectedPut(ieee8021xProfile, false);
|
|
319
|
-
}
|
|
279
|
+
class IEEE8021xProfile extends Base {
|
|
280
|
+
className = Classes.IEEE8021X_PROFILE;
|
|
281
|
+
/**
|
|
282
|
+
* Changes properties of IEEE8021xProfile
|
|
283
|
+
* @param ieee8021xProfile IEEE8021xProfile Object
|
|
284
|
+
* @returns string
|
|
285
|
+
*/
|
|
286
|
+
Put = (ieee8021xProfile) => this.protectedPut(ieee8021xProfile, false);
|
|
320
287
|
}
|
|
321
|
-
class KerberosSettingData extends
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
this.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
343
|
-
};
|
|
344
|
-
}
|
|
288
|
+
class KerberosSettingData extends Base {
|
|
289
|
+
className = Classes.KERBEROS_SETTING_DATA;
|
|
290
|
+
/**
|
|
291
|
+
* Gets the current state of the credential caching functionality
|
|
292
|
+
* @returns string
|
|
293
|
+
*/
|
|
294
|
+
GetCredentialCacheState = () => {
|
|
295
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_CREDENTIAL_CACHE_STATE, this.className);
|
|
296
|
+
const body = this.wsmanMessageCreator.createBody('GetCredentialCacheState_INPUT', this.className);
|
|
297
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Enables/disables the credential caching functionality
|
|
301
|
+
* @param enabled New state of the functionality
|
|
302
|
+
* @returns string
|
|
303
|
+
*/
|
|
304
|
+
SetCredentialCacheState = (enabled) => {
|
|
305
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.SET_CREDENTIAL_CACHE_STATE, this.className);
|
|
306
|
+
const body = this.wsmanMessageCreator.createBody('SetCredentialCacheState_INPUT', this.className, [enabled]);
|
|
307
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
308
|
+
};
|
|
345
309
|
}
|
|
346
|
-
class ManagementPresenceRemoteSAP extends
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
this.Delete = (selector) => this.protectedDelete(selector);
|
|
356
|
-
}
|
|
310
|
+
class ManagementPresenceRemoteSAP extends Base {
|
|
311
|
+
className = Classes.MANAGEMENT_PRESENCE_REMOTE_SAP;
|
|
312
|
+
/**
|
|
313
|
+
* Deletes an instance
|
|
314
|
+
* @param selector indicates the instance
|
|
315
|
+
* @returns string
|
|
316
|
+
*/
|
|
317
|
+
Delete = (selector) => this.protectedDelete(selector);
|
|
357
318
|
}
|
|
358
|
-
class MessageLog extends
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
385
|
-
};
|
|
386
|
-
}
|
|
319
|
+
class MessageLog extends Base {
|
|
320
|
+
className = Classes.MESSAGE_LOG;
|
|
321
|
+
/**
|
|
322
|
+
* Retrieves multiple records from MessageLog.
|
|
323
|
+
* @param identifier the IterationIdentifier input parameter is a numeric value (starting at 1) which is the position of the first record in the log that should be extracted. If identifier isn't provided, defaults to 1.
|
|
324
|
+
* @returns string
|
|
325
|
+
*/
|
|
326
|
+
GetRecords = (identifier) => {
|
|
327
|
+
if (identifier === undefined) {
|
|
328
|
+
identifier = 1;
|
|
329
|
+
}
|
|
330
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_RECORDS, this.className);
|
|
331
|
+
const body = this.wsmanMessageCreator.createBody('GetRecords_INPUT', this.className, [
|
|
332
|
+
{ IterationIdentifier: identifier, MaxReadRecords: 390 }
|
|
333
|
+
]);
|
|
334
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Requests that an iteration of the MessageLog be established and that the iterator be set to the first entry in the Log. An identifier for the iterator is returned as an output parameter of the method.
|
|
338
|
+
* @returns string
|
|
339
|
+
*/
|
|
340
|
+
PositionToFirstRecord = () => {
|
|
341
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.POSITION_TO_FIRST_RECORD, this.className);
|
|
342
|
+
const body = `<Body><h:PositionToFirstRecord_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${this.className}" /></Body>`;
|
|
343
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
344
|
+
};
|
|
387
345
|
}
|
|
388
|
-
class MPSUsernamePassword extends
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
*/
|
|
397
|
-
this.Put = (mpsUsernamePassword) => this.protectedPut(mpsUsernamePassword, false);
|
|
398
|
-
}
|
|
346
|
+
class MPSUsernamePassword extends Base {
|
|
347
|
+
className = Classes.MPS_USERNAME_PASSWORD;
|
|
348
|
+
/**
|
|
349
|
+
* Changes properties of MPSUsernamePassword.
|
|
350
|
+
* @param mpsUsernamePassword MPSUsernamePassword Object.
|
|
351
|
+
* @returns string
|
|
352
|
+
*/
|
|
353
|
+
Put = (mpsUsernamePassword) => this.protectedPut(mpsUsernamePassword, false);
|
|
399
354
|
}
|
|
400
|
-
class PublicKeyCertificate extends
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
*/
|
|
415
|
-
this.Put = (publicKeyCertificate) => this.protectedPut(publicKeyCertificate, false);
|
|
416
|
-
}
|
|
355
|
+
class PublicKeyCertificate extends Base {
|
|
356
|
+
className = Classes.PUBLIC_KEY_CERTIFICATE;
|
|
357
|
+
/**
|
|
358
|
+
* Deletes an instance
|
|
359
|
+
* @param selector indicates the instance
|
|
360
|
+
* @returns string
|
|
361
|
+
*/
|
|
362
|
+
Delete = (selector) => this.protectedDelete(selector);
|
|
363
|
+
/**
|
|
364
|
+
* Changes properties of PublicKeyCertificate.
|
|
365
|
+
* @param publicKeyCertificate Public Key Certificate object
|
|
366
|
+
* @returns string
|
|
367
|
+
*/
|
|
368
|
+
Put = (publicKeyCertificate) => this.protectedPut(publicKeyCertificate, false);
|
|
417
369
|
}
|
|
418
|
-
class PublicKeyManagementService extends
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
this.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
this.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
this.
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
476
|
-
};
|
|
477
|
-
}
|
|
370
|
+
class PublicKeyManagementService extends Base {
|
|
371
|
+
className = Classes.PUBLIC_KEY_MANAGEMENT_SERVICE;
|
|
372
|
+
/**
|
|
373
|
+
* This method adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
374
|
+
* @param addCertificate AddCertificate Object
|
|
375
|
+
* @returns string
|
|
376
|
+
*/
|
|
377
|
+
AddCertificate = (addCertificate) => {
|
|
378
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_CERTIFICATE, this.className);
|
|
379
|
+
const body = this.wsmanMessageCreator.createBody('AddCertificate_INPUT', this.className, [addCertificate]);
|
|
380
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS or 802.1X).
|
|
384
|
+
* @param keyBlob RSA Key encoded as DES PKCS#1
|
|
385
|
+
* @returns string
|
|
386
|
+
*/
|
|
387
|
+
AddKey = (keyBlob) => {
|
|
388
|
+
const keyObj = {
|
|
389
|
+
KeyBlob: keyBlob
|
|
390
|
+
};
|
|
391
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_KEY, this.className);
|
|
392
|
+
const body = this.wsmanMessageCreator.createBody('AddKey_INPUT', this.className, [keyObj]);
|
|
393
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* This method adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
397
|
+
* @param addCertificate AddCertificate Object
|
|
398
|
+
* @returns string
|
|
399
|
+
*/
|
|
400
|
+
AddTrustedRootCertificate = (addCertificate) => {
|
|
401
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_TRUSTED_ROOT_CERTIFICATE, this.className);
|
|
402
|
+
const body = this.wsmanMessageCreator.createBody('AddTrustedRootCertificate_INPUT', this.className, [
|
|
403
|
+
addCertificate
|
|
404
|
+
]);
|
|
405
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* This method is used to generate a key in the FW.
|
|
409
|
+
* @param keyPairParameters KeyPairParameters Object
|
|
410
|
+
* @returns string
|
|
411
|
+
*/
|
|
412
|
+
GenerateKeyPair = (keyPairParameters) => {
|
|
413
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GENERATE_KEY_PAIR, this.className);
|
|
414
|
+
const body = this.wsmanMessageCreator.createBody('GenerateKeyPair_INPUT', this.className, [keyPairParameters]);
|
|
415
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* This method is used to create a PKCS#10 certificate signing request based on a key from the key store.
|
|
419
|
+
* @param pkcs10Request PKCS10Request Object
|
|
420
|
+
* @returns string
|
|
421
|
+
*/
|
|
422
|
+
GeneratePKCS10RequestEx = (pkcs10Request) => {
|
|
423
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GENERATE_PKCS10_REQUEST_EX, this.className);
|
|
424
|
+
const body = this.wsmanMessageCreator.createBody('GeneratePKCS10RequestEx_INPUT', this.className, [pkcs10Request]);
|
|
425
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
426
|
+
};
|
|
478
427
|
}
|
|
479
|
-
class PublicPrivateKeyPair extends
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
*/
|
|
487
|
-
this.Delete = (selector) => this.protectedDelete(selector);
|
|
488
|
-
}
|
|
428
|
+
class PublicPrivateKeyPair extends Base {
|
|
429
|
+
className = Classes.PUBLIC_PRIVATE_KEY_PAIR; /**
|
|
430
|
+
* Deletes an instance
|
|
431
|
+
* @param selector indicates the instance
|
|
432
|
+
* @returns string
|
|
433
|
+
*/
|
|
434
|
+
Delete = (selector) => this.protectedDelete(selector);
|
|
489
435
|
}
|
|
490
|
-
class RedirectionService extends
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
*/
|
|
506
|
-
this.RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
|
|
507
|
-
}
|
|
436
|
+
class RedirectionService extends Base {
|
|
437
|
+
className = Classes.REDIRECTION_SERVICE;
|
|
438
|
+
/**
|
|
439
|
+
* Changes properties of RedirectionService.
|
|
440
|
+
* @param redirectionService RedirectionService Object.
|
|
441
|
+
* @returns string
|
|
442
|
+
*/
|
|
443
|
+
Put = (redirectionService) => this.protectedPut(redirectionService, false);
|
|
444
|
+
/**
|
|
445
|
+
* Requests that the state of the element be changed to the value specified in the RequestedState parameter. The supported values in requestedState are 32768-32771.
|
|
446
|
+
* @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
|
|
447
|
+
* @value_map 32768 = disable IDER and SOL, 32769 = enable IDER and disable SOL, 32770 = enable SOL and disable IDER, 32771 = enable IDER and SOL
|
|
448
|
+
* @returns string
|
|
449
|
+
*/
|
|
450
|
+
RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
|
|
508
451
|
}
|
|
509
|
-
class RemoteAccessPolicyAppliesToMPS extends
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
*/
|
|
530
|
-
this.Put = (remoteAccessPolicyAppliesToMPS) => this.protectedPut(remoteAccessPolicyAppliesToMPS, false);
|
|
531
|
-
}
|
|
452
|
+
class RemoteAccessPolicyAppliesToMPS extends Base {
|
|
453
|
+
className = Classes.REMOTE_ACCESS_POLICY_APPLIES_TO_MPS;
|
|
454
|
+
/**
|
|
455
|
+
* Deletes an instance
|
|
456
|
+
* @param selector indicates the instance
|
|
457
|
+
* @returns string
|
|
458
|
+
*/
|
|
459
|
+
Delete = (selector) => this.protectedDelete(selector);
|
|
460
|
+
/**
|
|
461
|
+
* Creates an instance of RemoteAccessPolicyAppliesToMPS
|
|
462
|
+
* @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object
|
|
463
|
+
* @returns string
|
|
464
|
+
*/
|
|
465
|
+
Create = (remoteAccessPolicyAppliesToMPS) => this.protectedCreate(remoteAccessPolicyAppliesToMPS);
|
|
466
|
+
/**
|
|
467
|
+
* Changes properties of RemoteAccessPolicyAppliesToMPS.
|
|
468
|
+
* @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object.
|
|
469
|
+
* @returns string
|
|
470
|
+
*/
|
|
471
|
+
Put = (remoteAccessPolicyAppliesToMPS) => this.protectedPut(remoteAccessPolicyAppliesToMPS, false);
|
|
532
472
|
}
|
|
533
|
-
class RemoteAccessPolicyRule extends
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
*/
|
|
548
|
-
this.Put = (remoteAccessPolicyRule) => this.protectedPut(remoteAccessPolicyRule, false);
|
|
549
|
-
}
|
|
473
|
+
class RemoteAccessPolicyRule extends Base {
|
|
474
|
+
className = Classes.REMOTE_ACCESS_POLICY_RULE;
|
|
475
|
+
/**
|
|
476
|
+
* Deletes an instance
|
|
477
|
+
* @param selector indicates the instance
|
|
478
|
+
* @returns string
|
|
479
|
+
*/
|
|
480
|
+
Delete = (selector) => this.protectedDelete(selector);
|
|
481
|
+
/**
|
|
482
|
+
* Changes properties of RemoteAccessPolicyRule
|
|
483
|
+
* @param remoteAccessPolicyRule Remote Access Policy Rule object
|
|
484
|
+
* @returns string
|
|
485
|
+
*/
|
|
486
|
+
Put = (remoteAccessPolicyRule) => this.protectedPut(remoteAccessPolicyRule, false);
|
|
550
487
|
}
|
|
551
|
-
class RemoteAccessService extends
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
this.
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
575
|
-
};
|
|
576
|
-
}
|
|
488
|
+
class RemoteAccessService extends Base {
|
|
489
|
+
className = Classes.REMOTE_ACCESS_SERVICE;
|
|
490
|
+
/**
|
|
491
|
+
* Requires mpServer. Adds a Management Presence Server to the Intel(R) AMT subsystem. Creates an AMT_ManagementPresenceRemoteSAP instance and an AMT_RemoteAccessCredentialContext association to a credential. This credential may be an existing AMT_PublicKeyCertificate instance (if the created MPS is configured to use mutual authentication). If the created MpServer is configured to use username password authentication, an AMT_MPSUsernamePassword instance is created and used as the associated credential.
|
|
492
|
+
* @param mpServer MPServer Object.
|
|
493
|
+
* @returns string
|
|
494
|
+
*/
|
|
495
|
+
AddMPS = (mpServer) => {
|
|
496
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_MPS, Classes.REMOTE_ACCESS_SERVICE);
|
|
497
|
+
const body = `<Body><h:AddMpServer_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:AccessInfo>${mpServer.AccessInfo}</h:AccessInfo><h:InfoFormat>${mpServer.InfoFormat}</h:InfoFormat><h:Port>${mpServer.Port}</h:Port><h:AuthMethod>${mpServer.AuthMethod}</h:AuthMethod><h:Username>${mpServer.Username}</h:Username><h:Password>${mpServer.Password}</h:Password><h:CN>${mpServer.CommonName}</h:CN></h:AddMpServer_INPUT></Body>`;
|
|
498
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Requires remoteAccessPolicyRule and selector. Adds a Remote Access policy to the Intel(R) AMT subsystem. The policy defines an event that will trigger an establishment of a tunnel between AMT and a pre-configured MPS. Creates an AMT_RemoteAccessPolicyRule instance and associates it to a given list of AMT_ManagementPresenceRemoteSAP instances with AMT_PolicySetAppliesToElement association instances.
|
|
502
|
+
* @param remoteAccessPolicyRule RemoteAccessPolicyRule Object.
|
|
503
|
+
* @param selector Selector Object.
|
|
504
|
+
* @returns string
|
|
505
|
+
*/
|
|
506
|
+
AddRemoteAccessPolicyRule = (remoteAccessPolicyRule, selector) => {
|
|
507
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_REMOTE_ACCESS_POLICY_RULE, Classes.REMOTE_ACCESS_SERVICE);
|
|
508
|
+
const body = `<Body><h:AddRemoteAccessPolicyRule_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:Trigger>${remoteAccessPolicyRule.Trigger}</h:Trigger><h:TunnelLifeTime>${remoteAccessPolicyRule.TunnelLifeTime}</h:TunnelLifeTime><h:ExtendedData>${remoteAccessPolicyRule.ExtendedData}</h:ExtendedData><h:MpServer><Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">${this.wsmanMessageCreator.resourceUriBase}AMT_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="${selector.name}">${selector.value}</Selector></SelectorSet></ReferenceParameters></h:MpServer></h:AddRemoteAccessPolicyRule_INPUT></Body>`;
|
|
509
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
510
|
+
};
|
|
577
511
|
}
|
|
578
|
-
class SetupAndConfigurationService extends
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
*/
|
|
634
|
-
this.Put = (setupAndConfigurationService) => this.protectedPut(setupAndConfigurationService, false);
|
|
635
|
-
}
|
|
512
|
+
class SetupAndConfigurationService extends Base {
|
|
513
|
+
className = Classes.SETUP_AND_CONFIGURATION_SERVICE;
|
|
514
|
+
/**
|
|
515
|
+
* Commits pending configuration commands made to the Intel(R) AMT device. Completes configuration when in "IN-provisioning" state.
|
|
516
|
+
* @returns string
|
|
517
|
+
*/
|
|
518
|
+
CommitChanges = () => {
|
|
519
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.COMMIT_CHANGES, Classes.SETUP_AND_CONFIGURATION_SERVICE);
|
|
520
|
+
const body = this.wsmanMessageCreator.createBody('CommitChanges_INPUT', Classes.SETUP_AND_CONFIGURATION_SERVICE, [
|
|
521
|
+
{}
|
|
522
|
+
]);
|
|
523
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Pulls instances of SetupAndConfigurationService, following an Enumerate operation.
|
|
527
|
+
* @param enumerationContext string returned from an Enumerate call.
|
|
528
|
+
* @returns string
|
|
529
|
+
*/
|
|
530
|
+
GetUuid = () => {
|
|
531
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_UUID, Classes.SETUP_AND_CONFIGURATION_SERVICE);
|
|
532
|
+
const body = this.wsmanMessageCreator.createBody('GetUuid_INPUT', Classes.SETUP_AND_CONFIGURATION_SERVICE);
|
|
533
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* Requires password. This method sets the ME Bios extension password. It allows a remote caller to change the ME access password for the BIOS extension screen. This call succeeds depending on the password policy rule defined in MEBx (BIOS extension):"Default Password Only" - Method succeeds only when the current password is still the default value and only in PKI provisioning. "During Setup and Configuration" - Method succeeds only during provisioning, regardless of provisioning method or previous password value."ANYTIME" - Method will always succeed. (i.e. even when configured).
|
|
537
|
+
* @param password Password needs to be strong: Contain at least one of: upper-case, lower-case, digit and special character.
|
|
538
|
+
* @remarks Min Length = 8
|
|
539
|
+
* @remarks Max Length = 32
|
|
540
|
+
* @returns string
|
|
541
|
+
*/
|
|
542
|
+
SetMEBXPassword = (password) => {
|
|
543
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.SET_MEBX_PASSWORD, Classes.SETUP_AND_CONFIGURATION_SERVICE);
|
|
544
|
+
const body = `<Body><h:SetMEBxPassword_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:Password>${password}</h:Password></h:SetMEBxPassword_INPUT></Body>`;
|
|
545
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* Resets the Intel(R) AMT device to default factory settings. The device will need to be re-provisioned after this command.
|
|
549
|
+
* @param provisioningMode Indicates the provisioning mode (Enterprise , Small Business or Remote Connectivity) the device will enter following successful completion of the command. Starting from Release 6.0 only effective value is ProvisioningModeEnterprise
|
|
550
|
+
* @value_map 0 = ProvisioningModeCurrent, 1 = ProvisioningModeEnterprise, 2 = ProvisioningModeSmallBusiness, 3 = ProvisioningRemoteConnectivity
|
|
551
|
+
* @returns string
|
|
552
|
+
*/
|
|
553
|
+
Unprovision = (provisioningMode) => {
|
|
554
|
+
if (provisioningMode === undefined) {
|
|
555
|
+
provisioningMode = 1;
|
|
556
|
+
}
|
|
557
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.UNPROVISION, Classes.SETUP_AND_CONFIGURATION_SERVICE);
|
|
558
|
+
const body = `<Body><h:Unprovision_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:ProvisioningMode>${provisioningMode}</h:ProvisioningMode></h:Unprovision_INPUT></Body>`;
|
|
559
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* Changes properties of Setup and Configuration Service
|
|
563
|
+
* @param setupAndConfigurationService SetupAndConfigurationService object
|
|
564
|
+
* @returns string
|
|
565
|
+
*/
|
|
566
|
+
Put = (setupAndConfigurationService) => this.protectedPut(setupAndConfigurationService, false);
|
|
636
567
|
}
|
|
637
|
-
class TimeSynchronizationService extends
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
667
|
-
};
|
|
668
|
-
}
|
|
568
|
+
class TimeSynchronizationService extends Base {
|
|
569
|
+
className = Classes.TIME_SYNCHRONIZATION_SERVICE;
|
|
570
|
+
/**
|
|
571
|
+
* Requires ta0, tm1, tm2. This method is used to synchronize the Intel(R) AMT device's internal clock with an external clock.
|
|
572
|
+
* @param ta0 The time value received from invoking GetLowAccuracyTimeSynch().
|
|
573
|
+
* @param tm1 The remote client timestamp after getting a response from GetLowAccuracyTimeSynch().
|
|
574
|
+
* @param tm2 The remote client timestamp obtained immediately prior to invoking this method.
|
|
575
|
+
* @returns string
|
|
576
|
+
*/
|
|
577
|
+
SetHighAccuracyTimeSynch = (ta0, tm1, tm2) => {
|
|
578
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.SET_HIGH_ACCURACY_TIME_SYNCH, Classes.TIME_SYNCHRONIZATION_SERVICE);
|
|
579
|
+
const body = this.wsmanMessageCreator.createBody('SetHighAccuracyTimeSynch_INPUT', Classes.TIME_SYNCHRONIZATION_SERVICE, [
|
|
580
|
+
{
|
|
581
|
+
Ta0: ta0,
|
|
582
|
+
Tm1: tm1,
|
|
583
|
+
Tm2: tm2
|
|
584
|
+
}
|
|
585
|
+
]);
|
|
586
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
587
|
+
};
|
|
588
|
+
/**
|
|
589
|
+
* This method is used for reading the Intel(R) AMT device's internal clock.
|
|
590
|
+
* @returns string
|
|
591
|
+
*/
|
|
592
|
+
GetLowAccuracyTimeSynch = () => {
|
|
593
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.GET_LOW_ACCURACY_TIME_SYNCH, Classes.TIME_SYNCHRONIZATION_SERVICE);
|
|
594
|
+
const body = this.wsmanMessageCreator.createBody('GetLowAccuracyTimeSynch_INPUT', Classes.TIME_SYNCHRONIZATION_SERVICE);
|
|
595
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
596
|
+
};
|
|
669
597
|
}
|
|
670
|
-
class TLSCredentialContext extends
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
this.
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
return this.wsmanMessageCreator.createXml(header, body);
|
|
701
|
-
};
|
|
702
|
-
}
|
|
598
|
+
class TLSCredentialContext extends Base {
|
|
599
|
+
className = Classes.TLS_CREDENTIAL_CONTEXT;
|
|
600
|
+
/**
|
|
601
|
+
* Deletes an instance
|
|
602
|
+
* @param selector indicates the instance
|
|
603
|
+
* @returns string
|
|
604
|
+
*/
|
|
605
|
+
Delete = (selector) => this.protectedDelete(selector);
|
|
606
|
+
/**
|
|
607
|
+
* Requires tlsCredentialContext. Creates a new instance of TLSCredentialContext.
|
|
608
|
+
* @param tlsCredentialContext TLSCredentialContext Object.
|
|
609
|
+
* @returns string
|
|
610
|
+
*/
|
|
611
|
+
// TLS Credential Context object is highly complex and needs to use createBody function
|
|
612
|
+
Create = (certHandle) => {
|
|
613
|
+
const header = this.wsmanMessageCreator.createHeader(BaseActions.CREATE, Classes.TLS_CREDENTIAL_CONTEXT);
|
|
614
|
+
// const body = this.wsmanMessageCreator.createBody('AMT_TLSCredentialContext', Classes.TLS_CREDENTIAL_CONTEXT, tlsCredentialContext)
|
|
615
|
+
const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
|
|
616
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
617
|
+
};
|
|
618
|
+
/**
|
|
619
|
+
* Updates an instance of TLSCredentialContext.
|
|
620
|
+
* @param certHandle Certificate handle.
|
|
621
|
+
* @returns string
|
|
622
|
+
*/
|
|
623
|
+
Put = (certHandle) => {
|
|
624
|
+
const header = this.wsmanMessageCreator.createHeader(BaseActions.PUT, Classes.TLS_CREDENTIAL_CONTEXT);
|
|
625
|
+
const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
|
|
626
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
627
|
+
};
|
|
703
628
|
}
|
|
704
|
-
class TLSSettingData extends
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
*/
|
|
713
|
-
this.Put = (tlsSettingData) => this.protectedPut(tlsSettingData, true, { name: 'InstanceID', value: tlsSettingData.InstanceID });
|
|
714
|
-
}
|
|
629
|
+
class TLSSettingData extends Base {
|
|
630
|
+
className = Classes.TLS_SETTING_DATA;
|
|
631
|
+
/**
|
|
632
|
+
* Changes properties of TLSSettingData.
|
|
633
|
+
* @param tlsSettingData TLSSettingData Object.
|
|
634
|
+
* @returns string
|
|
635
|
+
*/
|
|
636
|
+
Put = (tlsSettingData) => this.protectedPut(tlsSettingData, true, { name: 'InstanceID', value: tlsSettingData.InstanceID });
|
|
715
637
|
}
|
|
716
|
-
class UserInitiatedConnectionService extends
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
*/
|
|
726
|
-
this.RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
|
|
727
|
-
}
|
|
638
|
+
class UserInitiatedConnectionService extends Base {
|
|
639
|
+
className = Classes.USER_INITIATED_CONNECTION_SERVICE;
|
|
640
|
+
/**
|
|
641
|
+
* Requires requestedState. Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
|
|
642
|
+
* @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
|
|
643
|
+
* @value_map 32768 = All Interfaces disabled, 32769 = BIOS Interface enabled, 32770 = OS Interface enabled, 32771 = BIOS and OS Interfaces enabled
|
|
644
|
+
* @returns string
|
|
645
|
+
*/
|
|
646
|
+
RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
|
|
728
647
|
}
|
|
729
|
-
class WiFiPortConfigurationService extends
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
648
|
+
class WiFiPortConfigurationService extends Base {
|
|
649
|
+
className = Classes.WIFI_PORT_CONFIGURATION_SERVICE;
|
|
650
|
+
/**
|
|
651
|
+
* Atomically creates an instance of CIM_WifiEndpointSettings from the embedded instance parameter and optionally an instance of CIM_IEEE8021xSettings from the embedded instance parameter (if provided), associates the CIM_WiFiEndpointSettings instance with the referenced instance of CIM_WiFiEndpoint using an instance of CIM_ElementSettingData optionally associates the newly created or referenced by parameter instance of CIM_IEEE8021xSettings with the instance of CIM_WiFiEndpointSettings using an instance of CIM_ConcreteComponent and optionally associates the referenced instance of AMT_PublicKeyCertificate (if provided) with the instance of CIM_IEEE8021xSettings (if provided) using an instance of CIM_CredentialContext.
|
|
652
|
+
* @param wifiEndpointSettings WiFiEndpointSettings Object
|
|
653
|
+
* @param selector Selector Object.
|
|
654
|
+
* @returns string
|
|
655
|
+
*/
|
|
656
|
+
AddWiFiSettings = (wifiEndpointSettings, selector, ieee8021xSettingsInput, clientCredential, caCredential) => {
|
|
657
|
+
const header = this.wsmanMessageCreator.createHeader(Actions.ADD_WIFI_SETTINGS, Classes.WIFI_PORT_CONFIGURATION_SERVICE);
|
|
658
|
+
const dataArray = [];
|
|
659
|
+
const wifiEndpointObject = {
|
|
660
|
+
WiFiEndpoint: {
|
|
661
|
+
Address: '/wsman',
|
|
662
|
+
ReferenceParameters: {
|
|
663
|
+
ResourceURI: `http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${CIM.Classes.WIFI_ENDPOINT}`,
|
|
664
|
+
SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody(selector)
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
dataArray.push(wifiEndpointObject);
|
|
669
|
+
if (wifiEndpointSettings) {
|
|
670
|
+
// HANDLE SPECIAL CHARACTERS FOR XML
|
|
671
|
+
wifiEndpointSettings.PSKPassPhrase = wifiEndpointSettings.PSKPassPhrase?.replace(/&/g, '&')
|
|
672
|
+
.replace(/</g, '<')
|
|
673
|
+
.replace(/>/g, '>')
|
|
674
|
+
.replace(/"/g, '"')
|
|
675
|
+
.replace(/'/g, ''');
|
|
676
|
+
const wifiEndpointSettingInputObject = {
|
|
677
|
+
WiFiEndpointSettingsInput: wifiEndpointSettings,
|
|
678
|
+
namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_WiFiEndpointSettings'
|
|
679
|
+
};
|
|
680
|
+
dataArray.push(wifiEndpointSettingInputObject);
|
|
681
|
+
}
|
|
682
|
+
if (ieee8021xSettingsInput) {
|
|
683
|
+
const ieee8021xSettingsInputObject = {
|
|
684
|
+
IEEE8021xSettingsInput: ieee8021xSettingsInput,
|
|
685
|
+
namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_IEEE8021xSettings'
|
|
686
|
+
};
|
|
687
|
+
dataArray.push(ieee8021xSettingsInputObject);
|
|
688
|
+
}
|
|
689
|
+
if (clientCredential) {
|
|
690
|
+
const clientCredentialObject = {
|
|
691
|
+
ClientCredential: {
|
|
692
|
+
Address: 'default',
|
|
746
693
|
ReferenceParameters: {
|
|
747
|
-
ResourceURI:
|
|
748
|
-
SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody(
|
|
694
|
+
ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
|
|
695
|
+
SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
|
|
696
|
+
name: 'InstanceID',
|
|
697
|
+
value: clientCredential
|
|
698
|
+
})
|
|
749
699
|
}
|
|
750
700
|
}
|
|
751
701
|
};
|
|
752
|
-
dataArray.push(
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
IEEE8021xSettingsInput: ieee8021xSettingsInput,
|
|
765
|
-
namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_IEEE8021xSettings'
|
|
766
|
-
};
|
|
767
|
-
dataArray.push(ieee8021xSettingsInputObject);
|
|
768
|
-
}
|
|
769
|
-
if (clientCredential) {
|
|
770
|
-
const clientCredentialObject = {
|
|
771
|
-
ClientCredential: {
|
|
772
|
-
Address: 'default',
|
|
773
|
-
ReferenceParameters: {
|
|
774
|
-
ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
|
|
775
|
-
SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
|
|
776
|
-
name: 'InstanceID',
|
|
777
|
-
value: clientCredential
|
|
778
|
-
})
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
dataArray.push(clientCredentialObject);
|
|
783
|
-
}
|
|
784
|
-
if (caCredential) {
|
|
785
|
-
const caCredentialObject = {
|
|
786
|
-
CACredential: {
|
|
787
|
-
Address: 'default',
|
|
788
|
-
ReferenceParameters: {
|
|
789
|
-
ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
|
|
790
|
-
SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
|
|
791
|
-
name: 'InstanceID',
|
|
792
|
-
value: caCredential
|
|
793
|
-
})
|
|
794
|
-
}
|
|
702
|
+
dataArray.push(clientCredentialObject);
|
|
703
|
+
}
|
|
704
|
+
if (caCredential) {
|
|
705
|
+
const caCredentialObject = {
|
|
706
|
+
CACredential: {
|
|
707
|
+
Address: 'default',
|
|
708
|
+
ReferenceParameters: {
|
|
709
|
+
ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
|
|
710
|
+
SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
|
|
711
|
+
name: 'InstanceID',
|
|
712
|
+
value: caCredential
|
|
713
|
+
})
|
|
795
714
|
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
dataArray.push(caCredentialObject);
|
|
718
|
+
}
|
|
719
|
+
const body = this.wsmanMessageCreator.createBody(Methods.ADD_WIFI_SETTINGS + '_INPUT', Classes.WIFI_PORT_CONFIGURATION_SERVICE, dataArray);
|
|
720
|
+
return this.wsmanMessageCreator.createXml(header, body);
|
|
721
|
+
};
|
|
722
|
+
/**
|
|
723
|
+
* Changes properties of WiFiEndpointSettings
|
|
724
|
+
* @param wifiEndpointSettings WiFiEndpointSettings Object
|
|
725
|
+
* @param selector Selector Object.
|
|
726
|
+
* @returns string
|
|
727
|
+
*/
|
|
728
|
+
Put = (wifiEndpointSettings, selector) => this.protectedPut(wifiEndpointSettings, true, selector);
|
|
810
729
|
}
|
|
811
|
-
class Messages {
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
this.WiFiPortConfigurationService = new WiFiPortConfigurationService(this.wsmanMessageCreator);
|
|
842
|
-
}
|
|
730
|
+
export class Messages {
|
|
731
|
+
resourceUriBase = 'http://intel.com/wbem/wscim/1/amt-schema/1/';
|
|
732
|
+
wsmanMessageCreator = new WSManMessageCreator(this.resourceUriBase);
|
|
733
|
+
AlarmClockService = new AlarmClockService(this.wsmanMessageCreator);
|
|
734
|
+
AuditLog = new AuditLog(this.wsmanMessageCreator);
|
|
735
|
+
AuthorizationService = new AuthorizationService(this.wsmanMessageCreator);
|
|
736
|
+
BootCapabilities = new BootCapabilities(this.wsmanMessageCreator);
|
|
737
|
+
BootSettingData = new BootSettingData(this.wsmanMessageCreator);
|
|
738
|
+
EnvironmentDetectionSettingData = new EnvironmentDetectionSettingData(this.wsmanMessageCreator);
|
|
739
|
+
EthernetPortSettings = new EthernetPortSettings(this.wsmanMessageCreator);
|
|
740
|
+
GeneralSettings = new GeneralSettings(this.wsmanMessageCreator);
|
|
741
|
+
IEEE8021xCredentialContext = new IEEE8021xCredentialContext(this.wsmanMessageCreator);
|
|
742
|
+
IEEE8021xProfile = new IEEE8021xProfile(this.wsmanMessageCreator);
|
|
743
|
+
KerberosSettingData = new KerberosSettingData(this.wsmanMessageCreator);
|
|
744
|
+
ManagementPresenceRemoteSAP = new ManagementPresenceRemoteSAP(this.wsmanMessageCreator);
|
|
745
|
+
MessageLog = new MessageLog(this.wsmanMessageCreator);
|
|
746
|
+
MPSUsernamePassword = new MPSUsernamePassword(this.wsmanMessageCreator);
|
|
747
|
+
PublicKeyCertificate = new PublicKeyCertificate(this.wsmanMessageCreator);
|
|
748
|
+
PublicKeyManagementService = new PublicKeyManagementService(this.wsmanMessageCreator);
|
|
749
|
+
PublicPrivateKeyPair = new PublicPrivateKeyPair(this.wsmanMessageCreator);
|
|
750
|
+
RedirectionService = new RedirectionService(this.wsmanMessageCreator);
|
|
751
|
+
RemoteAccessPolicyAppliesToMPS = new RemoteAccessPolicyAppliesToMPS(this.wsmanMessageCreator);
|
|
752
|
+
RemoteAccessPolicyRule = new RemoteAccessPolicyRule(this.wsmanMessageCreator);
|
|
753
|
+
RemoteAccessService = new RemoteAccessService(this.wsmanMessageCreator);
|
|
754
|
+
SetupAndConfigurationService = new SetupAndConfigurationService(this.wsmanMessageCreator);
|
|
755
|
+
TimeSynchronizationService = new TimeSynchronizationService(this.wsmanMessageCreator);
|
|
756
|
+
TLSCredentialContext = new TLSCredentialContext(this.wsmanMessageCreator);
|
|
757
|
+
TLSSettingData = new TLSSettingData(this.wsmanMessageCreator);
|
|
758
|
+
UserInitiatedConnectionService = new UserInitiatedConnectionService(this.wsmanMessageCreator);
|
|
759
|
+
WiFiPortConfigurationService = new WiFiPortConfigurationService(this.wsmanMessageCreator);
|
|
843
760
|
}
|
|
844
|
-
exports.Messages = Messages;
|
|
845
761
|
//# sourceMappingURL=messages.js.map
|