scimgateway 4.1.10 → 4.1.11

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
@@ -1146,6 +1146,12 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1146
1146
 
1147
1147
  ## Change log
1148
1148
 
1149
+ ### v4.1.11
1150
+
1151
+ [Fixed]
1152
+
1153
+ - basic auth logon dialog should not show up when not configured
1154
+
1149
1155
  ### v4.1.10
1150
1156
 
1151
1157
  [Added]
@@ -123,7 +123,7 @@ const ScimGateway = function () {
123
123
  logger.error(`${gwName}[${pluginName}] getPassword error: ${err.message}`)
124
124
  throw err // above logger.error included because this unhanledExcepton will be handled by winston and may fail with an other internal winston error e.g. related to memoryUsage collection logic when running in unikernel
125
125
  }
126
- if (arr[i].password) foundBasic = true
126
+ if (arr[i].username && arr[i].password) foundBasic = true
127
127
  }
128
128
  if (!foundBasic) config.auth.basic = []
129
129
  }
@@ -223,7 +223,7 @@ const ScimGateway = function () {
223
223
  if (config.certificate.pfx.password) pwPfxPassword = ScimGateway.prototype.getPassword('scimgateway.certificate.pfx.password', configFile)
224
224
  if (config.emailOnError.smtp.password) config.emailOnError.smtp.password = ScimGateway.prototype.getPassword('scimgateway.emailOnError.smtp.password', configFile)
225
225
 
226
- if (!foundBasic && !foundBearerToken && !foundBearerJwtAzure && !foundBearerJwt) {
226
+ if (!foundBasic && !foundBearerToken && !foundBearerJwtAzure && !foundBearerJwt && !foundBearerOAuth) {
227
227
  logger.error(`${gwName}[${pluginName}] Scimgateway password decryption failed or no password defined`)
228
228
  logger.error(`${gwName}[${pluginName}] stopping...\n`)
229
229
  throw (new Error('Using exception to stop further asynchronous code execution (ensure synchronous logger flush to logfile and exit program), please ignore this one...'))
@@ -505,7 +505,7 @@ const ScimGateway = function () {
505
505
  logger.debug(`${gwName}[${pluginName}] request jwt.decode(authToken) = ${JSON.stringify(jwt.decode(authToken))}`)
506
506
  }
507
507
  if (authType === 'Bearer') ctx.set('WWW-Authenticate', 'Bearer realm=""')
508
- else ctx.set('WWW-Authenticate', 'Basic realm=""')
508
+ else if (foundBasic) ctx.set('WWW-Authenticate', 'Basic realm=""')
509
509
  ctx.set('Content-Type', 'application/json; charset=utf-8')
510
510
  ctx.status = 401
511
511
  ctx.body = { error: 'Access denied' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "4.1.10",
3
+ "version": "4.1.11",
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",