scimgateway 4.1.5 → 4.1.6
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 +14 -10
- package/lib/scimgateway.js +1 -0
- package/lib/utils.js +6 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SCIM Gateway
|
|
2
2
|
|
|
3
|
-
[](https://app.travis-ci.com/github/jelhub/scimgateway) [](https://www.npmjs.com/package/scimgateway)[](https://app.travis-ci.com/github/jelhub/scimgateway) [](https://www.npmjs.com/package/scimgateway)[](https://www.npmjs.com/package/scimgateway) [](https://elshaug.xyz/docs/scimgateway#disqus_thread) [](https://github.com/jelhub/scimgateway)
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
Author: Jarle Elshaug
|
|
@@ -53,7 +53,7 @@ Setting `{"persistence": true}` gives persistence file store (no test users)
|
|
|
53
53
|
Example of a fully functional SCIM Gateway plugin
|
|
54
54
|
|
|
55
55
|
* **MongoDB** (NoSQL Document-Oriented Database)
|
|
56
|
-
Same as plugin "Loki" but using external MongoDB
|
|
56
|
+
Same as plugin "Loki", but using external MongoDB
|
|
57
57
|
Shows how to implement a highly configurable multi tenant or multi endpoint solution through `baseEntity` in URL
|
|
58
58
|
|
|
59
59
|
* **SCIM** (REST Webservice)
|
|
@@ -104,7 +104,7 @@ Node.js is a prerequisite and have to be installed on the server.
|
|
|
104
104
|
#### Install SCIM Gateway
|
|
105
105
|
|
|
106
106
|
Open a command window (run as administrator)
|
|
107
|
-
Create your own package directory e.g.
|
|
107
|
+
Create your own package directory e.g. c:\my-scimgateway and install SCIM Gateway within this package.
|
|
108
108
|
|
|
109
109
|
mkdir c:\my-scimgateway
|
|
110
110
|
cd c:\my-scimgateway
|
|
@@ -128,22 +128,22 @@ If internet connection is blocked, we could install on another machine and copy
|
|
|
128
128
|
=> Health check with a "hello" response
|
|
129
129
|
|
|
130
130
|
http://localhost:8880/Users
|
|
131
|
-
http://localhost:8880/Groups
|
|
132
|
-
or
|
|
133
|
-
http://localhost:8880/Users?attributes=userName
|
|
134
|
-
http://localhost:8880/Groups?attributes=displayName
|
|
131
|
+
http://localhost:8880/Groups
|
|
135
132
|
=> Logon using gwadmin/password and two users and groups should be listed
|
|
136
133
|
|
|
137
134
|
http://localhost:8880/Users/bjensen
|
|
138
135
|
http://localhost:8880/Groups/Admins
|
|
136
|
+
or
|
|
137
|
+
http://localhost:8880/Users?filter=userName eq "bjensen"
|
|
138
|
+
http://localhost:8880/Groups?filter=displayName eq "Admins"
|
|
139
139
|
=> Lists all attributes for specified user/group
|
|
140
140
|
|
|
141
141
|
http://localhost:8880/Groups?filter=displayName eq "Admins"&excludedAttributes=members
|
|
142
|
+
http://localhost:8880/Groups?filter=members.value eq "bjensen"&attributes=id,displayName,members.value
|
|
142
143
|
http://localhost:8880/Users?filter=userName eq "bjensen"&attributes=userName,id,name.givenName
|
|
143
144
|
http://localhost:8880/Users?filter=meta.created ge "2010-01-01T00:00:00Z"&attributes=userName,name.familyName,meta.created
|
|
144
145
|
http://localhost:8880/Users?filter=emails.value co "@example.com"&attributes=userName,name.familyName,emails&sortBy=name.familyName&sortOrder=descending
|
|
145
|
-
=> Filtering examples
|
|
146
|
-
|
|
146
|
+
=> Filtering and attribute examples
|
|
147
147
|
|
|
148
148
|
"Ctrl + c" to stop the SCIM Gateway
|
|
149
149
|
|
|
@@ -172,7 +172,7 @@ Upgrade to latest minor version:
|
|
|
172
172
|
cd c:\my-scimgateway
|
|
173
173
|
npm install scimgateway
|
|
174
174
|
|
|
175
|
-
Note, always backup/copy
|
|
175
|
+
Note, always backup/copy c:\\my-scimgateway before upgrading. Custom plugins and corresponding configuration files will not be affected.
|
|
176
176
|
|
|
177
177
|
To force a major upgrade (version x.\*.\* => y.\*.\*) that will brake compability with any existing custom plugins, we have to include the `@latest` suffix in the install command: `npm install scimgateway@latest`
|
|
178
178
|
|
|
@@ -1143,6 +1143,10 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
|
|
|
1143
1143
|
|
|
1144
1144
|
## Change log
|
|
1145
1145
|
|
|
1146
|
+
### v4.1.6
|
|
1147
|
+
[Added]
|
|
1148
|
+
- Dependencies bump
|
|
1149
|
+
|
|
1146
1150
|
### v4.1.5
|
|
1147
1151
|
[Added]
|
|
1148
1152
|
|
package/lib/scimgateway.js
CHANGED
|
@@ -1307,6 +1307,7 @@ const ScimGateway = function () {
|
|
|
1307
1307
|
delete newObj.externalId
|
|
1308
1308
|
delete newObj.groups // do not support "group member of users"
|
|
1309
1309
|
delete newObj.schemas
|
|
1310
|
+
delete newObj.meta
|
|
1310
1311
|
if (handle.getMethod === handler.groups.getMethod) delete newObj.displayName
|
|
1311
1312
|
|
|
1312
1313
|
let [scimdata, err] = ScimGateway.prototype.convertedScim(newObj)
|
package/lib/utils.js
CHANGED
|
@@ -190,7 +190,7 @@ module.exports.copyObj = (o) => { // deep copy/clone faster than JSON.parse(JSON
|
|
|
190
190
|
return output
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
const extendObj = (obj, src) => {
|
|
194
194
|
Object.keys(src).forEach((key) => {
|
|
195
195
|
if (typeof src[key] === 'object' && src[key] != null) {
|
|
196
196
|
if (typeof obj[key] === 'undefined') obj[key] = src[key]
|
|
@@ -222,6 +222,11 @@ module.exports.extendObj = (obj, src) => { // copy src content into obj
|
|
|
222
222
|
return obj
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
module.exports.extendObj = (obj, src) => { // copy src content into obj
|
|
226
|
+
if (typeof src !== 'object' || Array.isArray(src)) return obj
|
|
227
|
+
return extendObj(obj, src)
|
|
228
|
+
}
|
|
229
|
+
|
|
225
230
|
module.exports.stripObj = (obj, attributes, excludedAttributes) => { // strip and return a new object according to attributes or excludedAttributes - comma separated dot object list
|
|
226
231
|
if (!attributes && !excludedAttributes) return obj
|
|
227
232
|
if (!obj || typeof obj !== 'object') return obj
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scimgateway",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
4
4
|
"description": "Using SCIM protocol as a gateway for user provisioning to other endpoints",
|
|
5
5
|
"author": "Jarle Elshaug <jarle.elshaug@gmail.com> (https://elshaug.xyz)",
|
|
6
6
|
"homepage": "https://elshaug.xyz",
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"callsite": "^1.0.0",
|
|
36
36
|
"dot-object": "^2.1.4",
|
|
37
|
-
"https-proxy-agent": "^5.0.
|
|
37
|
+
"https-proxy-agent": "^5.0.1",
|
|
38
38
|
"is-in-subnet": "^4.0.1",
|
|
39
39
|
"jsonwebtoken": "^8.5.1",
|
|
40
40
|
"koa": "^2.13.4",
|
|
41
41
|
"koa-bodyparser": "^4.3.0",
|
|
42
|
-
"koa-router": "^
|
|
43
|
-
"ldapjs": "^2.3.
|
|
42
|
+
"koa-router": "^12.0.0",
|
|
43
|
+
"ldapjs": "^2.3.3",
|
|
44
44
|
"lokijs": "^1.5.12",
|
|
45
|
-
"mongodb": "^4.
|
|
45
|
+
"mongodb": "^4.10.0",
|
|
46
46
|
"node-machine-id": "1.1.9",
|
|
47
|
-
"nodemailer": "^6.7.
|
|
48
|
-
"passport": "^0.
|
|
49
|
-
"passport-azure-ad": "^4.3.
|
|
50
|
-
"soap": "^0.
|
|
51
|
-
"tedious": "^
|
|
52
|
-
"winston": "^3.
|
|
47
|
+
"nodemailer": "^6.7.8",
|
|
48
|
+
"passport": "^0.6.0",
|
|
49
|
+
"passport-azure-ad": "^4.3.4",
|
|
50
|
+
"soap": "^0.45.0",
|
|
51
|
+
"tedious": "^15.1.0",
|
|
52
|
+
"winston": "^3.8.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"chai": "^4.2.0",
|