itrm-tools 1.3.38 → 1.3.40
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.
|
@@ -34,109 +34,92 @@ class ServiceSessionManager {
|
|
|
34
34
|
let attempts = 0;
|
|
35
35
|
while (attempts < MAX_RETRIES) {
|
|
36
36
|
try {
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const existingTokenHeaders = await this.tryUseExistingToken(attempts);
|
|
45
|
-
if (existingTokenHeaders) {
|
|
46
|
-
return existingTokenHeaders;
|
|
37
|
+
if (await this.checkKeys()) {
|
|
38
|
+
const existingTokenHeaders = await this.tryUseExistingToken(attempts);
|
|
39
|
+
if (existingTokenHeaders)
|
|
40
|
+
return existingTokenHeaders;
|
|
41
|
+
const newTokenHeaders = await this.requestNewToken(attempts);
|
|
42
|
+
if (newTokenHeaders)
|
|
43
|
+
return newTokenHeaders;
|
|
47
44
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (newTokenHeaders) {
|
|
51
|
-
return newTokenHeaders;
|
|
52
|
-
}
|
|
53
|
-
// Both attempts failed, retry
|
|
54
|
-
attempts++;
|
|
55
|
-
await this.exponentialBackoff(attempts);
|
|
45
|
+
else
|
|
46
|
+
console.warn(`[${this.application}/${this.service}] Failed to obtain or validate keys (attempt ${attempts + 1}/${MAX_RETRIES})`);
|
|
56
47
|
}
|
|
57
48
|
catch (error) {
|
|
58
49
|
console.error(`[${this.application}/${this.service}] Unexpected error in requestHeaders (attempt ${attempts + 1}/${MAX_RETRIES}):`, error);
|
|
59
|
-
attempts++;
|
|
60
|
-
await this.exponentialBackoff(attempts);
|
|
61
50
|
}
|
|
51
|
+
attempts++;
|
|
52
|
+
await this.exponentialBackoff(attempts);
|
|
62
53
|
}
|
|
63
54
|
console.error(`[${this.application}/${this.service}] Failed to obtain auth headers after ${MAX_RETRIES} attempts`);
|
|
64
55
|
return {};
|
|
65
56
|
}
|
|
66
57
|
async tryUseExistingToken(attemptNumber) {
|
|
67
|
-
if (!this.authToken)
|
|
68
|
-
return null;
|
|
69
58
|
try {
|
|
70
|
-
|
|
71
|
-
payload: this.encryptPayload(`${this.application}:${this.service}:${this.authToken}`),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
59
|
+
if (this.authToken) {
|
|
60
|
+
const response = await RequestAxiosCall_1.RequestAxiosCall.post(`${this.sessionServiceUrl}/service/validate/token`, { payload: this.encryptPayload(`${this.application}:${this.service}:${this.authToken}`) }, this.buildHeaders({
|
|
61
|
+
authorization: `${this.application} ${this.apiKeySigner.sign({
|
|
62
|
+
method: APIRequest_1.RequestMethod.POST,
|
|
63
|
+
path: `/service/validate/token`,
|
|
64
|
+
}, this.keys)}`
|
|
65
|
+
}));
|
|
66
|
+
if (response.success && response.payload) {
|
|
67
|
+
console.debug(`[${this.application}/${this.service}] Existing token is still valid`);
|
|
68
|
+
return {
|
|
69
|
+
headers: {
|
|
70
|
+
Referer: this.encryptPayload(this.serviceReferer),
|
|
71
|
+
Authorization: `Bearer ${this.authToken}`,
|
|
72
|
+
Platform: this.platform,
|
|
73
|
+
Application: this.application,
|
|
74
|
+
Service: this.service,
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
89
78
|
}
|
|
90
|
-
return null;
|
|
91
79
|
}
|
|
92
80
|
catch (error) {
|
|
93
81
|
if (this.isUnauthorizedError(error)) {
|
|
94
82
|
console.warn(`[${this.application}/${this.service}] Token validation returned 401, triggering re-authentication`);
|
|
95
83
|
this.authToken = undefined;
|
|
96
84
|
}
|
|
97
|
-
return null;
|
|
98
85
|
}
|
|
86
|
+
return undefined;
|
|
99
87
|
}
|
|
100
88
|
async requestNewToken(attemptNumber) {
|
|
101
89
|
try {
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
};
|
|
90
|
+
if (this.keys || (await this.checkKeys())) {
|
|
91
|
+
const tokenUrl = `${this.sessionServiceUrl}/service/token?role=${encodeURIComponent(this.role)}&application=${encodeURIComponent(this.application)}&platform=${encodeURIComponent(this.platform)}&service=${encodeURIComponent(this.service)}`;
|
|
92
|
+
const response = await RequestAxiosCall_1.RequestAxiosCall.get(tokenUrl, this.buildHeaders({
|
|
93
|
+
authorization: `${this.application} ${this.apiKeySigner.sign({
|
|
94
|
+
method: APIRequest_1.RequestMethod.GET,
|
|
95
|
+
path: `/service/token?role=${encodeURIComponent(this.role)}&application=${encodeURIComponent(this.application)}&platform=${encodeURIComponent(this.platform)}&service=${encodeURIComponent(this.service)}`,
|
|
96
|
+
}, this.keys)}`
|
|
97
|
+
}));
|
|
98
|
+
if (response.success && response.payload) {
|
|
99
|
+
this.authToken = response.payload;
|
|
100
|
+
console.debug(`[${this.application}/${this.service}] Successfully obtained new auth token`);
|
|
101
|
+
return {
|
|
102
|
+
headers: {
|
|
103
|
+
Referer: this.encryptPayload(this.serviceReferer),
|
|
104
|
+
Authorization: `Bearer ${response.payload}`,
|
|
105
|
+
Platform: this.platform,
|
|
106
|
+
Application: this.application,
|
|
107
|
+
Service: this.service,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
console.warn(`[${this.application}/${this.service}] Token request returned unsuccessful response (attempt ${attemptNumber + 1}/${MAX_RETRIES})`);
|
|
126
112
|
}
|
|
127
|
-
console.warn(`[${this.application}/${this.service}] Token request returned unsuccessful response (attempt ${attemptNumber + 1}/${MAX_RETRIES})`);
|
|
128
|
-
return null;
|
|
129
113
|
}
|
|
130
114
|
catch (error) {
|
|
131
115
|
if (this.isUnauthorizedError(error)) {
|
|
132
116
|
console.warn(`[${this.application}/${this.service}] Token request returned 401, refreshing credentials (attempt ${attemptNumber + 1}/${MAX_RETRIES})`);
|
|
133
117
|
await this.handleTokenExpiration();
|
|
134
118
|
}
|
|
135
|
-
else
|
|
119
|
+
else
|
|
136
120
|
console.error(`[${this.application}/${this.service}] Error during token request (attempt ${attemptNumber + 1}/${MAX_RETRIES}):`, error);
|
|
137
|
-
}
|
|
138
|
-
return null;
|
|
139
121
|
}
|
|
122
|
+
return undefined;
|
|
140
123
|
}
|
|
141
124
|
async checkKeys() {
|
|
142
125
|
this.keys = this.keys ?? await this.requestKeys();
|
|
@@ -153,17 +136,14 @@ class ServiceSessionManager {
|
|
|
153
136
|
return this.keys;
|
|
154
137
|
}
|
|
155
138
|
console.warn(`[${this.application}/${this.service}] Credentials request returned unsuccessful response`);
|
|
156
|
-
return undefined;
|
|
157
139
|
}
|
|
158
140
|
catch (error) {
|
|
159
|
-
if (this.isUnauthorizedError(error))
|
|
141
|
+
if (this.isUnauthorizedError(error))
|
|
160
142
|
console.error(`[${this.application}/${this.service}] Credentials request returned 401 - authentication system may be unavailable`);
|
|
161
|
-
|
|
162
|
-
else {
|
|
143
|
+
else
|
|
163
144
|
console.error(`[${this.application}/${this.service}] Failed to request new keys:`, error);
|
|
164
|
-
}
|
|
165
|
-
return undefined;
|
|
166
145
|
}
|
|
146
|
+
return undefined;
|
|
167
147
|
}
|
|
168
148
|
async isCurrentKeysValid() {
|
|
169
149
|
if (this.keys) {
|
|
@@ -191,11 +171,11 @@ class ServiceSessionManager {
|
|
|
191
171
|
this.keys = undefined;
|
|
192
172
|
}
|
|
193
173
|
async exponentialBackoff(attemptNumber) {
|
|
194
|
-
if (attemptNumber
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
174
|
+
if (attemptNumber < MAX_RETRIES) {
|
|
175
|
+
const delayMs = RETRY_DELAY_MS * Math.pow(2, attemptNumber - 1);
|
|
176
|
+
console.debug(`[${this.application}/${this.service}] Waiting ${delayMs}ms before retry`);
|
|
177
|
+
await new Promise(resolve => setTimeout(resolve, delayMs));
|
|
178
|
+
}
|
|
199
179
|
}
|
|
200
180
|
isUnauthorizedError(error) {
|
|
201
181
|
if (error && typeof error === 'object' && 'response' in error) {
|
|
@@ -208,14 +188,12 @@ class ServiceSessionManager {
|
|
|
208
188
|
const headers = {
|
|
209
189
|
Referer: this.encryptPayload(this.serviceReferer),
|
|
210
190
|
};
|
|
211
|
-
if (additionalHeaders)
|
|
212
|
-
for (const [key, value] of Object.entries(additionalHeaders))
|
|
191
|
+
if (additionalHeaders)
|
|
192
|
+
for (const [key, value] of Object.entries(additionalHeaders))
|
|
213
193
|
if (value) {
|
|
214
194
|
const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
215
195
|
headers[capitalizedKey] = value;
|
|
216
196
|
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
197
|
return { headers };
|
|
220
198
|
}
|
|
221
199
|
encryptPayload(payload) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceSessionManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/ServiceSessionManager.ts"],"names":[],"mappings":";;;AACA,oGAAiG;AACjG,6EAA0E;AAE1E,6DAA0D;AAE1D,oDAAoD;AAEpD,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,qCAAqC;
|
|
1
|
+
{"version":3,"file":"ServiceSessionManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/ServiceSessionManager.ts"],"names":[],"mappings":";;;AACA,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AAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC1D,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAClE,OAAO,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;gBAClC,CAAC;QACL,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAEM,cAAc,CAAC,OAAe;QACnC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACzE,CAAC;IAEM,cAAc,CAAC,OAAe;QACnC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACzE,CAAC;CACF;AAnOD,sDAmOC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itrm-tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.40",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,24 +40,24 @@
|
|
|
40
40
|
"@types/jest": "^30.0.0",
|
|
41
41
|
"@types/jsrsasign": "^10.5.15",
|
|
42
42
|
"@types/morgan": "^1.9.10",
|
|
43
|
-
"@types/multer": "^2.
|
|
44
|
-
"@types/node": "^25.
|
|
43
|
+
"@types/multer": "^2.1.0",
|
|
44
|
+
"@types/node": "^25.5.0",
|
|
45
45
|
"@types/swagger-ui-express": "^4.1.8",
|
|
46
46
|
"@types/uuid": "^10.0.0",
|
|
47
47
|
"@types/ws": "^8.18.1",
|
|
48
48
|
"axios-mock-adapter": "^2.1.0",
|
|
49
|
-
"jest": "^30.
|
|
49
|
+
"jest": "^30.3.0",
|
|
50
50
|
"jest-puppeteer": "^11.0.0",
|
|
51
51
|
"mongodb-memory-server": "^11.0.1",
|
|
52
|
-
"puppeteer": "^24.
|
|
52
|
+
"puppeteer": "^24.40.0",
|
|
53
53
|
"redis": "^5.11.0",
|
|
54
54
|
"rimraf": "^6.1.3",
|
|
55
|
-
"sqlite3": "^
|
|
55
|
+
"sqlite3": "^6.0.1",
|
|
56
56
|
"ts-jest": "^29.4.6",
|
|
57
57
|
"typescript": "^5.9.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@scalar/express-api-reference": "^0.
|
|
60
|
+
"@scalar/express-api-reference": "^0.9.5",
|
|
61
61
|
"@sequelize/core": "^7.0.0-alpha.48",
|
|
62
62
|
"axios": "^1.13.6",
|
|
63
63
|
"axios-retry": "^4.5.0",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"crypto-js": "^4.2.0",
|
|
67
67
|
"express": "^5.2.1",
|
|
68
68
|
"https": "^1.0.0",
|
|
69
|
-
"jose": "^6.
|
|
69
|
+
"jose": "^6.2.2",
|
|
70
70
|
"jsrsasign": "^11.1.1",
|
|
71
|
-
"mongoose": "^9.
|
|
71
|
+
"mongoose": "^9.3.3",
|
|
72
72
|
"morgan": "^1.10.0",
|
|
73
|
-
"multer": "^2.1.
|
|
74
|
-
"pg": "^8.
|
|
73
|
+
"multer": "^2.1.1",
|
|
74
|
+
"pg": "^8.20.0",
|
|
75
75
|
"pg-hstore": "^2.3.4",
|
|
76
|
-
"sequelize": "^6.37.
|
|
76
|
+
"sequelize": "^6.37.8",
|
|
77
77
|
"swagger-ui-express": "^5.0.1",
|
|
78
78
|
"uuid": "^11.1.0",
|
|
79
|
-
"ws": "^8.
|
|
79
|
+
"ws": "^8.20.0"
|
|
80
80
|
}
|
|
81
81
|
}
|