@contrast/config 1.41.0 → 1.43.0

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/lib/index.d.ts CHANGED
@@ -76,6 +76,19 @@ export interface Config {
76
76
  /** No default value but required when `api.enable` is `true` */
77
77
  user_name: string;
78
78
 
79
+ certificate: {
80
+ /** If set to `false`, the agent will ignore the certificate configuration in this section. Default: `true` */
81
+ enable: boolean;
82
+ /** Set the absolute or relative path to a CA for communication with the Contrast UI using a self-signed certificate. */
83
+ ca_file?: string;
84
+ /** Set the absolute or relative path to the Certificate PEM file for communication with the Contrast UI. */
85
+ cert_file?: string;
86
+ /** Set the absolute or relative path to the Key PEM file for communication with the Contrast UI. */
87
+ key_file?: string;
88
+ /** When set to `true`, the agent ignores certificate verification errors when the agent communicates with the Contrast UI. Default: `false` */
89
+ ignore_cert_errors: boolean;
90
+ };
91
+
79
92
  proxy: {
80
93
  /** Default: `false` */
81
94
  enable: boolean;
package/lib/options.js CHANGED
@@ -185,6 +185,37 @@ const options = [
185
185
  }
186
186
  }
187
187
  },
188
+ // api.certificate
189
+ {
190
+ name: 'api.certificate.enable',
191
+ desc: 'If set to `false`, the agent will ignore the certificate configuration in this section.',
192
+ arg: '[false]',
193
+ default: true,
194
+ },
195
+ {
196
+ name: 'api.certificate.ca_file',
197
+ description: 'Set the absolute or relative path to a CA for communication with the Contrast UI using a self-signed certificate.',
198
+ arg: '<path>',
199
+ fn: toAbsolutePath,
200
+ },
201
+ {
202
+ name: 'api.certificate.cert_file',
203
+ description: 'Set the absolute or relative path to the Certificate PEM file for communication with the Contrast UI.',
204
+ arg: '<path>',
205
+ fn: toAbsolutePath,
206
+ },
207
+ {
208
+ name: 'api.certificate.key_file',
209
+ description: 'Set the absolute or relative path to the Key PEM file for communication with the Contrast UI.',
210
+ arg: '<path>',
211
+ fn: toAbsolutePath,
212
+ },
213
+ {
214
+ name: 'api.certificate.ignore_cert_errors',
215
+ description: 'When set to `true`, the agent ignores certificate verification errors when the agent communicates with the Contrast UI.',
216
+ arg: '[true]',
217
+ default: false,
218
+ },
188
219
  // api.proxy
189
220
  {
190
221
  name: 'api.proxy.enable',
@@ -645,6 +676,21 @@ Example - \`label1, label2, label3\``,
645
676
  enum: ['monitor', 'block', 'block_at_perimeter', 'off'],
646
677
  desc: 'Set the mode of the rule. Value options are `monitor`, `block`, `block_at_perimeter`, or `off`.',
647
678
  })),
679
+ // observability
680
+ {
681
+ name: 'observe.enable',
682
+ arg: '[true]',
683
+ default: false, // TODO: Default true when MVP is done
684
+ fn: castBoolean,
685
+ desc: 'Lightweight and low overhead observation mode for the agent.',
686
+ },
687
+ {
688
+ name: 'observe.periodic_export_interval_ms',
689
+ arg: '[true]',
690
+ default: 60000,
691
+ fn: parseNum,
692
+ desc: 'Interval the metrics are flushed to the upstream collector.',
693
+ },
648
694
  // application
649
695
  {
650
696
  name: 'application.name',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.41.0",
3
+ "version": "1.43.0",
4
4
  "description": "An API for discovering Contrast agent configuration data",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -20,7 +20,7 @@
20
20
  "test": "../scripts/test.sh"
21
21
  },
22
22
  "dependencies": {
23
- "@contrast/common": "1.30.0",
23
+ "@contrast/common": "1.32.0",
24
24
  "yaml": "^2.2.2"
25
25
  }
26
26
  }