@codefresh-io/service-base 3.0.25 → 3.0.27

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/infra/config.js CHANGED
@@ -140,9 +140,22 @@ base.redis = {
140
140
  port: process.env.REDIS_PORT || 6379,
141
141
  password: process.env.REDIS_PASSWORD || 'redisPassword',
142
142
  db: process.env.REDIS_DB || 1,
143
- tls: process.env.REDIS_TLS === 'true' ? {} : undefined,
144
143
  };
145
144
 
145
+ if (process.env.REDIS_TLS === 'true') {
146
+ if (process.env.REDIS_CLIENT_CERT_PATH && process.env.REDIS_CA_PATH && process.env.REDIS_CLIENT_KEY_PATH) {
147
+ const redisCaCredentials = fs.readFileSync(process.env.REDIS_CA_PATH);
148
+ const redisCertCredentials = fs.readFileSync(process.env.REDIS_CLIENT_CERT_PATH);
149
+ const redisKeyCredentials = fs.readFileSync(process.env.REDIS_CLIENT_KEY_PATH);
150
+ _.set(base, 'redis.tls.ca', redisCaCredentials);
151
+ _.set(base, 'redis.tls.cert', redisCertCredentials);
152
+ _.set(base, 'redis.tls.key', redisKeyCredentials);
153
+ // if not passing rejectUnauthorized -- default value set to true
154
+ _.set(base, 'redis.tls.rejectUnauthorized', process.env.REDIS_REJECT_UNAUTHORIZED !== 'false');
155
+ } else {
156
+ base.redis.tls = {};
157
+ }
158
+ }
146
159
 
147
160
  // This timers are associated with termination signals the service should handle
148
161
  // 1. The grace period should first of all know that no more requests will be forward to the process
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefresh-io/service-base",
3
- "version": "3.0.25",
3
+ "version": "3.0.27",
4
4
  "main": "index.js",
5
5
  "description": "",
6
6
  "bin": {
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "homepage": "https://github.com/codefresh-io/service-base#readme",
30
30
  "dependencies": {
31
- "@codefresh-io/authenticated-entity": "^2.13.1",
31
+ "@codefresh-io/authenticated-entity": "^2.16.0",
32
32
  "@codefresh-io/cf-monitor": "^0.0.24",
33
33
  "@codefresh-io/cf-openapi": "^0.7.16",
34
34
  "@codefresh-io/eventbus": "1.4.3",
35
- "@codefresh-io/http-infra": "^1.8.12",
35
+ "@codefresh-io/http-infra": "^1.8.13",
36
36
  "@codefresh-io/internal-service-config": "^1.0.3",
37
37
  "@ronomon/crypto-async": "^5.0.1",
38
38
  "@wegolook/joi-objectid": "^2.4.0",
package/yarn.lock CHANGED
@@ -278,11 +278,12 @@
278
278
  exec-sh "^0.3.2"
279
279
  minimist "^1.2.0"
280
280
 
281
- "@codefresh-io/authenticated-entity@^2.13.1", "@codefresh-io/authenticated-entity@^2.13.3":
282
- version "2.14.2"
283
- resolved "https://registry.yarnpkg.com/@codefresh-io/authenticated-entity/-/authenticated-entity-2.14.2.tgz#c48322fb3bf7a1f476d0d57f305112384df0cf51"
284
- integrity sha512-5jkJ8geEM3+W4QeRnjBGnD4uXqPsqchHxpEYlqFyPYBACNiaxiLr1a04r+YHS5D40ZDhTYI1DnUsYvPbe9iHVw==
281
+ "@codefresh-io/authenticated-entity@^2.16.0":
282
+ version "2.16.0"
283
+ resolved "https://registry.yarnpkg.com/@codefresh-io/authenticated-entity/-/authenticated-entity-2.16.0.tgz#049885a7f49a801591f3261d08357a4ebf5756f6"
284
+ integrity sha512-Mzej+Qlk0PI6LEZFaWxe9GNZj69sSxZQUHlXO4ON2zwujc0KuD3J+mESZpzVszvuc3b9utS6mxBcDmU+q8NPUQ==
285
285
  dependencies:
286
+ cf-logs "^1.1.26"
286
287
  lodash "^4.17.21"
287
288
  semver "^7.0.0"
288
289
 
@@ -325,12 +326,12 @@
325
326
  pg-cursor "^1.2.0"
326
327
  uuid "^3.0.1"
327
328
 
328
- "@codefresh-io/http-infra@^1.8.12":
329
- version "1.8.12"
330
- resolved "https://registry.yarnpkg.com/@codefresh-io/http-infra/-/http-infra-1.8.12.tgz#3e10344879968194e8583fb4ee140677500cfef1"
331
- integrity sha512-1h37Mn+XwYQ3O7uoT5L55Ur8P+dQLgOEie6UqahbvNON/7Wp9T7JmoRQpo4g2t14fhx1QFAX8cpx2ktTgFGFPg==
329
+ "@codefresh-io/http-infra@^1.8.13":
330
+ version "1.8.13"
331
+ resolved "https://registry.yarnpkg.com/@codefresh-io/http-infra/-/http-infra-1.8.13.tgz#8cd8bbb78b2c68153cf16c696255edfd3c924c10"
332
+ integrity sha512-Ebd5rUC8d9xmmNO8+82Wsh0CH7VuLasNcRBNjINI3CO5IU2rHUIQ5nZuUAD9G1/RoFrBAWcdAnO3fAYWYpkuaA==
332
333
  dependencies:
333
- "@codefresh-io/authenticated-entity" "^2.13.3"
334
+ "@codefresh-io/authenticated-entity" "^2.16.0"
334
335
  bluebird "^3.7.2"
335
336
  crypto-random-string "^3.3.0"
336
337
  lodash "^4.17.21"