scimgateway 4.0.0 → 4.1.1
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/.travis.yml +1 -1
- package/README.md +88 -9
- package/config/plugin-api.json +8 -0
- package/config/plugin-azure-ad.json +8 -0
- package/config/plugin-forwardinc.json +8 -0
- package/config/plugin-ldap.json +10 -0
- package/config/plugin-loki.json +8 -0
- package/config/plugin-mongodb.json +8 -0
- package/config/plugin-mssql.json +8 -0
- package/config/plugin-saphana.json +8 -0
- package/config/{plugin-restful.json → plugin-scim.json} +8 -0
- package/index.js +1 -1
- package/lib/plugin-ldap.js +321 -78
- package/lib/plugin-loki.js +8 -6
- package/lib/plugin-mongodb.js +7 -6
- package/lib/{plugin-restful.js → plugin-scim.js} +0 -0
- package/lib/postinstall.js +16 -8
- package/lib/scimgateway.js +252 -54
- package/lib/utils.js +43 -0
- package/package.json +4 -4
- package/test/index.js +2 -2
- package/test/lib/{plugin-restful.js → plugin-scim.js} +2 -2
package/.travis.yml
CHANGED
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@ Validated through IdP's:
|
|
|
16
16
|
|
|
17
17
|
Latest news:
|
|
18
18
|
|
|
19
|
-
-
|
|
19
|
+
- Supporting OAuth Client Credentials authentication
|
|
20
|
+
- Major version v4.0.0. getUsers() and getGroups() replacing some deprecated methods. No limitations on filtering/sorting. Admin user access can be limited to specific baseEntities. New MongoDB plugin
|
|
20
21
|
- ipAllowList for restricting access to allowlisted IP addresses or subnets e.g. Azure AD IP-range
|
|
21
22
|
- General LDAP plugin configured for Active Directory
|
|
22
23
|
- [PlugSSO](https://elshaug.xyz/docs/plugsso) using SCIM Gateway
|
|
@@ -38,8 +39,6 @@ Using Identity Manager, we could setup one or more endpoints of type SCIM pointi
|
|
|
38
39
|
|
|
39
40
|

|
|
40
41
|
|
|
41
|
-
Instead of using IM-SDK for building our own integration for none supported endpoints, we can now build new integration based on SCIM Gateway plugins. SCIM Gateway works with IM as long as IM supports SCIM.
|
|
42
|
-
|
|
43
42
|
SCIM Gateway is based on the popular asynchronous event driven framework [Node.js](https://nodejs.dev/) using JavaScript. It is firewall friendly using REST webservices. Runs on almost all operating systems, and may load balance between hosts (horizontal) and cpu's (vertical). Could even be uploaded and run as a cloud application.
|
|
44
43
|
|
|
45
44
|
**Following example plugins are included:**
|
|
@@ -56,12 +55,15 @@ Example of a fully functional SCIM Gateway plugin
|
|
|
56
55
|
Same as plugin "Loki" but using MongoDB
|
|
57
56
|
Shows how to implement a highly configurable multi tenant or multi endpoint solution through `baseEntity` in URL
|
|
58
57
|
|
|
59
|
-
* **
|
|
60
|
-
Demonstrates user provisioning towards
|
|
61
|
-
Using plugin "Loki" as
|
|
58
|
+
* **SCIM** (REST Webservice)
|
|
59
|
+
Demonstrates user provisioning towards a SCIM endpoint using REST
|
|
60
|
+
Using plugin "Loki" as SCIM endpoint
|
|
61
|
+
Can be used as SCIM version-gateway e.g. 1.1=>2.0 or 2.0=>1.1
|
|
62
|
+
Can be used to chain several SCIM Gateway's
|
|
63
|
+
|
|
62
64
|
|
|
63
65
|
* **Forwardinc** (SOAP Webservice)
|
|
64
|
-
Demonstrates
|
|
66
|
+
Demonstrates provisioning towards SOAP-Based endpoint
|
|
65
67
|
Using endpoint Forwardinc that comes with Broadcom/CA IM SDK (SDKWS) - [wiki.ca.com](https://docops.ca.com/ca-identity-manager/12-6-8/EN/programming/connector-programming-reference/sdk-sample-connectors/sdkws-sdk-web-services-connector/sdkws-sample-connector-build-requirements "wiki.ca.com")
|
|
66
68
|
Shows how to implement a highly configurable multi tenant or multi endpoint solution through `baseEntity` in URL
|
|
67
69
|
|
|
@@ -137,7 +139,7 @@ If internet connection is blocked, we could install on another machine and copy
|
|
|
137
139
|
|
|
138
140
|
http://localhost:8880/Groups?filter=displayName eq "Admins"&excludedAttributes=members
|
|
139
141
|
http://localhost:8880/Users?filter=userName eq "bjensen"&attributes=userName,id,name.givenName
|
|
140
|
-
http://localhost:8880/Users?filter=meta.created
|
|
142
|
+
http://localhost:8880/Users?filter=meta.created ge "2010-01-01T00:00:00Z"&attributes=userName,name.familyName,meta.created
|
|
141
143
|
http://localhost:8880/Users?filter=emails.value co "@example.com"&attributes=userName,name.familyName,emails&sortBy=name.familyName&sortOrder=descending
|
|
142
144
|
=> Filtering examples
|
|
143
145
|
|
|
@@ -173,13 +175,17 @@ Note, always backup/copy C:\\my-scimgateway before upgrading. Custom plugins and
|
|
|
173
175
|
|
|
174
176
|
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`
|
|
175
177
|
|
|
178
|
+
##### Avoid (re-)adding the files created during `postinstall`
|
|
179
|
+
|
|
180
|
+
When maintaining a set of modifications it useful to disable the postinstall operations to keep your changes intact by setting the property `scimgateway_postinstall_skip = true` in `.npmrc` or by setting environment `SCIMGATEWAY_POSTINSTALL_SKIP = true`
|
|
181
|
+
|
|
176
182
|
## Configuration
|
|
177
183
|
|
|
178
184
|
**index.js** defines one or more plugins to be started. We could comment out those we do not need. Default configuration only starts the loki plugin.
|
|
179
185
|
|
|
180
186
|
const loki = require('./lib/plugin-loki')
|
|
181
187
|
// const mongodb = require('./lib/plugin-mongodb')
|
|
182
|
-
// const
|
|
188
|
+
// const scim = require('./lib/plugin-scim')
|
|
183
189
|
// const forwardinc = require('./lib/plugin-forwardinc')
|
|
184
190
|
// const mssql = require('./lib/plugin-mssql')
|
|
185
191
|
// const saphana = require('./lib/plugin-saphana') // prereq: npm install hdb
|
|
@@ -244,6 +250,14 @@ Below shows an example of config\plugin-saphana.json
|
|
|
244
250
|
"readOnly": false,
|
|
245
251
|
"baseEntities": []
|
|
246
252
|
}
|
|
253
|
+
],
|
|
254
|
+
"bearerOAuth": [
|
|
255
|
+
{
|
|
256
|
+
"client_id": null,
|
|
257
|
+
"client_secret": null,
|
|
258
|
+
"readOnly": false,
|
|
259
|
+
"baseEntities": []
|
|
260
|
+
}
|
|
247
261
|
]
|
|
248
262
|
},
|
|
249
263
|
"certificate": {
|
|
@@ -331,6 +345,8 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
|
|
|
331
345
|
|
|
332
346
|
- **auth.bearerJwt** - Array of one or more standard JWT objects. Using **secret** or **publicKey** for signature verification. publicKey should be set to the filename of public key or certificate pem-file located in `<package-root>\config\certs`. Clear text secret will become encrypted when gateway is started. **options.issuer** is mandatory. Other options may also be included according to jsonwebtoken npm package definition.
|
|
333
347
|
|
|
348
|
+
- **auth.bearerOAuth** - Array of one or more Client Credentials OAuth configuration objects. **`client_id`** and **`client_secret`** are mandatory. client_secret value will become encrypted when gateway is started. OAuth token request url is **/oauth/token** e.g. http://localhost:8880/oauth/token
|
|
349
|
+
|
|
334
350
|
- **certificate** - If not using SSL/TLS certificate, set "key", "cert" and "ca" to **null**. When using SSL/TLS, "key" and "cert" have to be defined with the filename corresponding to the primary-key and public-certificate. Both files must be located in the `<package-root>\config\certs` directory e.g:
|
|
335
351
|
|
|
336
352
|
"certificate": {
|
|
@@ -385,6 +401,7 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
|
|
|
385
401
|
- Setting environment variable `SEED` will override default password seeding logic.
|
|
386
402
|
- All configuration can be set based on environment variables. Syntax will then be `"process.env.<ENVIRONMENT>"` where `<ENVIRONMENT>` is the environment variable used. E.g. scimgateway.port could have value "process.env.PORT", then using environment variable PORT.
|
|
387
403
|
- All configuration can be set based on corresponding JSON-content (dot notation) in external file using plugin name as parent JSON object. Syntax will then be `"process.file.<path>"` where `<path>` is the file used. E.g. endpoint.password could have value "process.file./var/run/vault/secrets.json"
|
|
404
|
+
- Indivudual Secrets can be contained in plain text files. Syntax will then be `"process.text.<path>"` where `<path>` is the file which contains raw (`UTF-8`) character value. E.g. endpoint.password could have value "process.text./var/run/vault/endpoint.password". This enables that the config file itself be loaded from a ConfigMap while specific values are mounted either from `secrets.json` style files as mentioned above OR from traditional secrets files mounted in the file system, one value per file.
|
|
388
405
|
|
|
389
406
|
Example:
|
|
390
407
|
|
|
@@ -404,6 +421,11 @@ Definitions in `endpoint` object are customized according to our plugin code. Pl
|
|
|
404
421
|
},
|
|
405
422
|
...
|
|
406
423
|
],
|
|
424
|
+
"bearerJwt": [
|
|
425
|
+
"secret": "process.text./var/run/vault/jwt.secret",
|
|
426
|
+
"publicKey": "process.text./var/run/vault/jwt.pub",
|
|
427
|
+
...
|
|
428
|
+
],
|
|
407
429
|
...
|
|
408
430
|
},
|
|
409
431
|
"endpoint": {
|
|
@@ -1117,6 +1139,63 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
|
|
|
1117
1139
|
|
|
1118
1140
|
## Change log
|
|
1119
1141
|
|
|
1142
|
+
### v4.1.1
|
|
1143
|
+
[Added]
|
|
1144
|
+
|
|
1145
|
+
- plugin-ldap support userFilter/groupFilter configuration for restricting scope
|
|
1146
|
+
|
|
1147
|
+
Configuration example:
|
|
1148
|
+
|
|
1149
|
+
{
|
|
1150
|
+
...
|
|
1151
|
+
"userFilter": "(memberOf=CN=grp1,OU=Groups,DC=test,DC=com)(!(memberOf=CN=Domain Admins,CN=Users,DC=test,DC=com))",
|
|
1152
|
+
"groupFilter": "(!(cn=grp2))",
|
|
1153
|
+
...
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
### v4.1.0
|
|
1157
|
+
[Added]
|
|
1158
|
+
|
|
1159
|
+
- Supporting OAuth Client Credentials authentication
|
|
1160
|
+
|
|
1161
|
+
Configuration example:
|
|
1162
|
+
|
|
1163
|
+
"bearerOAuth": [
|
|
1164
|
+
{
|
|
1165
|
+
"client_id": "my_client_id",
|
|
1166
|
+
"client_secret": "my_client_secret",
|
|
1167
|
+
"readOnly": false,
|
|
1168
|
+
"baseEntities": []
|
|
1169
|
+
}
|
|
1170
|
+
]
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
In example above, client using SCIM Gateway must have OAuth configuration:
|
|
1174
|
+
|
|
1175
|
+
client_id = my_client_id
|
|
1176
|
+
client_secret = my_client_secret
|
|
1177
|
+
token request url = http(s)://<host>:<port>/oauth/token
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
### v4.0.1
|
|
1181
|
+
[Added]
|
|
1182
|
+
|
|
1183
|
+
- create user/group supporting externalId
|
|
1184
|
+
- plugin-restful renamed to plugin-scim
|
|
1185
|
+
- plugin-ldap having improved SID/GUID support for Active Directory, also supporting domain map of userPrincipalName e.g. Azure AD => Active Directory
|
|
1186
|
+
|
|
1187
|
+
"userPrincipalName": {
|
|
1188
|
+
"mapTo": "userName",
|
|
1189
|
+
"type": "string",
|
|
1190
|
+
"mapDomain": {
|
|
1191
|
+
"inbound": "test.onmicrosoft.com",
|
|
1192
|
+
"outbound": "my-company.com"
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
- postinstall copying example plugins may be skipped by setting the property `scimgateway_postinstall_skip = true` in `.npmrc` or by setting environment `SCIMGATEWAY_POSTINSTALL_SKIP = true`
|
|
1196
|
+
- Secrets now also support key-value storage. The key defined in plugin configuration have syntax `process.text.<path>` where `<path>` is the file which contains raw (UTF-8) character value. E.g. configuration `endpoint.password` could have value `process.text./var/run/vault/endpoint.password`, and the corresponding file contains the secret. **Thanks to Raymond Augé**
|
|
1197
|
+
|
|
1198
|
+
|
|
1120
1199
|
### v4.0.0
|
|
1121
1200
|
**[MAJOR]**
|
|
1122
1201
|
|
package/config/plugin-api.json
CHANGED
package/config/plugin-ldap.json
CHANGED
|
@@ -47,6 +47,14 @@
|
|
|
47
47
|
"readOnly": false,
|
|
48
48
|
"baseEntities": []
|
|
49
49
|
}
|
|
50
|
+
],
|
|
51
|
+
"bearerOAuth": [
|
|
52
|
+
{
|
|
53
|
+
"client_id": null,
|
|
54
|
+
"client_secret": null,
|
|
55
|
+
"readOnly": false,
|
|
56
|
+
"baseEntities": []
|
|
57
|
+
}
|
|
50
58
|
]
|
|
51
59
|
},
|
|
52
60
|
"certificate": {
|
|
@@ -86,6 +94,8 @@
|
|
|
86
94
|
"ldap": {
|
|
87
95
|
"userBase": "CN=Users,DC=test,DC=com",
|
|
88
96
|
"groupBase": "OU=Groups,DC=test,DC=com",
|
|
97
|
+
"userFilter": null,
|
|
98
|
+
"groupFilter": null,
|
|
89
99
|
"userNamingAttr": "CN",
|
|
90
100
|
"groupNamingAttr": "CN",
|
|
91
101
|
"userObjectClasses": [
|
package/config/plugin-loki.json
CHANGED
package/config/plugin-mssql.json
CHANGED
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
const loki = require('./lib/plugin-loki')
|
|
13
13
|
// const mongodb = require('./lib/plugin-mongodb')
|
|
14
|
-
// const
|
|
14
|
+
// const scim = require('./lib/plugin-scim')
|
|
15
15
|
// const forwardinc = require('./lib/plugin-forwardinc')
|
|
16
16
|
// const mssql = require('./lib/plugin-mssql')
|
|
17
17
|
// const saphana = require('./lib/plugin-saphana') // prereq: npm install hdb --save
|