@continuoussecuritytooling/keycloak-reporter 1.0.0 → 1.0.2

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.
@@ -11,8 +11,6 @@ import { fileURLToPath } from 'node:url'
11
11
  import { promisify } from 'node:util'
12
12
  import tar from 'tar-fs'
13
13
 
14
- // renovate: datasource=docker depName=quay.io/keycloak/keycloak
15
- const KEYCLOAK_VERSION = '25.0.6';
16
14
  const DIR_NAME = path.dirname(fileURLToPath(import.meta.url))
17
15
  const SERVER_DIR = path.resolve(DIR_NAME, '../tmp/server')
18
16
  const SCRIPT_EXTENSION = process.platform === 'win32' ? '.bat' : '.sh'
@@ -26,7 +24,7 @@ await startServer()
26
24
  async function startServer () {
27
25
  await downloadServer()
28
26
 
29
- console.info('Starting server…')
27
+ console.info('Starting server …')
30
28
 
31
29
  const args = process.argv.slice(2)
32
30
  const child = spawn(
@@ -34,8 +32,8 @@ async function startServer () {
34
32
  ['start-dev', ...args],
35
33
  {
36
34
  env: {
37
- KEYCLOAK_ADMIN: 'admin',
38
- KEYCLOAK_ADMIN_PASSWORD: 'admin',
35
+ KC_BOOTSTRAP_ADMIN_USERNAME: 'master-admin',
36
+ KC_BOOTSTRAP_ADMIN_PASSWORD: 'admin',
39
37
  ...process.env
40
38
  }
41
39
  }
@@ -46,7 +44,7 @@ async function startServer () {
46
44
  }
47
45
 
48
46
  async function downloadServer () {
49
- const directoryExists = fs.existsSync(SERVER_DIR)
47
+ const directoryExists = fs.existsSync(path.join(SERVER_DIR, `bin/kc${SCRIPT_EXTENSION}`))
50
48
 
51
49
  if (directoryExists) {
52
50
  console.info('Server installation found, skipping download.')
@@ -55,22 +53,28 @@ async function downloadServer () {
55
53
 
56
54
  console.info('Downloading and extracting server…')
57
55
 
58
- const asset = await getAsset()
59
- const assetStream = await getAssetAsStream(asset)
56
+ const nightlyAsset = await getNightlyAsset()
57
+ //console.log(nightlyAsset)
58
+ const assetStream = await getAssetAsStream(nightlyAsset)
60
59
 
61
60
  await extractTarball(assetStream, SERVER_DIR, { strip: 1 })
62
61
  }
63
62
 
64
- async function getAsset () {
63
+ async function getNightlyAsset () {
65
64
  const api = new Octokit()
65
+ const tag = process.env.kcVersion || 'nightly';
66
66
  const release = await api.repos.getReleaseByTag({
67
67
  owner: 'keycloak',
68
68
  repo: 'keycloak',
69
- tag: KEYCLOAK_VERSION
69
+ tag: tag
70
70
  })
71
+ let assertName = `keycloak-${tag}.tar.gz`
72
+ if (tag == 'nightly') {
73
+ assertName = 'keycloak-999.0.0-SNAPSHOT.tar.gz'
74
+ }
71
75
 
72
76
  return release.data.assets.find(
73
- ({ name }) => name === `keycloak-${KEYCLOAK_VERSION}.tar.gz`
77
+ ({ name }) => name === assertName
74
78
  )
75
79
  }
76
80
 
@@ -86,4 +90,4 @@ async function getAssetAsStream (asset) {
86
90
 
87
91
  function extractTarball (stream, path, options) {
88
92
  return pipelineAsync(stream, gunzip(), tar.extract(path, options))
89
- }
93
+ }
@@ -16,9 +16,8 @@ jobs:
16
16
  strategy:
17
17
  matrix:
18
18
  node_version:
19
- - 18
20
19
  - 20
21
- - 21
20
+ - 22
22
21
  os:
23
22
  - ubuntu-latest
24
23
  - macOS-latest
@@ -99,9 +98,8 @@ jobs:
99
98
  fail-fast: true
100
99
  matrix:
101
100
  node_version:
102
- - 18
103
101
  - 20
104
- - 21
102
+ - 22
105
103
  os:
106
104
  - ubuntu-latest
107
105
  steps:
@@ -171,7 +169,7 @@ jobs:
171
169
  - uses: actions/setup-node@v4
172
170
  with:
173
171
  # renovate: datasource=docker depName=node
174
- node-version: '20'
172
+ node-version: '22'
175
173
  - name: 'Build Package'
176
174
  run: |
177
175
  npm run clean
@@ -62,6 +62,16 @@ jobs:
62
62
  npm version --no-git-tag-version ${{ github.event.inputs.releaseversion }}
63
63
  npm run build
64
64
 
65
+ - name: Write version vars
66
+ run: |
67
+ BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
68
+ BRANCH=${GITHUB_REF_NAME#v}
69
+ APP_VERSION=$(cat package.json | grep version| head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g')
70
+ echo Version: $APP_VERSION
71
+ echo "VERSION=$APP_VERSION" >> $GITHUB_ENV
72
+ echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
73
+ echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
74
+
65
75
  - name: Install Helm
66
76
  uses: azure/setup-helm@v4
67
77
 
@@ -172,6 +182,28 @@ jobs:
172
182
  env:
173
183
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174
184
 
185
+ - name: Build Container Image
186
+ id: build-image
187
+ uses: redhat-actions/buildah-build@v2
188
+ with:
189
+ image: continuoussecuritytooling/keycloak-reporting-cli
190
+ tags: 'latest ${{ env.APP_VERSION }}'
191
+ containerfiles: |
192
+ ./Dockerfile
193
+ build-args: |
194
+ BUILD_DATE=${{ env.BUILD_DATE }}
195
+ APP_VERSION=${{ env.APP_VERSION }}
196
+
197
+ - name: Push To Docker Hub
198
+ id: push-to-dockerhub-preview
199
+ uses: redhat-actions/push-to-registry@v2
200
+ with:
201
+ image: ${{ steps.build-image.outputs.image }}
202
+ tags: 'latest ${{ env.APP_VERSION }}'
203
+ registry: registry.hub.docker.com
204
+ username: continuoussecuritytooling
205
+ password: ${{ secrets.DOCKER_HUB_TOKEN }}
206
+
175
207
  - name: Publish npm package
176
208
  run: |
177
209
  npm publish
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## [1.0.2](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v1.0.1...v1.0.2) (2024-11-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @continuoussecuritytooling/keycloak-auditor to v2.0.8 ([c235380](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/c23538068b54f0f326642e83c132d69b3a7cfcc7))
7
+ * **deps:** update dependency @continuoussecuritytooling/keycloak-auditor to v2.0.9 ([3b7ca63](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/3b7ca632baccdc660aca70402d2c02d9b4ceabc4))
8
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v26.0.5 ([ecc5d2f](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/ecc5d2fe7a9ff8de6b99d356f9f828d2b21941e4))
9
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v26.0.6 ([2cd12b7](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/2cd12b7e0ea627cde535203e21fe4a181e97e1a9))
10
+ * **deps:** update dependency npm to v10.9.1 ([cd1e62a](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/cd1e62a35980b3d7c4cd1fbbda631b600c89031c))
11
+
12
+
13
+
14
+ ## [1.0.1](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v1.0.0...v1.0.1) (2024-10-31)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * Correcting docker publish on release ([8930206](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/89302069cd56c8ec324cf5a028dd52e07ba3212a))
20
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v26.0.1 ([4b640f2](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/4b640f2b9899bbc4055c08c9c6d807639495f3fd))
21
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v26.0.2 ([7b2b427](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/7b2b42793de329365109e85d0f8f9dcc24ef66b1))
22
+ * **deps:** update dependency @keycloak/keycloak-admin-client to v26.0.4 ([12f2a15](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/12f2a154ee328505691cc8b635f3c916b08e2f0d))
23
+ * **deps:** update dependency openid-client to v6.1.0 ([1238436](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/1238436517af761c1cb27e28a1ecd27a0f501b95))
24
+ * **deps:** update dependency openid-client to v6.1.1 ([46c92db](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/46c92db73ed39b4c0f4a07f12369270460affaef))
25
+ * **deps:** update dependency openid-client to v6.1.3 ([530087b](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/530087b716f8fbe6a7cbe304edfc03107c25189b))
26
+ * **Tests:** Adjust end2end config for keycloak v26 ([79c6d9c](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/79c6d9c61b27157cb915f5532e2eb29674e2b763))
27
+ * **Tests:** Adjust test spec ([431c1c6](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/431c1c6d6fa951d5c4d987b89d66a644cef5e250))
28
+ * **Tests:** Adjust test to changed config ([8163c80](https://github.com/ContinuousSecurityTooling/keycloak-reporter/commit/8163c80f7a46659d52ab88e9af0b3caf5d412218))
29
+
30
+
31
+
1
32
  # [1.0.0](https://github.com/ContinuousSecurityTooling/keycloak-reporter/compare/v0.8.12...v1.0.0) (2024-10-17)
2
33
 
3
34
 
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM node:20.18.0-slim
1
+ FROM node:22.11.0-slim
2
2
 
3
3
  ARG BUILD_DATE
4
4
  ARG APP_VERSION
@@ -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.3.5
18
+ version: 1.3.7
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: 1.0.0
25
+ appVersion: 1.0.2
26
26
  maintainers:
27
27
  # Martin Reinhardt
28
28
  - name: hypery2k
@@ -1,6 +1,6 @@
1
1
  # keycloak-reporter
2
2
 
3
- ![Version: 1.3.5](https://img.shields.io/badge/Version-1.3.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
3
+ ![Version: 1.3.7](https://img.shields.io/badge/Version-1.3.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.2](https://img.shields.io/badge/AppVersion-1.0.2-informational?style=flat-square)
4
4
 
5
5
  Keycloak user and client reporting tool for automated regular access checks.
6
6
 
@@ -0,0 +1 @@
1
+ sha256:5d93a00fc6fb55a1d5a5ad400701879985d1c2c7be01295e27e752b34b8c93da