@continuoussecuritytooling/keycloak-reporter 0.8.3 → 0.8.5

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,9 +1,30 @@
1
- ## [0.8.2](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.8.1...v0.8.2) (2023-12-15)
1
+ ## [0.8.5](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.8.4...v0.8.5) (2024-01-29)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * Fix GitHub pipeline
6
+ * **Config:** Correcting TypeError on empty defaults ([c15a76a](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/c15a76ade89cea682d56085c1bd789df67dc81e8))
7
+
8
+
9
+
10
+ ## [0.8.4](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/0.8.4...v0.8.4) (2024-01-26)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **deps:** update dependency @continuoussecuritytooling/keycloak-auditor to v1.1.5 ([003b858](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/003b858aa36c34900fabe166ab318cd6d08399fe))
16
+ * **deps:** update dependency @json2csv/node to v7.0.5 ([a391e73](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/a391e73b10c0b89b2ab47b96967e7432cf1821a9))
17
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v23.0.3 ([e349e5b](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/e349e5b291b133ee3c781be5237f13cd48c87b30))
18
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v23.0.4 ([025eca3](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/025eca33069909a2897f28f52c948fb7a0aef039))
19
+ * **deps:** update dependency @slack/webhook to v7.0.2 ([0a3519a](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/0a3519ade828f9c05b963adf894c7ee22b2c6edd))
20
+ * **deps:** update dependency npm to v10.3.0 ([371d62b](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/371d62bcedc0aea9b878d1432642e9a5c4cfadf9))
21
+ * **deps:** update dependency openid-client to v5.6.2 ([26809d4](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/26809d4b8d2154bf3f38bb5d004d0d59f754ed7d))
22
+ * **deps:** update dependency openid-client to v5.6.4 ([cf2e15f](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/cf2e15f3bb85a70157acc2807947320dac5059f6))
23
+
24
+
25
+
26
+ ## [0.8.2](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.8.1...v0.8.2) (2023-12-15)
27
+
7
28
 
8
29
 
9
30
  ## [0.8.1](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.8.0...v0.8.1) (2023-12-15)
@@ -18,9 +39,6 @@
18
39
 
19
40
  # [0.8.0](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.7.2...v0.8.0) (2023-12-14)
20
41
 
21
- ### Features
22
-
23
- * **Config:** Adding config validation and helm test hook ([c29e945](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/c29e945567b4dfcdc9a10e710efa2b1a8c00f970))
24
42
 
25
43
  ### Bug Fixes
26
44
 
@@ -33,6 +51,12 @@
33
51
  * **deps:** update dependency npm to v10.2.5 ([52a3c8b](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/52a3c8b48cbf0ee0d795aa00a9af36291025ae05))
34
52
 
35
53
 
54
+ ### Features
55
+
56
+ * **Config:** Adding config validation and helm test hook ([c29e945](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/c29e945567b4dfcdc9a10e710efa2b1a8c00f970))
57
+
58
+
59
+
36
60
  ## [0.7.2](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.7.1...v0.7.2) (2023-11-16)
37
61
 
38
62
 
@@ -15,14 +15,14 @@ type: application
15
15
  # This is the chart version. This version number should be incremented each time you make changes
16
16
  # to the chart and its templates, including the app version.
17
17
  # Versions are expected to follow Semantic Versioning (https://semver.org/)
18
- version: 1.2.3
18
+ version: 1.2.4
19
19
 
20
20
  # This is the version number of the application being deployed. This version number should be
21
21
  # incremented each time you make changes to the application. Versions are not expected to
22
22
  # follow Semantic Versioning. They should reflect the version the application is using.
23
23
  # It is recommended to use it with quotes.
24
24
  # renovate: datasource=docker depName=ContinuousSecurityTooling/keycloak-reporter
25
- appVersion: '0.8.2'
25
+ appVersion: '0.8.5'
26
26
  maintainers:
27
27
  # Martin Reinhardt
28
28
  - name: hypery2k
package/cli.ts CHANGED
@@ -1,105 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { writeFileSync } from 'node:fs';
4
- import path from 'path';
5
3
  import yargs from 'yargs/yargs';
6
4
  import { hideBin } from 'yargs/helpers';
7
- import { configTest, listUsers, listClients, Options, convertJSON2CSV, post2Webhook } from './index.js';
5
+ import { convert } from './lib/report.js';
6
+ import { getConvertConfig, getKeycloakConfig } from './lib/utils.js';
7
+ import { configTest, listUsers, listClients } from './index.js';
8
8
  import config from './src/config.js';
9
- class WebhookConfig {
10
- type: string;
11
- url: string;
12
- title: string;
13
- message?: string;
14
- constructor(type: string, url: string, title: string, message?: string) {
15
- this.type = type;
16
- this.url = url;
17
- this.title = title;
18
- this.message = message;
19
- }
20
- }
21
-
22
- class ReportConfig {
23
- name: string;
24
- directory: string;
25
- }
26
-
27
- function getKeycloakConfig(config, argv): Options {
28
- return {
29
- clientId: config.clientId ? config.clientId : (argv.clientId as string),
30
- clientSecret: config.clientSecret ? config.clientSecret : (argv.clientSecret as string),
31
- rootUrl: config.url ? config.url : (argv.url as string),
32
- useAuditingEndpoint: argv.useAuditingEndpoint == true || config.useAuditingEndpoint.toLowerCase() == 'true',
33
- };
34
- }
35
-
36
- function convertData(config, argv, name: string, title: string, json: object) {
37
- convert(
38
- config.format ? config.format : (argv.format as string),
39
- config.output ? config.output : (argv.output as string),
40
- {
41
- name,
42
- directory: argv.reports ? (argv.reports as string) : config.reports,
43
- },
44
- new WebhookConfig(
45
- config.webhookType ? config.webhookType : (argv.webhookType as string),
46
- config.webhookUrl ? config.webhookUrl : (argv.webhookUrl as string),
47
- title,
48
- config.webhookMessage ? config.webhookMessage : (argv.webhookMessage as string)
49
- ),
50
- json
51
- );
52
- }
53
-
54
- async function convert(format: string, output: string, reports: ReportConfig, config: WebhookConfig, json: object) {
55
- let outputContent: string;
56
- switch (format) {
57
- case 'csv':
58
- outputContent = (await convertJSON2CSV(json)).toString();
59
- break;
60
- // defaulting to JSON
61
- default:
62
- outputContent = JSON.stringify(json);
63
- }
64
- if (reports.directory) {
65
- const date = new Date();
66
- writeFileSync(
67
- path.join(
68
- `${reports.directory}`,
69
- `${reports.name}_${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}.${format.toLowerCase()}`
70
- ),
71
- outputContent
72
- );
73
- }
74
- switch (output) {
75
- case 'webhook':
76
- if (!config.url) {
77
- console.error('No valid Webhook URL given');
78
- throw new Error('Please provide a valid --webhookUrl parameter');
79
- }
80
- try {
81
- console.log(`Sending report via webhook to ${config.type} ....`);
82
- await post2Webhook(config.type, config.url, config.title, outputContent, config.message);
83
- console.log('Done sending.');
84
- } catch (e) {
85
- switch (e.code || e.message) {
86
- case 'Request failed with status code 400':
87
- console.error('Invalid Teams Webhook Payload. Check your params.');
88
- throw new Error('Invalid Teams Payload');
89
- case 'slack_webhook_http_error':
90
- console.error('Invalid Slack Webhook Payload. Check your params.');
91
- throw new Error('Invalid Slack Payload');
92
- default:
93
- console.error(`Error during sending webhook.(${e?.code})`, e?.original);
94
- throw e;
95
- }
96
- }
97
- break;
98
- // defaulting to standard out
99
- default:
100
- console.log(outputContent);
101
- }
102
- }
103
9
 
104
10
  yargs(hideBin(process.argv))
105
11
  .env()
@@ -110,7 +16,7 @@ yargs(hideBin(process.argv))
110
16
  () => {},
111
17
  async (argv) => {
112
18
  const users = await listUsers(getKeycloakConfig(config, argv));
113
- convertData(config, argv, 'user_listing', 'User Listing', users);
19
+ convert(getConvertConfig(config, argv, 'user_listing', 'User Listing', users));
114
20
  }
115
21
  )
116
22
  .command(
@@ -120,7 +26,7 @@ yargs(hideBin(process.argv))
120
26
  () => {},
121
27
  async (argv) => {
122
28
  const clients = await listClients(getKeycloakConfig(config, argv));
123
- convertData(config, argv, 'client_listing', 'Client Listing', clients);
29
+ convert(getConvertConfig(config, argv, 'client_listing', 'Client Listing', clients));
124
30
  }
125
31
  )
126
32
  .option('format', {
@@ -167,6 +73,6 @@ yargs(hideBin(process.argv))
167
73
  'validates keycloak configuration by reading data via REST API',
168
74
  // eslint-disable-next-line @typescript-eslint/no-empty-function
169
75
  () => {},
170
- async (argv) => configTest(getKeycloakConfig(config, argv)),
76
+ async (argv) => configTest(getKeycloakConfig(config, argv))
171
77
  )
172
78
  .parse();
package/dist/cli.js CHANGED
@@ -1,91 +1,23 @@
1
1
  #!/usr/bin/env node
2
- import { writeFileSync } from 'node:fs';
3
- import path from 'path';
4
2
  import yargs from 'yargs/yargs';
5
3
  import { hideBin } from 'yargs/helpers';
6
- import { configTest, listUsers, listClients, convertJSON2CSV, post2Webhook } from './index.js';
4
+ import { convert } from './lib/report.js';
5
+ import { getConvertConfig, getKeycloakConfig } from './lib/utils.js';
6
+ import { configTest, listUsers, listClients } from './index.js';
7
7
  import config from './src/config.js';
8
- class WebhookConfig {
9
- constructor(type, url, title, message) {
10
- this.type = type;
11
- this.url = url;
12
- this.title = title;
13
- this.message = message;
14
- }
15
- }
16
- class ReportConfig {
17
- }
18
- function getKeycloakConfig(config, argv) {
19
- return {
20
- clientId: config.clientId ? config.clientId : argv.clientId,
21
- clientSecret: config.clientSecret ? config.clientSecret : argv.clientSecret,
22
- rootUrl: config.url ? config.url : argv.url,
23
- useAuditingEndpoint: argv.useAuditingEndpoint == true || config.useAuditingEndpoint.toLowerCase() == 'true',
24
- };
25
- }
26
- function convertData(config, argv, name, title, json) {
27
- convert(config.format ? config.format : argv.format, config.output ? config.output : argv.output, {
28
- name,
29
- directory: argv.reports ? argv.reports : config.reports,
30
- }, new WebhookConfig(config.webhookType ? config.webhookType : argv.webhookType, config.webhookUrl ? config.webhookUrl : argv.webhookUrl, title, config.webhookMessage ? config.webhookMessage : argv.webhookMessage), json);
31
- }
32
- async function convert(format, output, reports, config, json) {
33
- let outputContent;
34
- switch (format) {
35
- case 'csv':
36
- outputContent = (await convertJSON2CSV(json)).toString();
37
- break;
38
- // defaulting to JSON
39
- default:
40
- outputContent = JSON.stringify(json);
41
- }
42
- if (reports.directory) {
43
- const date = new Date();
44
- writeFileSync(path.join(`${reports.directory}`, `${reports.name}_${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}.${format.toLowerCase()}`), outputContent);
45
- }
46
- switch (output) {
47
- case 'webhook':
48
- if (!config.url) {
49
- console.error('No valid Webhook URL given');
50
- throw new Error('Please provide a valid --webhookUrl parameter');
51
- }
52
- try {
53
- console.log(`Sending report via webhook to ${config.type} ....`);
54
- await post2Webhook(config.type, config.url, config.title, outputContent, config.message);
55
- console.log('Done sending.');
56
- }
57
- catch (e) {
58
- switch (e.code || e.message) {
59
- case 'Request failed with status code 400':
60
- console.error('Invalid Teams Webhook Payload. Check your params.');
61
- throw new Error('Invalid Teams Payload');
62
- case 'slack_webhook_http_error':
63
- console.error('Invalid Slack Webhook Payload. Check your params.');
64
- throw new Error('Invalid Slack Payload');
65
- default:
66
- console.error(`Error during sending webhook.(${e === null || e === void 0 ? void 0 : e.code})`, e === null || e === void 0 ? void 0 : e.original);
67
- throw e;
68
- }
69
- }
70
- break;
71
- // defaulting to standard out
72
- default:
73
- console.log(outputContent);
74
- }
75
- }
76
8
  yargs(hideBin(process.argv))
77
9
  .env()
78
10
  .command('listUsers [url] [clientId] [clientSecret]', 'fetches all users in the realms.',
79
11
  // eslint-disable-next-line @typescript-eslint/no-empty-function
80
12
  () => { }, async (argv) => {
81
13
  const users = await listUsers(getKeycloakConfig(config, argv));
82
- convertData(config, argv, 'user_listing', 'User Listing', users);
14
+ convert(getConvertConfig(config, argv, 'user_listing', 'User Listing', users));
83
15
  })
84
16
  .command('listClients [url] [clientId] [clientSecret]', 'fetches all clients in the realms.',
85
17
  // eslint-disable-next-line @typescript-eslint/no-empty-function
86
18
  () => { }, async (argv) => {
87
19
  const clients = await listClients(getKeycloakConfig(config, argv));
88
- convertData(config, argv, 'client_listing', 'Client Listing', clients);
20
+ convert(getConvertConfig(config, argv, 'client_listing', 'Client Listing', clients));
89
21
  })
90
22
  .option('format', {
91
23
  alias: 'f',
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAW,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxG,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,MAAM,aAAa;IAKjB,YAAY,IAAY,EAAE,GAAW,EAAE,KAAa,EAAE,OAAgB;QACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,YAAY;CAGjB;AAED,SAAS,iBAAiB,CAAC,MAAM,EAAE,IAAI;IACrC,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAE,IAAI,CAAC,QAAmB;QACvE,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC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,EAAE,gBAAgB;CAC9B,CAAC;KACD,MAAM,CAAC,aAAa,EAAE;IACrB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,cAAc;CAC5B,CAAC;KACD,MAAM,CAAC,gBAAgB,EAAE;IACxB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,iBAAiB;CAC/B,CAAC;KACD,MAAM,CAAC,YAAY,EAAE;IACpB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,aAAa;CAC3B,CAAC;KACD,MAAM,CAAC,SAAS,EAAE;IACjB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,mBAAmB;CACjC,CAAC;KACD,MAAM,CAAC,qBAAqB,EAAE;IAC7B,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,4BAA4B;CAC1C,CAAC;KACD,OAAO,CACN,4CAA4C,EAC5C,+DAA+D;AAC/D,gEAAgE;AAChE,GAAG,EAAE,GAAE,CAAC,EACR,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAC5D;KACA,KAAK,EAAE,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { writeFileSync } from 'node:fs';
2
+ import path from 'path';
3
+ import { convertJSON2CSV } from './convert.js';
4
+ import { post2Webhook } from './output.js';
5
+ export async function convert(cfg) {
6
+ let outputContent;
7
+ switch (cfg.format) {
8
+ case 'csv':
9
+ outputContent = (await convertJSON2CSV(cfg.json)).toString();
10
+ break;
11
+ // defaulting to JSON
12
+ default:
13
+ outputContent = JSON.stringify(cfg.json);
14
+ }
15
+ if (cfg.reports.directory) {
16
+ const date = new Date();
17
+ writeFileSync(path.join(`${cfg.reports.directory}`, `${cfg.reports.name}_${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}.${cfg.format.toLowerCase()}`), outputContent);
18
+ }
19
+ switch (cfg.output) {
20
+ case 'webhook':
21
+ if (!cfg.config.url) {
22
+ console.error('No valid Webhook URL given');
23
+ throw new Error('Please provide a valid --webhookUrl parameter');
24
+ }
25
+ try {
26
+ console.log(`Sending report via webhook to ${cfg.config.type} ....`);
27
+ await post2Webhook(cfg.config.type, cfg.config.url, cfg.config.title, outputContent, cfg.config.message);
28
+ console.log('Done sending.');
29
+ }
30
+ catch (e) {
31
+ switch (e.code || e.message) {
32
+ case 'Request failed with status code 400':
33
+ console.error('Invalid Teams Webhook Payload. Check your params.');
34
+ throw new Error('Invalid Teams Payload');
35
+ case 'slack_webhook_http_error':
36
+ console.error('Invalid Slack Webhook Payload. Check your params.');
37
+ throw new Error('Invalid Slack Payload');
38
+ default:
39
+ console.error(`Error during sending webhook.(${e === null || e === void 0 ? void 0 : e.code})`, e === null || e === void 0 ? void 0 : e.original);
40
+ throw e;
41
+ }
42
+ }
43
+ break;
44
+ // defaulting to standard out
45
+ default:
46
+ console.log(outputContent);
47
+ }
48
+ }
49
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../lib/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAkB;IAC9C,IAAI,aAAqB,CAAC;IAC1B,QAAQ,GAAG,CAAC,MAAM,EAAE,CAAC;QACnB,KAAK,KAAK;YACR,aAAa,GAAG,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,C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C5B,KAAK,qCAAqC;wBACxC,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;wBACnE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,KAAK,0BAA0B;wBAC7B,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;wBACnE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C;wBACE,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,GAAG,EAAE,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,QAAQ,CAAC,CAAC;wBACxE,MAAM,CAAC,CAAC;gBACZ,CAAC;YACH,CAAC;YACD,MAAM;QACR,6BAA6B;QAC7B;YACE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
@@ -0,0 +1,35 @@
1
+ export class WebhookConfig {
2
+ constructor(type, url, title, message) {
3
+ this.type = type;
4
+ this.url = url;
5
+ this.title = title;
6
+ this.message = message;
7
+ }
8
+ }
9
+ class ReportConfig {
10
+ }
11
+ export class ConvertConfig {
12
+ constructor(format, output, reports, config, json) {
13
+ this.format = format;
14
+ this.output = output;
15
+ this.reports = reports;
16
+ this.config = config;
17
+ this.json = json;
18
+ }
19
+ }
20
+ export function getConvertConfig(config, argv, name, title, json) {
21
+ return new ConvertConfig(config.format ? config.format : argv.format, config.output ? config.output : argv.output, {
22
+ name,
23
+ directory: argv.reports ? argv.reports : config.reports,
24
+ }, new WebhookConfig(config.webhookType ? config.webhookType : argv.webhookType, config.webhookUrl ? config.webhookUrl : argv.webhookUrl, title, config.webhookMessage ? config.webhookMessage : argv.webhookMessage), json);
25
+ }
26
+ export function getKeycloakConfig(config, argv) {
27
+ var _a;
28
+ return {
29
+ clientId: config.clientId ? config.clientId : argv === null || argv === void 0 ? void 0 : argv.clientId,
30
+ clientSecret: config.clientSecret ? config.clientSecret : argv === null || argv === void 0 ? void 0 : argv.clientSecret,
31
+ rootUrl: config.url ? config.url : argv === null || argv === void 0 ? void 0 : argv.url,
32
+ useAuditingEndpoint: (argv === null || argv === void 0 ? void 0 : argv.useAuditingEndpoint) == true || ((_a = config.useAuditingEndpoint) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'true',
33
+ };
34
+ }
35
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,aAAa;IAKxB,YAAY,IAAY,EAAE,GAAW,EAAE,KAAa,EAAE,OAAgB;QACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,YAAY;CAGjB;AAED,MAAM,OAAO,aAAa;IAMxB,YAAY,MAAc,EAAE,MAAc,EAAE,OAAqB,EAAE,MAAqB,EAAE,IAAY;QACpG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AACD,MAAM,UAAU,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAY,EAAE,KAAa,EAAE,IAAY;IACtF,OAAO,IAAI,aAAa,CACtB,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAE,IAAI,CAAC,MAAiB,EACvD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAE,IAA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+ import path from 'path';
3
+ import { convertJSON2CSV } from './convert.js';
4
+ import { post2Webhook } from './output.js';
5
+ import { ConvertConfig } from './utils.js';
6
+
7
+ export async function convert(cfg: ConvertConfig) {
8
+ let outputContent: string;
9
+ switch (cfg.format) {
10
+ case 'csv':
11
+ outputContent = (await convertJSON2CSV(cfg.json)).toString();
12
+ break;
13
+ // defaulting to JSON
14
+ default:
15
+ outputContent = JSON.stringify(cfg.json);
16
+ }
17
+ if (cfg.reports.directory) {
18
+ const date = new Date();
19
+ writeFileSync(
20
+ path.join(
21
+ `${cfg.reports.directory}`,
22
+ `${cfg.reports.name}_${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}.${cfg.format.toLowerCase()}`
23
+ ),
24
+ outputContent
25
+ );
26
+ }
27
+ switch (cfg.output) {
28
+ case 'webhook':
29
+ if (!cfg.config.url) {
30
+ console.error('No valid Webhook URL given');
31
+ throw new Error('Please provide a valid --webhookUrl parameter');
32
+ }
33
+ try {
34
+ console.log(`Sending report via webhook to ${cfg.config.type} ....`);
35
+ await post2Webhook(cfg.config.type, cfg.config.url, cfg.config.title, outputContent, cfg.config.message);
36
+ console.log('Done sending.');
37
+ } catch (e) {
38
+ switch (e.code || e.message) {
39
+ case 'Request failed with status code 400':
40
+ console.error('Invalid Teams Webhook Payload. Check your params.');
41
+ throw new Error('Invalid Teams Payload');
42
+ case 'slack_webhook_http_error':
43
+ console.error('Invalid Slack Webhook Payload. Check your params.');
44
+ throw new Error('Invalid Slack Payload');
45
+ default:
46
+ console.error(`Error during sending webhook.(${e?.code})`, e?.original);
47
+ throw e;
48
+ }
49
+ }
50
+ break;
51
+ // defaulting to standard out
52
+ default:
53
+ console.log(outputContent);
54
+ }
55
+ }
package/lib/utils.ts ADDED
@@ -0,0 +1,60 @@
1
+ import { Options } from './client.js';
2
+
3
+ export class WebhookConfig {
4
+ type: string;
5
+ url: string;
6
+ title: string;
7
+ message?: string;
8
+ constructor(type: string, url: string, title: string, message?: string) {
9
+ this.type = type;
10
+ this.url = url;
11
+ this.title = title;
12
+ this.message = message;
13
+ }
14
+ }
15
+
16
+ class ReportConfig {
17
+ name: string;
18
+ directory: string;
19
+ }
20
+
21
+ export class ConvertConfig {
22
+ format: string;
23
+ output: string;
24
+ reports: ReportConfig;
25
+ config: WebhookConfig;
26
+ json: object;
27
+ constructor(format: string, output: string, reports: ReportConfig, config: WebhookConfig, json: object) {
28
+ this.format = format;
29
+ this.output = output;
30
+ this.reports = reports;
31
+ this.config = config;
32
+ this.json = json;
33
+ }
34
+ }
35
+ export function getConvertConfig(config, argv, name: string, title: string, json: object): ConvertConfig {
36
+ return new ConvertConfig(
37
+ config.format ? config.format : (argv.format as string),
38
+ config.output ? config.output : (argv.output as string),
39
+ {
40
+ name,
41
+ directory: argv.reports ? (argv.reports as string) : config.reports,
42
+ },
43
+ new WebhookConfig(
44
+ config.webhookType ? config.webhookType : (argv.webhookType as string),
45
+ config.webhookUrl ? config.webhookUrl : (argv.webhookUrl as string),
46
+ title,
47
+ config.webhookMessage ? config.webhookMessage : (argv.webhookMessage as string)
48
+ ),
49
+ json
50
+ );
51
+ }
52
+
53
+ export function getKeycloakConfig(config, argv): Options {
54
+ return {
55
+ clientId: config.clientId ? config.clientId : (argv?.clientId as string),
56
+ clientSecret: config.clientSecret ? config.clientSecret : (argv?.clientSecret as string),
57
+ rootUrl: config.url ? config.url : (argv?.url as string),
58
+ useAuditingEndpoint: argv?.useAuditingEndpoint == true || config.useAuditingEndpoint?.toLowerCase() == 'true',
59
+ };
60
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@continuoussecuritytooling/keycloak-reporter",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Reporting Tools for Keycloak",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -0,0 +1,10 @@
1
+ /// <reference types="jest-extended" />
2
+ import { getKeycloakConfig } from '../lib/utils';
3
+ test('no config', async () => {
4
+ expect(getKeycloakConfig({}, null)).toEqual({
5
+ clientId: undefined,
6
+ clientSecret: undefined,
7
+ rootUrl: undefined,
8
+ useAuditingEndpoint: false,
9
+ });
10
+ });