scimgateway 5.5.2 → 5.5.3

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
@@ -42,7 +42,7 @@ Latest news:
42
42
 
43
43
  ## Overview
44
44
 
45
- 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 provisioning across diverse destinations. With the gateway, your destinations effectively become SCIM endpoints, streamlining integration and simplifying user management.
45
+ 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 provisioning across diverse destinations. With the gateway, your destinations become SCIM-compatible interfaces, streamlining integration and simplifying user management.
46
46
 
47
47
 
48
48
  ![](https://jelhub.github.io/images/ScimGateway.svg)
@@ -972,8 +972,6 @@ On Linux systems we may also run SCIM Gateway as a Docker image (using docker-co
972
972
  **docker-ce
973
973
  docker-compose**
974
974
 
975
-
976
-
977
975
  - Install SCIM Gateway within your own package and copy provided docker files:
978
976
 
979
977
  mkdir /opt/my-scimgateway
@@ -988,6 +986,7 @@ docker-compose**
988
986
  **DataDockerfile** <== Handles volume mapping
989
987
  **docker-compose-debug.yml** <== Debugging
990
988
  **docker-compose-mssql.yml** <== Example including MSSQL docker image
989
+ **.dockerignore** <== Files to exclude from the build context
991
990
 
992
991
  - Create a scimgateway user on your Linux VM.
993
992
 
@@ -1491,6 +1490,15 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1491
1490
 
1492
1491
  ## Change log
1493
1492
 
1493
+ ### v5.5.3
1494
+
1495
+ [Fixed]
1496
+ - Docker - fixed `docker build` error introduced in v5.5.0 (using bun.lock instead of binary bun.lockb)
1497
+
1498
+ [Improved]
1499
+ - plugin-mssql - attribute externalId included
1500
+ - .dockerignore - new docker configuration file, contains files to be excluded from the build context
1501
+
1494
1502
  ### v5.5.2
1495
1503
 
1496
1504
  [Improved]
@@ -0,0 +1,27 @@
1
+ .DS_Store
2
+ dist/
3
+ client_deploy/
4
+ typings/
5
+ /typings.json
6
+ /jsconfig.json
7
+ /npm-debug.log
8
+ /uml.txt
9
+ /.dockerignore
10
+ /docker-compose*.yml
11
+ /Dockerfile
12
+ /DataDockerfile
13
+ /sqlserver_data/
14
+ /node_modules/
15
+ /.vscode/
16
+ /dbinit/
17
+ /logs/
18
+ /config/docker
19
+ /config/approles
20
+ /config/resources
21
+ /eslint.config.js
22
+ /.travis.yml
23
+ /.gitignore
24
+ /.gitattributes
25
+ /.git/
26
+ /.github/
27
+ /test/
@@ -2,7 +2,7 @@
2
2
  # To run: docker run -d --name scimgateway-data -t scimgateway-data:latest
3
3
 
4
4
  FROM busybox:latest
5
- LABEL maintainer="Jeffrey Gilbert"
5
+ LABEL maintainer="https://elshaug.xyz"
6
6
 
7
7
  RUN mkdir -p /home/scimgateway/config
8
8
  VOLUME /home/scimgateway/config
@@ -1,3 +1,5 @@
1
+ # Thanks to Charles Watson <cwatsonx@costco.com> and Jeffrey Gilbert for the base of Docker implementation and inspiration.
2
+ #
1
3
  # Depending on your system you may need to prefix the commands below with sudo.
2
4
  #
3
5
  # To build: docker build --force-rm=true -t <projectName>:1.0.0 .
@@ -14,7 +16,7 @@
14
16
  FROM oven/bun:slim AS base
15
17
 
16
18
  # Declare who maintains this Dockerfile
17
- LABEL maintainer="Charles Watson <cwatsonx@costco.com>"
19
+ LABEL maintainer="https://elshaug.xyz"
18
20
 
19
21
  # Add a Process ID 1 Safety Net. Specific to debian.
20
22
  ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init
@@ -25,7 +27,7 @@ WORKDIR /home/scimgateway
25
27
  ENV NODE_HOME=/home/scimgateway
26
28
 
27
29
  # Add your project info
28
- ADD ./package.json ./bun.lockb $NODE_HOME
30
+ ADD ./package.json ./bun.lock $NODE_HOME
29
31
 
30
32
  # Install dependencies (exclude test stuff for dependencies)
31
33
  RUN . ~/.bashrc && cd $NODE_HOME && bun install --production --frozen-lockfile
@@ -121,6 +121,7 @@ scimgateway.getUsers = async (baseEntity, getObj, attributes, ctx) => {
121
121
  for (const user of users) {
122
122
  const scimUser = {
123
123
  id: user.UserID.value ? user.UserID.value : undefined,
124
+ externalId: user.UserID.value ? user.UserID.value : undefined,
124
125
  userName: user.UserID.value ? user.UserID.value : undefined,
125
126
  active: user.Enabled.value === 'true' || false,
126
127
  name: {
@@ -292,6 +293,7 @@ scimgateway.getGroups = async (baseEntity, getObj, attributes, ctx) => {
292
293
  for (const group of groups) {
293
294
  const scimGroup: Record<string, any> = {
294
295
  id: group.GroupID.value ? group.GroupID.value : undefined,
296
+ externalId: group.GroupID.value ? group.GroupID.value : undefined,
295
297
  displayName: group.GroupID.value ? group.GroupID.value : undefined,
296
298
  active: group.Enabled.value === 'true' || false,
297
299
  members: [],
@@ -333,15 +333,17 @@ export class ScimGateway {
333
333
  pluginDir = '.' // only support running binary in current directory (path to binary can't be found)
334
334
  configDir = './config'
335
335
  }
336
- const configFile = path.join(`${configDir}`, `${pluginName}.json`) // config name prefix same as pluging name prefix
336
+ const configFile = path.join(configDir, `${pluginName}.json`) // config name prefix same as pluging name prefix
337
337
  const gwName = path.basename(fileURLToPath(import.meta.url)).split('.')[0] // prefix of current file - using fileURLToPath because using "__filename" is not supported by nodejs typescript
338
338
  const gwPath = path.dirname(fileURLToPath(import.meta.url))
339
339
 
340
340
  this.config = {}
341
341
  // exposed outside class
342
+ this.gwName = gwName
342
343
  this.pluginName = pluginName
343
344
  this.configDir = configDir
344
345
  this.configFile = configFile
346
+ this.authPassThroughAllowed = false // set to true by plugin if using Auth PassThrough
345
347
  this.countries = (() => {
346
348
  try {
347
349
  return JSON.parse(fs.readFileSync(path.join(gwPath, 'countries.json')).toString())
@@ -382,14 +384,7 @@ export class ScimGateway {
382
384
  logger.error(`${gwName}[${pluginName}] stopping...`)
383
385
  throw (new Error('Using exception to stop further asynchronous code execution (ensure synchronous logger flush to logfile and exit program), please ignore this one...'))
384
386
  }
385
-
386
387
  this.logger = logger
387
- // exposed to plugin
388
- this.gwName = gwName
389
- this.pluginName = pluginName
390
- this.configDir = configDir
391
- this.configFile = configFile
392
- this.authPassThroughAllowed = false // set to true by plugin if using Auth PassThrough
393
388
 
394
389
  const oAuthTokenExpire = 3600 // seconds
395
390
  let pwErrCount = 0
@@ -3084,8 +3079,8 @@ export class ScimGateway {
3084
3079
  let request = new Request(new URL(req.url ?? '', `${protocol}://${req.headers.host}`), {
3085
3080
  method: req.method,
3086
3081
  headers: new Headers(req.headers as any),
3082
+ // @ts-expect-error ignore incompatible types
3087
3083
  body: body,
3088
- // @ts-expect-error duplex not defined in RequestInit interface
3089
3084
  duplex: body ? 'half' : undefined,
3090
3085
  }) as Request & { raw: IncomingMessage }
3091
3086
  request.raw = req
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "5.5.2",
3
+ "version": "5.5.3",
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)",