@continuoussecuritytooling/keycloak-reporter 0.5.0 → 0.6.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/.ct.yaml CHANGED
@@ -2,5 +2,5 @@ chart-dirs:
2
2
  - charts/keycloak-reporter/
3
3
  debug: true
4
4
  target-branch: main
5
- check-version-increment: true
5
+ check-version-increment: false
6
6
  validate-maintainers: false
@@ -1,13 +1,16 @@
1
1
  name: Build
2
2
 
3
3
  on:
4
+ pull_request:
4
5
  merge_group:
5
6
  push:
7
+ branches:
8
+ - develop
6
9
 
7
10
  jobs:
8
11
  build:
9
- name: "Build and Test on Node ${{ matrix.node_version }} and ${{ matrix.os }}"
10
- runs-on: "${{ matrix.os }}"
12
+ name: 'Build and Test on Node ${{ matrix.node_version }} and ${{ matrix.os }}'
13
+ runs-on: '${{ matrix.os }}'
11
14
  strategy:
12
15
  matrix:
13
16
  node_version:
@@ -19,10 +22,10 @@ jobs:
19
22
  - windows-latest
20
23
  steps:
21
24
  - uses: actions/checkout@v4
22
- - name: "Use Node.js ${{ matrix.node_version }}"
25
+ - name: 'Use Node.js ${{ matrix.node_version }}'
23
26
  uses: actions/setup-node@v3
24
27
  with:
25
- node-version: "${{ matrix.node_version }}"
28
+ node-version: '${{ matrix.node_version }}'
26
29
  - name: npm build and test
27
30
  run: |
28
31
  npm run clean
@@ -30,7 +33,7 @@ jobs:
30
33
  npm run test
31
34
 
32
35
  chart:
33
- name: "Build and Test Helm Chart"
36
+ name: 'Build and Test Helm Chart'
34
37
  runs-on: ubuntu-latest
35
38
 
36
39
  steps:
@@ -46,7 +49,7 @@ jobs:
46
49
 
47
50
  - uses: actions/setup-python@v4
48
51
  with:
49
- python-version: "3.9"
52
+ python-version: '3.9'
50
53
  check-latest: true
51
54
 
52
55
  - name: Helm Chart Testing
@@ -62,7 +65,7 @@ jobs:
62
65
 
63
66
  - name: Run chart-testing (lint)
64
67
  if: steps.list-changed.outputs.changed == 'true'
65
- run: ct lint --target-branch ${{ github.event.repository.default_branch }} --check-version-increment false
68
+ run: ct lint --target-branch ${{ github.event.repository.default_branch }}
66
69
 
67
70
  - name: Create kind cluster
68
71
  if: steps.list-changed.outputs.changed == 'true'
@@ -78,26 +81,25 @@ jobs:
78
81
  path: dist
79
82
 
80
83
  end2end:
81
- name: "End2End Test on Node ${{ matrix.node_version }} and ${{ matrix.os }}"
82
- runs-on: "${{ matrix.os }}"
84
+ name: 'End2End Test on Node ${{ matrix.node_version }} and ${{ matrix.os }}'
85
+ runs-on: '${{ matrix.os }}'
83
86
  strategy:
84
87
  matrix:
85
88
  node_version:
86
89
  - 18
87
- - 20
88
90
  os:
89
91
  - ubuntu-latest
90
92
  steps:
91
93
  - uses: actions/checkout@v4
92
- - name: "Use Node.js ${{ matrix.node_version }}"
94
+ - name: 'Use Node.js ${{ matrix.node_version }}'
93
95
  uses: actions/setup-node@v3
94
96
  with:
95
- node-version: "${{ matrix.node_version }}"
97
+ node-version: '${{ matrix.node_version }}'
96
98
  - name: Install Java
97
99
  uses: actions/setup-java@v3
98
100
  with:
99
- distribution: "temurin" # See 'Supported distributions' for available options
100
- java-version: "17"
101
+ distribution: 'temurin' # See 'Supported distributions' for available options
102
+ java-version: '17'
101
103
  - name: npm build and test
102
104
  run: |
103
105
  npm run clean
@@ -112,10 +114,13 @@ jobs:
112
114
  run: .bin/wait-for-server.sh
113
115
 
114
116
  - name: Run end2end tests
115
- run: npm run end2end:test
117
+ run: |
118
+ env
119
+ npm run end2end:test
116
120
  env:
117
121
  WEBHOOK_TESTING_TEAMS: ${{ secrets.WEBHOOK_TESTING_TEAMS }}
118
122
  WEBHOOK_TESTING_SLACK: ${{ secrets.WEBHOOK_TESTING_SLACK }}
123
+ WEBHOOK_ADDITIONAL_MESSAGE: ${{ github.head_ref || github.ref_name }}
119
124
 
120
125
  package:
121
126
  name: Build Container Image
@@ -129,8 +134,8 @@ jobs:
129
134
  - uses: actions/setup-node@v3
130
135
  # TODO: Support Node 16+
131
136
  with:
132
- node-version: "16"
133
- - name: "Build Package"
137
+ node-version: '16'
138
+ - name: 'Build Package'
134
139
  run: |
135
140
  npm run clean
136
141
  npm run build
@@ -139,7 +144,7 @@ jobs:
139
144
  uses: redhat-actions/buildah-build@v2
140
145
  with:
141
146
  image: continuoussecuritytooling/keycloak-reporting-cli
142
- tags: "v1 ${{ github.sha }}"
147
+ tags: 'v1 ${{ github.sha }}'
143
148
  containerfiles: |
144
149
  ./Dockerfile
145
150
  - name: Push To Docker Hub
@@ -25,13 +25,33 @@ jobs:
25
25
 
26
26
  - name: Install Helm
27
27
  uses: azure/setup-helm@v3
28
+ - name: Install Python
29
+ uses: actions/setup-python@v4
30
+ with:
31
+ python-version: '3.9'
32
+ check-latest: true
33
+ - name: Set up chart-testing
34
+ uses: helm/chart-testing-action@v2.4.0
28
35
 
29
36
  - name: Run chart-testing (lint)
30
- run: ct lint --target-branch
37
+ run: ct lint --config .ct.yaml
31
38
 
32
39
  - name: Run chart-releaser
33
40
  uses: helm/chart-releaser-action@v1.5.0
34
41
  with:
35
- charts_dir: charts/
42
+ charts_dir: charts/
36
43
  env:
37
- CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
44
+ CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
45
+
46
+ - name: Login to GitHub Container Registry
47
+ run: |
48
+ echo ${{ secrets.CT_OCI_GITHUB_TOKEN }} | helm registry login ghcr.io -u $ --password-stdin
49
+
50
+ - name: Push Charts to GHCR
51
+ run: |
52
+ for pkg in .cr-release-packages/*; do
53
+ if [ -z "${pkg:-}" ]; then
54
+ break
55
+ fi
56
+ helm push "${pkg}" oci://ghcr.io/cloudtooling/helm-charts
57
+ done
package/Dockerfile CHANGED
@@ -1,4 +1,6 @@
1
- FROM node:16
1
+ FROM node:18
2
+
3
+ LABEL org.opencontainers.image.source https://github.com/ContinuousSecurityTooling/keycloak-reporter
2
4
 
3
5
  ENV CONFIG_FILE=/app/config.json
4
6
 
@@ -6,6 +8,9 @@ COPY dist/ docker_entrypoint.sh package.json /app
6
8
 
7
9
  WORKDIR /app
8
10
 
9
- RUN cd /app && npm i
11
+ RUN cd /app && npm install --omit=dev &&\
12
+ chown -R 1000:2000 /app
13
+
14
+ USER 1000
10
15
 
11
16
  ENTRYPOINT ["/app/docker_entrypoint.sh"]
package/README.md CHANGED
@@ -3,9 +3,8 @@
3
3
 
4
4
  [![License](https://img.shields.io/github/license/ContinuousSecurityTooling/keycloak-reporter.svg)](LICENSE)
5
5
  [![CI](https://github.com/ContinuousSecurityTooling/keycloak-reporter/actions/workflows/pipeline.yml/badge.svg)](https://github.com/ContinuousSecurityTooling/keycloak-reporter/actions/workflows/pipeline.yml)
6
- [![npm version](https://badge.fury.io/js/%40ContinuousSecurityTooling%2Fkeycloak-reporter.svg)](https://www.npmjs.com/package/@continuoussecuritytooling/keycloak-reporter)
7
- [![npm downloads](https://img.shields.io/npm/dm/%40ContinuousSecurityTooling%2Fkeycloak-reporter.svg)](https://www.npmjs.com/package/@continuoussecuritytooling/keycloak-reporter)
8
- [![npm downloads](https://img.shields.io/npm/dt/%40ContinuousSecurityTooling%2Fkeycloak-reporter.svg)](https://www.npmjs.com/package/@continuoussecuritytooling/keycloak-reporter)
6
+ [![npm version](https://badge.fury.io/js/@continuoussecuritytooling%2Fkeycloak-reporter.svg)](https://www.npmjs.com/package/@continuoussecuritytooling/keycloak-reporter)
7
+ [![npm downloads](https://img.shields.io/npm/dm/@continuoussecuritytooling%2Fkeycloak-reporter.svg)](https://www.npmjs.com/package/@continuoussecuritytooling/keycloak-reporter)
9
8
  [![Docker Stars](https://img.shields.io/docker/stars/continuoussecuritytooling/keycloak-reporting-cli.svg)](https://hub.docker.com/r/continuoussecuritytooling/keycloak-reporting-cli/)
10
9
  [![Known Vulnerabilities](https://snyk.io/test/github/ContinuousSecurityTooling/keycloak-reporter/badge.svg)](https://snyk.io/test/github/ContinuousSecurityTooling/keycloak-reporter)
11
10
 
@@ -57,13 +56,13 @@ Valid commands are:
57
56
 
58
57
  ## Advanced
59
58
 
60
-
61
59
  ### Helm
62
- ~
63
60
 
64
- helm repo add cloud-tooling https://cloudtooling.github.io/helm-charts/
61
+ To install the Helm Chart use the OCI Package:
65
62
 
66
- cloud-tooling/keycloak-reporter
63
+ ```
64
+ helm install keycloak-reporter oci://cloudtooling/helm-charts
65
+ ```
67
66
 
68
67
  ### Config file
69
68
 
@@ -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: 0.5.0
18
+ version: 1.0.0
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=github-tags depName=ContinuousSecurityTooling/keycloak-reporter
25
- appVersion: "0.5.0"
25
+ appVersion: "0.6.0"
26
26
  maintainers:
27
27
  # Martin Reinhardt
28
28
  - name: hypery2k
@@ -1,6 +1,6 @@
1
1
  # keycloak-reporter
2
2
 
3
- ![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
3
+ ![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
4
4
 
5
5
  A Helm chart for Kubernetes
6
6
 
@@ -15,17 +15,12 @@ A Helm chart for Kubernetes
15
15
  | Key | Type | Default | Description |
16
16
  |-----|------|---------|-------------|
17
17
  | affinity | object | `{}` | |
18
- | cronjobs[0].name | string | `"clients"` | |
19
- | cronjobs[0].schedule | string | `"0 0 1 */3 *"` | |
20
- | cronjobs[0].script | string | `"/app/index.js listClients"` | |
21
- | cronjobs[1].name | string | `"users"` | |
22
- | cronjobs[1].schedule | string | `"0 0 1 */3 *"` | |
23
- | cronjobs[1].script | string | `"/app/index.js listUsers"` | |
18
+ | cronjobs.clients | string | `"0 0 1 */3 *"` | |
19
+ | cronjobs.users | string | `"0 0 1 */3 *"` | |
24
20
  | env | object | `{}` | |
25
21
  | fullnameOverride | string | `""` | |
26
22
  | image.pullPolicy | string | `"IfNotPresent"` | |
27
23
  | image.repository | string | `"continuoussecuritytooling/keycloak-reporting-cli"` | |
28
- | image.tag | string | `"latest"` | |
29
24
  | imagePullSecrets | list | `[]` | |
30
25
  | keycloak.config.clientId | string | `""` | |
31
26
  | keycloak.config.clientSecret | string | `""` | |
@@ -48,4 +43,4 @@ A Helm chart for Kubernetes
48
43
  | tolerations | list | `[]` | |
49
44
 
50
45
  ----------------------------------------------
51
- Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
46
+ Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
@@ -60,3 +60,24 @@ Create the name of the service account to use
60
60
  {{- default "default" .Values.serviceAccount.name }}
61
61
  {{- end }}
62
62
  {{- end }}
63
+
64
+ }
65
+
66
+ {{/*
67
+ Create the name of the service account to use
68
+ */}}
69
+ {{- define "keycloak-reporter.cronJobs" -}}
70
+ {{- if .Values.cronjobs.users }}
71
+ users:
72
+ script: "listUsers"
73
+ schedule: {{ .Values.cronjobs.users }}
74
+ {{- end }}
75
+ {{- if .Values.cronjobs.clients }}
76
+ clients:
77
+ script: "listClients"
78
+ schedule: {{ .Values.cronjobs.clients }}
79
+ {{- end }}
80
+ {{- end -}}
81
+
82
+
83
+
@@ -1,57 +1,64 @@
1
- {{- $fullName := include "keycloak-reporter.fullname" . -}}
2
- {{- range .Values.cronjobs }}
1
+ {{- $fullName := include "keycloak-reporter.fullname" . }}
2
+ {{- range $name, $config := include "keycloak-reporter.cronJobs" $ | fromYaml }}
3
3
  apiVersion: batch/v1
4
4
  kind: CronJob
5
5
  metadata:
6
- name: {{ printf "%s-job-%s" $fullName .name }}
6
+ name: {{ printf "%s-job-%s" $fullName $name }}
7
7
  spec:
8
- schedule: "{{ .schedule }}"
8
+ schedule: {{ $config.schedule }}
9
9
  jobTemplate:
10
10
  spec:
11
11
  template:
12
12
  {{- with $.Values.podAnnotations }}
13
13
  annotations:
14
- {{- toYaml . | nindent 8 }}
14
+ {{- toYaml $ | nindent 10 }}
15
15
  {{- end }}
16
16
  spec:
17
17
  {{- with $.Values.imagePullSecrets }}
18
18
  imagePullSecrets:
19
- {{- toYaml . | nindent 8 }}
19
+ {{- toYaml . | nindent 12 }}
20
20
  {{- end }}
21
+ # automountServiceAccountToken: false # fix KubernetesClustersShouldDisableAutomountingAPICredentialsMonitoringEffect OPA policy
22
+ serviceAccountName: {{ default "default" ($.Values.serviceAccount).name }}
23
+ securityContext:
24
+ {{- toYaml $.Values.podSecurityContext | nindent 12 }}
21
25
  containers:
22
- - name: {{ .name }}
26
+ - name: {{ $name }}
23
27
  image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
24
28
  imagePullPolicy: {{ $.Values.image.pullPolicy }}
25
29
  command:
26
- - /bin/sh
27
- - -c
28
- - {{ .script }}
30
+ - node
31
+ - /app/cli.js
32
+ - {{ $config.script }}
29
33
  env:
30
34
  - name: CONFIG_FILE
31
35
  value: "/app/config.json"
32
36
  {{- with $.Values.env }}
33
37
  {{- tpl (toYaml .) $ | nindent 12 }}
34
38
  {{- end }}
39
+ {{- if $.Values.resources }}
40
+ resources:
41
+ {{- toYaml $.Values.resources | nindent 16 }}
42
+ {{- end }}
43
+ securityContext:
44
+ {{- toYaml $.Values.securityContext | nindent 16 }}
35
45
  volumeMounts:
36
46
  - name: config-file
37
47
  mountPath: "/app/config.json"
48
+ subPath: "config.json"
38
49
  readOnly: true
39
50
  {{- if ($.Values.keycloak.config.volumes).reports }}
40
51
  - name: reports-dir
41
52
  mountPath: "/app/reports"
42
53
  {{- end }}
43
54
  restartPolicy: OnFailure
44
- {{- if $.Values.resources }}
45
- resources:
46
- {{ toYaml $.Values.resources }}
47
- {{- end }}
48
55
  {{- if $.Values.nodeSelector }}
49
56
  nodeSelector:
50
- {{ toYaml $.Values.nodeSelector | indent 12 }}
57
+ {{ toYaml $.Values.nodeSelector | nindent 12 }}
51
58
  {{- end }}
52
59
  {{- if $.Values.tolerations }}
53
60
  tolerations:
54
- {{ toYaml $.Values.tolerations | indent 12 }}
61
+ {{ toYaml $.Values.tolerations | nindent 12 }}
55
62
  {{- end }}
56
63
  volumes:
57
64
  - name: config-file
@@ -4,11 +4,9 @@ kind: Secret
4
4
  metadata:
5
5
  name: {{ $fullName }}
6
6
  stringData:
7
- {{- range $k, $v := .Values.keycloak.config }}
8
- {{- if $v}}
9
- {{ $k }}: {{ $v }}
10
- {{- end }}
11
- {{- end }}
12
- {{- if (.Values.keycloak.config.volumes).reports }}
13
- reports: /app/reports
14
- {{- end }}
7
+ config.json: |
8
+ {{- $config:= .Values.keycloak.config }}
9
+ {{- if (.Values.keycloak.config.volumes).reports }}
10
+ $config := merge $config (dict "reports" "/app/reports")
11
+ {{- end }}
12
+ {{ $config | toJson }}
@@ -8,11 +8,11 @@ image:
8
8
  repository: continuoussecuritytooling/keycloak-reporting-cli
9
9
  pullPolicy: IfNotPresent
10
10
  # Overrides the image tag whose default is the chart appVersion.
11
- tag: "latest"
11
+ #tag: "latest"
12
12
 
13
13
  imagePullSecrets: []
14
- nameOverride: ""
15
- fullnameOverride: ""
14
+ nameOverride: ''
15
+ fullnameOverride: ''
16
16
 
17
17
  serviceAccount:
18
18
  # Specifies whether a service account should be created
@@ -21,56 +21,54 @@ serviceAccount:
21
21
  annotations: {}
22
22
  # The name of the service account to use.
23
23
  # If not set and create is true, a name is generated using the fullname template
24
- name: ""
24
+ name: ''
25
25
 
26
26
  podAnnotations: {}
27
-
28
- podSecurityContext: {}
29
- # fsGroup: 2000
30
-
31
- securityContext: {}
32
-
27
+ # @ignore, Configure pod security context
28
+ podSecurityContext:
29
+ runAsNonRoot: true
30
+ runAsUser: 1000
31
+ fsGroup: 2000
32
+ # @ignore, Configure security context
33
+ securityContext:
34
+ runAsUser: 1000
35
+ runAsNonRoot: true
36
+ readOnlyRootFilesystem: true
37
+ allowPrivilegeEscalation: false
38
+ # Hardening
39
+ capabilities:
40
+ drop: ['ALL']
41
+ seccompProfile:
42
+ type: 'RuntimeDefault'
43
+ # -- (map) additonal environment variables
33
44
  env: {}
34
- # capabilities:
35
- # drop:
36
- # - ALL
37
- # readOnlyRootFilesystem: true
38
- # runAsNonRoot: true
39
- # runAsUser: 1000
40
-
45
+ # -- (map) Keycloak configuration
41
46
  keycloak:
42
47
  config:
43
- url: ""
44
- clientId: ""
45
- clientSecret: ""
46
- output: "webhook"
47
- webhookType: ""
48
- webhookUrl: ""
48
+ url: ''
49
+ clientId: ''
50
+ clientSecret: ''
51
+ output: 'webhook'
52
+ webhookType: ''
53
+ webhookUrl: ''
49
54
  # -- optional message for the webhook post
50
- webhookMessage: ""
55
+ webhookMessage: ''
51
56
  volumes:
52
- reports: ""
57
+ reports: ''
53
58
 
59
+ # -- (map) Cron configuration
54
60
  cronjobs:
55
- - name: clients
56
- script: /app/index.js listClients
57
- schedule: 0 0 1 */3 *
58
- - name: users
59
- script: /app/index.js listUsers
60
- schedule: 0 0 1 */3 *
61
-
62
- resources: {}
63
- # We usually recommend not to specify default resources and to leave this as a conscious
64
- # choice for the user. This also increases chances charts run on environments with little
65
- # resources, such as Minikube. If you do want to specify resources, uncomment the following
66
- # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
67
- # limits:
68
- # cpu: 100m
69
- # memory: 128Mi
70
- # requests:
71
- # cpu: 100m
72
- # memory: 128Mi
61
+ clients: '0 0 1 */3 *'
62
+ users: '0 0 1 */3 *'
73
63
 
64
+ # @ignore, Configure resource limits
65
+ resources:
66
+ limits:
67
+ cpu: 200m
68
+ memory: 256Mi
69
+ requests:
70
+ cpu: 100m
71
+ memory: 128Mi
74
72
 
75
73
  nodeSelector: {}
76
74
 
package/cli.ts CHANGED
@@ -62,6 +62,7 @@ async function convert(
62
62
  switch (output) {
63
63
  case 'webhook':
64
64
  try {
65
+ console.log(`Sending report via webhook to ${config.type} ....`);
65
66
  await post2Webhook(
66
67
  config.type,
67
68
  config.url,
@@ -69,6 +70,7 @@ async function convert(
69
70
  outputContent,
70
71
  config.message
71
72
  );
73
+ console.log('Done sending.');
72
74
  } catch (e) {
73
75
  switch (e.code || e.message) {
74
76
  case 'Request failed with status code 400':
@@ -100,26 +102,28 @@ yargs(hideBin(process.argv))
100
102
  () => {},
101
103
  async (argv) => {
102
104
  const users = await listUsers(<Options>{
103
- clientId: argv.clientId ? (argv.clientId as string) : config.clientId,
104
- clientSecret: argv.clientSecret
105
- ? (argv.clientSecret as string)
106
- : config.clientSecret,
107
- rootUrl: argv.url ? (argv.url as string) : config.url
105
+ clientId: config.clientId ? config.clientId : (argv.clientId as string),
106
+ clientSecret: config.clientSecret
107
+ ? config.clientSecret
108
+ : (argv.clientSecret as string),
109
+ rootUrl: config.url ? config.url : (argv.url as string)
108
110
  });
109
111
  await convert(
110
- argv.format as string,
111
- argv.output as string,
112
+ config.format ? config.format : (argv.format as string),
113
+ config.output ? config.output : (argv.output as string),
112
114
  {
113
115
  name: 'user_listing',
114
- directory: argv.reports as string
116
+ directory: argv.reports ? (argv.reports as string) : config.reports
115
117
  },
116
118
  new WebhookConfig(
117
- argv.webhookType as string,
118
- argv.webhookUrl as string,
119
+ config.webhookType
120
+ ? config.webhookType
121
+ : (argv.webhookType as string),
122
+ config.webhookUrl ? config.webhookUrl : (argv.webhookUrl as string),
119
123
  'User Listing',
120
- argv.webhookMessage
121
- ? (argv.webhookMessage as string)
122
- : config.webhookMessage
124
+ config.webhookMessage
125
+ ? config.webhookMessage
126
+ : (argv.webhookMessage as string)
123
127
  ),
124
128
  users
125
129
  );
@@ -132,26 +136,28 @@ yargs(hideBin(process.argv))
132
136
  () => {},
133
137
  async (argv) => {
134
138
  const clients = await listClients(<Options>{
135
- clientId: argv.clientId ? (argv.clientId as string) : config.clientId,
136
- clientSecret: argv.clientSecret
137
- ? (argv.clientSecret as string)
138
- : config.clientSecret,
139
- rootUrl: argv.url ? (argv.url as string) : config.url
139
+ clientId: config.clientId ? config.clientId : (argv.clientId as string),
140
+ clientSecret: config.clientSecret
141
+ ? config.clientSecret
142
+ : (argv.clientSecret as string),
143
+ rootUrl: config.url ? config.url : (argv.url as string)
140
144
  });
141
145
  await convert(
142
- argv.format as string,
143
- argv.output as string,
146
+ config.format ? config.format : (argv.format as string),
147
+ config.output ? config.output : (argv.output as string),
144
148
  {
145
149
  name: 'client_listing',
146
- directory: argv.reports as string
150
+ directory: argv.reports ? (argv.reports as string) : config.reports
147
151
  },
148
152
  new WebhookConfig(
149
- argv.webhookType as string,
150
- argv.webhookUrl as string,
153
+ config.webhookType
154
+ ? config.webhookType
155
+ : (argv.webhookType as string),
156
+ config.webhookUrl ? config.webhookUrl : (argv.webhookUrl as string),
151
157
  'Client Listing',
152
- argv.webhookMessage
153
- ? (argv.webhookMessage as string)
154
- : config.webhookMessage
158
+ config.webhookMessage
159
+ ? config.webhookMessage
160
+ : (argv.webhookMessage as string)
155
161
  ),
156
162
  clients
157
163
  );
package/dist/cli.js CHANGED
@@ -32,7 +32,9 @@ async function convert(format, output, reports, config, json) {
32
32
  switch (output) {
33
33
  case 'webhook':
34
34
  try {
35
+ console.log(`Sending report via webhook to ${config.type} ....`);
35
36
  await post2Webhook(config.type, config.url, config.title, outputContent, config.message);
37
+ console.log('Done sending.');
36
38
  }
37
39
  catch (e) {
38
40
  switch (e.code || e.message) {
@@ -58,35 +60,39 @@ yargs(hideBin(process.argv))
58
60
  // eslint-disable-next-line @typescript-eslint/no-empty-function
59
61
  () => { }, async (argv) => {
60
62
  const users = await listUsers({
61
- clientId: argv.clientId ? argv.clientId : config.clientId,
62
- clientSecret: argv.clientSecret
63
- ? argv.clientSecret
64
- : config.clientSecret,
65
- rootUrl: argv.url ? argv.url : config.url
63
+ clientId: config.clientId ? config.clientId : argv.clientId,
64
+ clientSecret: config.clientSecret
65
+ ? config.clientSecret
66
+ : argv.clientSecret,
67
+ rootUrl: config.url ? config.url : argv.url
66
68
  });
67
- await convert(argv.format, argv.output, {
69
+ await convert(config.format ? config.format : argv.format, config.output ? config.output : argv.output, {
68
70
  name: 'user_listing',
69
- directory: argv.reports
70
- }, new WebhookConfig(argv.webhookType, argv.webhookUrl, 'User Listing', argv.webhookMessage
71
- ? argv.webhookMessage
72
- : config.webhookMessage), users);
71
+ directory: argv.reports ? argv.reports : config.reports
72
+ }, new WebhookConfig(config.webhookType
73
+ ? config.webhookType
74
+ : argv.webhookType, config.webhookUrl ? config.webhookUrl : argv.webhookUrl, 'User Listing', config.webhookMessage
75
+ ? config.webhookMessage
76
+ : argv.webhookMessage), users);
73
77
  })
74
78
  .command('listClients [url] [clientId] [clientSecret]', 'fetches all clients in the realms.',
75
79
  // eslint-disable-next-line @typescript-eslint/no-empty-function
76
80
  () => { }, async (argv) => {
77
81
  const clients = await listClients({
78
- clientId: argv.clientId ? argv.clientId : config.clientId,
79
- clientSecret: argv.clientSecret
80
- ? argv.clientSecret
81
- : config.clientSecret,
82
- rootUrl: argv.url ? argv.url : config.url
82
+ clientId: config.clientId ? config.clientId : argv.clientId,
83
+ clientSecret: config.clientSecret
84
+ ? config.clientSecret
85
+ : argv.clientSecret,
86
+ rootUrl: config.url ? config.url : argv.url
83
87
  });
84
- await convert(argv.format, argv.output, {
88
+ await convert(config.format ? config.format : argv.format, config.output ? config.output : argv.output, {
85
89
  name: 'client_listing',
86
- directory: argv.reports
87
- }, new WebhookConfig(argv.webhookType, argv.webhookUrl, 'Client Listing', argv.webhookMessage
88
- ? argv.webhookMessage
89
- : config.webhookMessage), clients);
90
+ directory: argv.reports ? argv.reports : config.reports
91
+ }, new WebhookConfig(config.webhookType
92
+ ? config.webhookType
93
+ : argv.webhookType, config.webhookUrl ? config.webhookUrl : argv.webhookUrl, 'Client Listing', config.webhookMessage
94
+ ? config.webhookMessage
95
+ : argv.webhookMessage), clients);
90
96
  })
91
97
  .option('format', {
92
98
  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,EACL,SAAS,EACT,WAAW,EAEX,eAAe,EACf,YAAY,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,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,KAAK,UAAU,OAAO,CACpB,MAAc,EACd,MAAc,EACd,OAAqB,EACrB,MAAqB,EACrB,IAAY;IAEZ,IAAI,aAAqB,CAAC;IAC1B,QAAQ,MAAM,EAAE;QACd,KAAK,KAAK;YACR,aAAa,GAAG,CAAC,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YACzD,MAAM;QACR,qBAAqB;QACrB;YACE,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KACxC;IACD,IAAI,OAAO,CAAC,SAAS,EAAE;Q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AAM;IACf,WAAW,EAAE,8BAA8B;CAC5C,CAAC;KACD,MAAM,CAAC,QAAQ,EAAE;IAChB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,WAAW,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,KAAK,EAAE,CAAC"}
@@ -49,7 +49,9 @@ test(
49
49
  '--output=webhook',
50
50
  '--webhookType=teams',
51
51
  '--webhookUrl=' + process.env.WEBHOOK_TESTING_TEAMS,
52
- '--webhookMessage="From Github Actions"'
52
+ '--webhookMessage="' +
53
+ (process.env.WEBHOOK_ADDITIONAL_MESSAGE || 'From Github Actions') +
54
+ '"'
53
55
  ],
54
56
  {
55
57
  env: {
@@ -84,7 +86,9 @@ test(
84
86
  '--output=webhook',
85
87
  '--webhookType=slack',
86
88
  '--webhookUrl=' + process.env.WEBHOOK_TESTING_SLACK,
87
- '--webhookMessage="From Github Actions"'
89
+ '--webhookMessage="' +
90
+ (process.env.WEBHOOK_ADDITIONAL_MESSAGE || 'From Github Actions') +
91
+ '"'
88
92
  ],
89
93
  {
90
94
  env: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@continuoussecuritytooling/keycloak-reporter",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Reporting Tools for Keycloak",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -26,8 +26,8 @@
26
26
  "homepage": "https://github.com/ContinuousSecurityTooling/keycloak-reporter#readme",
27
27
  "dependencies": {
28
28
  "@json2csv/node": "^7.0.0",
29
- "@keycloak/keycloak-admin-client": "^20.0.5",
30
- "@slack/webhook": "^6.1.0",
29
+ "@keycloak/keycloak-admin-client": "^22.0.0",
30
+ "@slack/webhook": "^7.0.0",
31
31
  "ajv": "^8.12.0",
32
32
  "install": "^0.13.0",
33
33
  "ms-teams-webhook": "^2.0.2",
@@ -37,7 +37,7 @@
37
37
  "yargs": "^17.7.2"
38
38
  },
39
39
  "devDependencies": {
40
- "@octokit/rest": "^19.0.11",
40
+ "@octokit/rest": "^20.0.0",
41
41
  "@types/jest": "^29.5.1",
42
42
  "@types/node": "^20.1.5",
43
43
  "@types/yargs": "^17.0.24",