scimgateway 4.1.8 → 4.1.9

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
@@ -1143,6 +1143,13 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1143
1143
 
1144
1144
  ## Change log
1145
1145
 
1146
+ ### v4.1.9
1147
+
1148
+ [Fixed]
1149
+
1150
+ - plugin-azure-ad.json configuration file introduced in v.4.1.7 was missing passwordProfile attribute mappings
1151
+ - Symantec/Broadcom/CA ConnectorXpress configuration file `config\resources\Azure - ScimGateway.xml` now using standard text on manager attribute instead of selection dialogbox.
1152
+
1146
1153
  ### v4.1.8
1147
1154
 
1148
1155
  [Fixed]
@@ -210,6 +210,14 @@
210
210
  "mapTo": "passwordPolicies",
211
211
  "type": "string"
212
212
  },
213
+ "passwordProfile.forceChangePasswordNextSignIn": {
214
+ "mapTo": "passwordProfile.forceChangePasswordNextSignIn",
215
+ "type": "string"
216
+ },
217
+ "passwordProfile.password": {
218
+ "mapTo": "passwordProfile.password",
219
+ "type": "string"
220
+ },
213
221
  "servicePlan": {
214
222
  "mapTo": "servicePlan.value",
215
223
  "type": "array"
@@ -3326,16 +3326,16 @@ function init(FieldContext)
3326
3326
  <property name="eTDYN-str-multi-11">
3327
3327
  <doc></doc>
3328
3328
  <value default="false">
3329
- <flexiStrValue type="DN"></flexiStrValue>
3329
+ <strValue></strValue>
3330
3330
  </value>
3331
3331
  <metadata name="displayName">
3332
3332
  <value>
3333
- <strValue>Manager Id</strValue>
3333
+ <strValue>Manager UPN</strValue>
3334
3334
  </value>
3335
3335
  </metadata>
3336
3336
  <metadata name="beanPropertyName">
3337
3337
  <value>
3338
- <strValue>managermanagerId</strValue>
3338
+ <strValue>managerId</strValue>
3339
3339
  </value>
3340
3340
  </metadata>
3341
3341
  <metadata name="isRequired">
@@ -3348,26 +3348,6 @@ function init(FieldContext)
3348
3348
  <strValue>manager.managerId</strValue>
3349
3349
  </value>
3350
3350
  </metadata>
3351
- <metadata name="DNTestExists">
3352
- <value>
3353
- <boolValue>true</boolValue>
3354
- </value>
3355
- </metadata>
3356
- <metadata name="assocRefObjectClass">
3357
- <value>
3358
- <strValue>eTDYNAccount</strValue>
3359
- </value>
3360
- </metadata>
3361
- <metadata name="assocRefKeyAttr">
3362
- <value>
3363
- <strValue>id</strValue>
3364
- </value>
3365
- </metadata>
3366
- <metadata name="DNLdapObjectClass">
3367
- <value>
3368
- <strValue>eTDYNAccount</strValue>
3369
- </value>
3370
- </metadata>
3371
3351
  </property>
3372
3352
  <property name="eTDYN-str-multi-29">
3373
3353
  <doc>Proxy Addresses</doc>
@@ -4906,16 +4886,16 @@ function init(FieldContext)
4906
4886
  </property>
4907
4887
  <property name="eTDYN-str-multi-11">
4908
4888
  <value>
4909
- <flexiStrValue type="DN"></flexiStrValue>
4889
+ <strValue></strValue>
4910
4890
  </value>
4911
4891
  <metadata name="displayName">
4912
4892
  <value>
4913
- <strValue>Manager Id</strValue>
4893
+ <strValue>Manager UPN</strValue>
4914
4894
  </value>
4915
4895
  </metadata>
4916
4896
  <metadata name="beanPropertyName">
4917
4897
  <value>
4918
- <strValue>managermanagerId</strValue>
4898
+ <strValue>managerId</strValue>
4919
4899
  </value>
4920
4900
  </metadata>
4921
4901
  <metadata name="isRequired">
@@ -4923,21 +4903,6 @@ function init(FieldContext)
4923
4903
  <boolValue>false</boolValue>
4924
4904
  </value>
4925
4905
  </metadata>
4926
- <metadata name="assocRefObjectClass">
4927
- <value>
4928
- <strValue>eTDYNAccount</strValue>
4929
- </value>
4930
- </metadata>
4931
- <metadata name="assocRefKeyAttr">
4932
- <value>
4933
- <strValue>id</strValue>
4934
- </value>
4935
- </metadata>
4936
- <metadata name="DNLdapObjectClass">
4937
- <value>
4938
- <strValue>eTDYNAccount</strValue>
4939
- </value>
4940
- </metadata>
4941
4906
  </property>
4942
4907
  <property name="eTDYN-str-multi-29">
4943
4908
  <value>
@@ -4962,11 +4927,6 @@ function init(FieldContext)
4962
4927
  <boolValue>false</boolValue>
4963
4928
  </value>
4964
4929
  </metadata>
4965
- <metadata name="isReadOnly">
4966
- <value>
4967
- <boolValue>true</boolValue>
4968
- </value>
4969
- </metadata>
4970
4930
  <metadata name="writableBy">
4971
4931
  <value>
4972
4932
  <strValue></strValue>
@@ -1199,7 +1199,7 @@ const getUser = async (baseEntity, uid, attributes) => { // uid = id, userName (
1199
1199
  (async () => {
1200
1200
  // const [attrs] = scimgateway.endpointMapper('outbound', attributes, config.map.user) // SCIM/CustomSCIM => endpoint attribute standard
1201
1201
  const method = 'GET'
1202
- const path = `/users/${querystring.escape(uid)}?$expand=manager($select=id)` // /beta returns all attributes or use: ?$select=${attrs.join()}
1202
+ const path = `/users/${querystring.escape(uid)}?$expand=manager($select=userPrincipalName)` // beta returns all attributes or use: ?$select=${attrs.join()}
1203
1203
  const body = null
1204
1204
  try {
1205
1205
  const response = await doRequest(baseEntity, method, path, body)
@@ -1210,7 +1210,7 @@ const getUser = async (baseEntity, uid, attributes) => { // uid = id, userName (
1210
1210
  }
1211
1211
 
1212
1212
  let managerId
1213
- if (userObj.manager && userObj.manager.id) managerId = userObj.manager.id
1213
+ if (userObj.manager && userObj.manager.userPrincipalName) managerId = userObj.manager.userPrincipalName
1214
1214
  delete userObj.manager
1215
1215
  if (managerId) userObj.manager = managerId
1216
1216
 
package/lib/utils.js CHANGED
@@ -388,3 +388,22 @@ module.exports.fsExistsSync = function (f) {
388
388
  return false
389
389
  }
390
390
  }
391
+
392
+ // createRandomPassword creates a random password, syntax:
393
+ // utils.createRandomPassword(12) => 12 characters, lower, upper and special
394
+ // utils.createRandomPassword(12, utils.createRandomPassword.alphaLower)
395
+ // https://gist.github.com/6174/6062387
396
+ module.exports.createRandomPassword = (function () {
397
+ const gen = (min, max) => max++ && [...Array(max - min)].map((s, i) => String.fromCharCode(min + i))
398
+ const sets = {
399
+ num: gen(48, 57),
400
+ alphaLower: gen(97, 122),
401
+ alphaUpper: gen(65, 90),
402
+ special: [...'~!@#$%^&*()_+-=[]{}|;:\'",./<>?']
403
+ }
404
+ function * iter (len, set) {
405
+ if (set.length < 1) { set = Object.values(sets).flat() }
406
+ for (let i = 0; i < len; i++) { yield set[Math.random() * set.length | 0] }
407
+ }
408
+ return Object.assign((len, ...set) => [...iter(len, set.flat())].join(''), sets)
409
+ }())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "4.1.8",
3
+ "version": "4.1.9",
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",