scimgateway 5.1.4 → 5.1.5
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/README.md +9 -3
- package/lib/scimgateway.ts +2 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ Latest news:
|
|
|
36
36
|
|
|
37
37
|
## Overview
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
SCIM Gateway facilitates user management using the standardized REST-based SCIM 1.1 or 2.0 protocol, offering easier, more powerful, and consistent provisioning while avoiding vendor lock-in. Acting as a translator for incoming SCIM requests, the gateway seamlessly enables CRUD functionality (create, read, update, and delete) for users and groups. By implementing endpoint-specific protocols, it ensures precise and efficient provisioning across diverse destinations. With the gateway, your diverse destinations effectively become SCIM endpoints, streamlining integration and simplifying user management.
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|

|
|
@@ -150,7 +150,7 @@ If internet connection is blocked, we could install on another machine and copy
|
|
|
150
150
|
|
|
151
151
|
>Tip, take a look at bun test scripts located in `node_modules\scimgateway\test\lib`
|
|
152
152
|
|
|
153
|
-
> If using Node.js instead of Bun, scimgateway must be downloaded from github
|
|
153
|
+
> If using Node.js instead of Bun, scimgateway must be downloaded from github because Node.js does not support native typescript used by modules. Startup will then be:
|
|
154
154
|
node --experimental-strip-types c:\my-scimgateway\index.ts
|
|
155
155
|
|
|
156
156
|
#### Upgrade SCIM Gateway
|
|
@@ -1147,7 +1147,7 @@ If using REST, we could also include the HelperRest:
|
|
|
1147
1147
|
...
|
|
1148
1148
|
// end - mandatory plugin initialization
|
|
1149
1149
|
|
|
1150
|
-
Plugins should include following SCIM methods:
|
|
1150
|
+
Plugins should include following SCIM Gateway methods:
|
|
1151
1151
|
|
|
1152
1152
|
* scimgateway.getUsers()
|
|
1153
1153
|
* scimgateway.createUser()
|
|
@@ -1175,6 +1175,12 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
|
|
|
1175
1175
|
|
|
1176
1176
|
## Change log
|
|
1177
1177
|
|
|
1178
|
+
### v5.1.5
|
|
1179
|
+
|
|
1180
|
+
[Improved]
|
|
1181
|
+
|
|
1182
|
+
- 404 NOT_FOUND is now logged as a warning instead of error
|
|
1183
|
+
|
|
1178
1184
|
### v5.1.4
|
|
1179
1185
|
|
|
1180
1186
|
[Fixed]
|
package/lib/scimgateway.ts
CHANGED
|
@@ -305,7 +305,6 @@ export class ScimGateway {
|
|
|
305
305
|
|
|
306
306
|
constructor() {
|
|
307
307
|
const funcHandler: any = {}
|
|
308
|
-
const startTime = utils.timestamp()
|
|
309
308
|
let requester: string = ''
|
|
310
309
|
{
|
|
311
310
|
let _prepareStackTrace = Error.prepareStackTrace
|
|
@@ -374,7 +373,6 @@ export class ScimGateway {
|
|
|
374
373
|
|
|
375
374
|
const oAuthTokenExpire = 3600 // seconds
|
|
376
375
|
let pwErrCount = 0
|
|
377
|
-
let requestCounter = 0
|
|
378
376
|
let isMailLock = false
|
|
379
377
|
let ipAllowListChecker: any
|
|
380
378
|
let server: any
|
|
@@ -554,9 +552,9 @@ export class ScimGateway {
|
|
|
554
552
|
if (authType === 'Basic') [userName] = (Buffer.from(authToken, 'base64').toString() || '').split(':')
|
|
555
553
|
if (!userName && authType === 'Bearer') userName = 'token'
|
|
556
554
|
if (ctx.response.status && (ctx.response.status < 200 || ctx.response.status > 299)) {
|
|
557
|
-
logger.
|
|
555
|
+
if (ctx.response.status === 404) logger.warn(`${gwName}[${pluginName}][${ctx?.routeObj?.baseEntity}] ${ellapsed} ${ctx.ip} ${userName} ${ctx.response.status} ${ctx.request.method} ${ctx.request.url} Inbound=${JSON.stringify(ctx.request.body)} Outbound=${ctx.response.body}${(this.config.scimgateway.log.loglevel.file === 'debug' && ctx.request.url !== '/ping') ? '\n' : ''}`)
|
|
556
|
+
else logger.error(`${gwName}[${pluginName}][${ctx?.routeObj?.baseEntity}] ${ellapsed} ${ctx.ip} ${userName} ${ctx.response.status} ${ctx.request.method} ${ctx.request.url} Inbound=${JSON.stringify(ctx.request.body)} Outbound=${ctx.response.body}${(this.config.scimgateway.log.loglevel.file === 'debug' && ctx.request.url !== '/ping') ? '\n' : ''}`)
|
|
558
557
|
} else logger.info(`${gwName}[${pluginName}][${ctx?.routeObj?.baseEntity}] ${ellapsed} ${ctx.ip} ${ctx.response.status} ${userName} ${ctx.request.method} ${ctx.request.url} Inbound=${JSON.stringify(ctx.request.body)} Outbound=${ctx.response.body}${(this.config.scimgateway.log.loglevel.file === 'debug' && ctx.request.url !== '/ping') ? '\n' : ''}`)
|
|
559
|
-
requestCounter += 1 // logged on exit (not win process termination)
|
|
560
558
|
}
|
|
561
559
|
|
|
562
560
|
// start auth methods - used by auth
|
|
@@ -2558,9 +2556,6 @@ export class ScimGateway {
|
|
|
2558
2556
|
}
|
|
2559
2557
|
}
|
|
2560
2558
|
logger.debug(`${gwName}[${pluginName}] received terminate/kill signal - closing connections and exit`)
|
|
2561
|
-
logger.setLoglevelConsole('info')
|
|
2562
|
-
logger.setLoglevelFile('info')
|
|
2563
|
-
logger.info(`${gwName}[${pluginName}] pheww... ${requestCounter} requests have been processed in the period ${startTime} - ${utils.timestamp()}\n`)
|
|
2564
2559
|
logger.close()
|
|
2565
2560
|
if (server) {
|
|
2566
2561
|
if (typeof Bun !== 'undefined') {
|
package/package.json
CHANGED