@superhero/eventflow-certificates 4.7.18 → 4.7.19

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ---
2
+ #### v4.7.19
3
+ ---
4
+
5
+ ...
6
+
1
7
  ---
2
8
  #### v4.7.18
3
9
  ---
package/config.js CHANGED
@@ -3,14 +3,20 @@
3
3
  */
4
4
  export default
5
5
  {
6
- certificates:
6
+ eventflow:
7
7
  {
8
- CERT_ALGORITHM : process.env.EVENTFLOW_CERT_ALGORITHM,
9
- CERT_HASH : process.env.EVENTFLOW_CERT_HASH,
10
- CERT_PASS_CIPHER : process.env.EVENTFLOW_CERT_PASS_CIPHER,
11
- CERT_PASS_ENCRYPTION_KEY : process.env.EVENTFLOW_CERT_PASS_ENCRYPTION_KEY,
12
- CERT_PASS_PBKDF2_HASH : process.env.EVENTFLOW_CERT_PASS_PBKDF2_HASH,
13
- CERT_PASS_PBKDF2_BYTES : process.env.EVENTFLOW_CERT_PASS_PBKDF2_BYTES,
14
- CERT_PASS_PBKDF2_ITERATIONS : process.env.EVENTFLOW_CERT_PASS_PBKDF2_ITERATIONS,
8
+ certificates:
9
+ {
10
+ CERT_PASS_ENCRYPTION_KEY : process.env.EVENTFLOW_CERT_PASS_ENCRYPTION_KEY,
11
+ CERT_ALGORITHM : process.env.EVENTFLOW_CERT_ALGORITHM ?? 'EdDSA:Ed448',
12
+ CERT_HASH : process.env.EVENTFLOW_CERT_HASH ?? 'SHA512',
13
+ CERT_PASS_CIPHER : process.env.EVENTFLOW_CERT_PASS_CIPHER ?? 'aes-256-gcm',
14
+ CERT_ROOT_DAYS : process.env.EVENTFLOW_CERT_ROOT_DAYS ?? '365',
15
+ CERT_INTERMEDIATE_DAYS : process.env.EVENTFLOW_CERT_INTERMEDIATE_DAYS ?? '30',
16
+ CERT_LEAF_DAYS : process.env.EVENTFLOW_CERT_LEAF_DAYS ?? '7',
17
+ CERT_PASS_PBKDF2_HASH : process.env.EVENTFLOW_CERT_PASS_PBKDF2_HASH ?? 'sha512',
18
+ CERT_PASS_PBKDF2_BYTES : process.env.EVENTFLOW_CERT_PASS_PBKDF2_BYTES ?? '32',
19
+ CERT_PASS_PBKDF2_ITERATIONS : process.env.EVENTFLOW_CERT_PASS_PBKDF2_ITERATIONS ?? '1000000'
20
+ }
15
21
  }
16
22
  }
package/index.js CHANGED
@@ -2,6 +2,7 @@ import crypto from 'node:crypto'
2
2
  import Log from '@superhero/log'
3
3
  import OpenSSL from '@superhero/openssl'
4
4
  import deepassign from '@superhero/deep/assign'
5
+ import config from '@superhero/config'
5
6
 
6
7
  /**
7
8
  * @memberof Eventflow
@@ -11,18 +12,7 @@ export default class Certificates
11
12
  #db
12
13
  #map = new Map()
13
14
  openSSL = new OpenSSL()
14
- config =
15
- {
16
- CERT_ALGORITHM : OpenSSL.ALGO.EdDSAEd448,
17
- CERT_HASH : OpenSSL.HASH.SHA512,
18
- CERT_ROOT_DAYS : 365,
19
- CERT_INTERMEDIATE_DAYS : 30,
20
- CERT_LEAF_DAYS : 7,
21
- CERT_PASS_CIPHER : 'aes-256-gcm',
22
- CERT_PASS_PBKDF2_HASH : 'sha512',
23
- CERT_PASS_PBKDF2_BYTES : 32,
24
- CERT_PASS_PBKDF2_ITERATIONS : 1e6
25
- }
15
+ config = structuredClone(config)
26
16
 
27
17
  constructor(intermediateUID, leafUID, config, db)
28
18
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-certificates",
3
- "version": "4.7.18",
3
+ "version": "4.7.19",
4
4
  "description": "Eventflow certificates is common tls certificates logic used in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow"
@@ -18,15 +18,15 @@
18
18
  "test": "syntax-check; node --test --test-reporter=@superhero/audit/reporter --experimental-test-coverage"
19
19
  },
20
20
  "dependencies": {
21
- "@superhero/log": "4.7.18",
22
- "@superhero/openssl": "4.7.18",
23
- "@superhero/deep": "4.7.18"
21
+ "@superhero/log": "4.7.19",
22
+ "@superhero/openssl": "4.7.19",
23
+ "@superhero/deep": "4.7.19"
24
24
  },
25
25
  "devDependencies": {
26
- "@superhero/audit": "4.7.18",
26
+ "@superhero/audit": "4.7.19",
27
27
  "@superhero/syntax-check": "0.0.2",
28
- "@superhero/eventflow-db": "4.7.18",
29
- "@superhero/locator": "4.7.18"
28
+ "@superhero/eventflow-db": "4.7.19",
29
+ "@superhero/locator": "4.7.19"
30
30
  },
31
31
  "author": {
32
32
  "name": "Erik Landvall",