scimgateway 5.0.3 → 5.0.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 CHANGED
@@ -18,7 +18,7 @@ Latest news:
18
18
 
19
19
  - Major version **v5.0.0** marks a shift to native TypeScript support and prioritizes [Bun](https://bun.sh/) over Node.js. This upgrade requires some modifications to existing plugins.
20
20
  - **BREAKING**: [SCIM Stream](https://elshaug.xyz/docs/scim-stream) is the modern way of user provisioning letting clients subscribe to messages instead of traditional IGA top-down provisioning. SCIM Gateway now offers enhanced functionality with support for message subscription and automated provisioning using SCIM Stream
21
- - Authentication PassThrough letting plugin pass authentication directly to endpoint for avoid maintaining secrets at the gateway. Kubernetes health checks and shutdown handler support
21
+ - Authentication PassThrough letting plugin pass authentication directly to endpoint for avoid maintaining secrets at the gateway
22
22
  - Supports OAuth Client Credentials authentication
23
23
  - Major version **v4.0.0** getUsers() and getGroups() replacing some deprecated methods. No limitations on filtering/sorting. Admin user access can be linked to specific baseEntities. New MongoDB plugin
24
24
  - ipAllowList for restricting access to allowlisted IP addresses or subnets e.g. Azure IP-range
@@ -157,7 +157,7 @@ If internet connection is blocked, we could install on another machine and copy
157
157
 
158
158
  Not needed after a fresh install
159
159
 
160
- The best and easiest way to upgrade is renaming existing scimgateway package folder, create a new one and do a fresh installation. After the installation we copy `index.ts, config and lib folder` (customized plugins) from previous installation to the new installation. You should also read the version history to see custom plugins needs to be updated.
160
+ The best and easiest way to upgrade is renaming existing scimgateway package folder, create a new one and do a fresh installation. After the installation we copy `index.ts, config and lib folder` (customized plugins) from previous installation to the new installation. You should also read the version history to see if custom plugins needs to be updated.
161
161
 
162
162
  Alternatives are:
163
163
 
@@ -1086,6 +1086,18 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1086
1086
 
1087
1087
  ## Change log
1088
1088
 
1089
+ ### v5.0.5
1090
+
1091
+ [Fixed]
1092
+
1093
+ - plugin-ldap, dn special character not correct for ascii code 128(dec)/80(hex)
1094
+
1095
+ ### v5.0.4
1096
+
1097
+ [Improved]
1098
+
1099
+ - minor type definition cosmetics
1100
+
1089
1101
  ### v5.0.3
1090
1102
 
1091
1103
  [Fixed]
@@ -1094,7 +1106,7 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1094
1106
 
1095
1107
  [Improved]
1096
1108
 
1097
- - minor type cosmetics
1109
+ - minor type definition cosmetics
1098
1110
 
1099
1111
 
1100
1112
  ### v5.0.2
@@ -82,6 +82,7 @@
82
82
  'use strict'
83
83
 
84
84
  import ldap from 'ldapjs'
85
+ // @ts-expect-error missing type definitions
85
86
  import { BerReader } from '@ldapjs/asn1'
86
87
 
87
88
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
@@ -1451,7 +1452,7 @@ const doRequest = async (baseEntity: string, method: string, base: any, options:
1451
1452
  obj.dn = obj.dn.replace(/\\\\/g, '__') // temp
1452
1453
  let conv = obj.dn.replace(/\\([0-9A-Fa-f]{2})/g, (_: any, hex: any) => {
1453
1454
  const intAscii = parseInt(hex, 16)
1454
- if (intAscii > 128) { // extended ascii - will be unescaped by decodeURIComponent
1455
+ if (intAscii > 127) { // extended ascii - will be unescaped by decodeURIComponent
1455
1456
  return '%' + hex
1456
1457
  } else { // use character escape
1457
1458
  return '\\' + String.fromCharCode(intAscii)
@@ -896,7 +896,7 @@ export class ScimGateway {
896
896
  const baseEntity = ctx.routeObj.baseEntity
897
897
  const id = decodeURIComponent(path.basename(ctx.routeObj.id || '', '.json')) // supports <id>.json
898
898
 
899
- if (!id || id.includes('/')) {
899
+ if (!id) {
900
900
  ctx.response.status = 500
901
901
  const err = new Error('missing id')
902
902
  const [e, customErrorCode] = utilsScim.jsonErr(this.config.scimgateway.scim.version, pluginName, ctx.response.status, err)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "type": "module",
5
5
  "description": "Using SCIM protocol as a gateway for user provisioning to other endpoints",
6
6
  "author": "Jarle Elshaug <jarle.elshaug@gmail.com> (https://elshaug.xyz)",
@@ -8,7 +8,6 @@
8
8
  "license": "MIT",
9
9
  "main": "lib/scimgateway.ts",
10
10
  "module": "./index.ts",
11
- "types": "./types",
12
11
  "scripts": {
13
12
  "postinstall": "bun ./lib/postinstall.ts",
14
13
  "start": "bun index.ts",
package/types/index.d.ts DELETED
@@ -1 +0,0 @@
1
- declare module '@ldapjs/asn1' // missing declaration file