67 Commits

Author SHA1 Message Date
argoyle 05c59fa4a5 Merge branch 'next-release' into 'main'
chore(release): prepare for v0.3.1

See merge request unboundsoftware/shiny/authz_client!236
2025-11-02 22:16:23 +01:00
Unbound Release 52ea18c616 chore(release): prepare for v0.3.1 2025-11-02 22:16:23 +01:00
argoyle 9dd2b5aaa8 Merge branch 'fix/thread-safety-json-unmarshal' into 'main'
fix: change to write lock for thread safety in json unmarshal

See merge request unboundsoftware/shiny/authz_client!239
2025-11-02 22:09:18 +01:00
argoyle af93e418f4 fix: change to write lock for thread safety in json unmarshal
Replace read lock with write lock in client.go to ensure thread 
safety during the unmarshalling of JSON data. This prevents 
concurrent read access and potential data races, improving 
the integrity of the privileges data structure.
2025-11-02 21:56:54 +01:00
argoyle 46e26efe67 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.6.0

See merge request unboundsoftware/shiny/authz_client!238
2025-10-29 23:19:58 +01:00
Renovate f65e3868e3 chore(deps): update pre-commit hook golangci/golangci-lint to v2.6.0 2025-10-29 20:05:28 +00:00
argoyle 003407ecaa Merge branch 'renovate/golang-1.25.3' into 'main'
chore(deps): update golang:1.25.3 docker digest to 69d1009

See merge request unboundsoftware/shiny/authz_client!237
2025-10-21 14:24:42 +02:00
Renovate 50849e8682 chore(deps): update golang:1.25.3 docker digest to 69d1009 2025-10-21 10:05:31 +00:00
argoyle 3e8b3d00e5 Merge branch 'ci-add-default-git-cliff-config' into 'main'
ci: add default configuration for git-cliff

See merge request unboundsoftware/shiny/authz_client!235
2025-10-14 11:32:12 +02:00
argoyle a5ac3c3500 ci: add default configuration for git-cliff
Introduce a default configuration file for git-cliff to manage 
changelog generation. This file includes customizable templates 
for the changelog header, body, and footer, and enables parsing 
of commit messages according to the conventional commits 
specification. The changes facilitate easier and standardized 
documentation of project updates and changes.
2025-10-14 11:26:09 +02:00
argoyle 2502c85497 Merge branch 'renovate/golang-1.x' into 'main'
chore(deps): update golang docker tag to v1.25.3

See merge request unboundsoftware/shiny/authz_client!234
2025-10-14 08:55:12 +02:00
argoyle ed60a0ccb3 Merge branch 'renovate/go-1.x' into 'main'
chore(deps): update dependency go to v1.25.3

See merge request unboundsoftware/shiny/authz_client!233
2025-10-14 08:54:53 +02:00
Renovate 047e09823d chore(deps): update golang docker tag to v1.25.3 2025-10-14 00:06:39 +00:00
Renovate a0326a1594 chore(deps): update dependency go to v1.25.3 2025-10-13 22:03:09 +00:00
argoyle fe5a401bfc Merge branch 'renovate/golang-1.x' into 'main'
chore(deps): update golang docker tag to v1.25.2

See merge request unboundsoftware/shiny/authz_client!232
2025-10-08 09:10:12 +02:00
Renovate c12617975f chore(deps): update golang docker tag to v1.25.2 2025-10-07 22:15:29 +00:00
Renovate 64a3a6e533 chore(deps): update dependency go to v1.25.2 2025-10-07 19:16:16 +00:00
Renovate c46753598d chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.23.0 2025-10-02 10:06:38 +00:00
Renovate 30637a081d chore(deps): update golang:1.25.1 docker digest to 12640a4 2025-10-01 14:06:27 +00:00
Renovate 44bebba3c1 chore(deps): update pre-commit hook golangci/golangci-lint to v2.5.0 2025-09-21 20:03:50 +00:00
Renovate 830e1307bd chore(deps): update pre-commit hook lietu/go-pre-commit to v1 2025-09-13 09:17:33 +00:00
Renovate f094014c90 chore(deps): update golang:1.25.1 docker digest to 53f7808 2025-09-08 23:29:32 +00:00
Unbound Release e9ebb2206c chore(release): prepare for v0.3.0 2025-09-06 15:06:27 +02:00
argoyle b6ec9feeae feat: add salary privilege to privilege management system
Add support for the salary privilege in the privilege handler. 
Implement associated logic to process and validate the 
salary privilege in the test cases. Update the data 
structures to include the new privilege and ensure 
correct functionality in the privilege processing flow.
2025-09-06 14:49:56 +02:00
Renovate a1c9ace5ec chore(deps): update golang docker tag to v1.25.1 2025-09-04 08:21:33 +02:00
Renovate 250d017f93 chore(deps): update dependency go to v1.25.1 2025-09-03 19:02:44 +00:00
Renovate f48319ffb0 fix(deps): update module github.com/stretchr/testify to v1.11.1 2025-08-27 12:08:40 +00:00
Renovate 10c3448ec3 fix(deps): update module github.com/stretchr/testify to v1.11.0 2025-08-24 17:05:55 +00:00
Renovate 3e0bb48af7 chore(deps): update golang:1.25.0 docker digest to f6b9e1a 2025-08-22 19:06:15 +00:00
Renovate c9169d5cbc chore(deps): update dependency go to v1.25.0 2025-08-14 14:03:11 +00:00
Renovate e8da7bb3e9 fix(deps): update module github.com/sparetimecoders/goamqp to v0.3.3 2025-08-14 13:08:23 +00:00
Renovate 1755ed37dd chore(deps): update golang docker tag to v1.25.0 2025-08-14 10:01:19 +02:00
Renovate d2faf4bd88 chore(deps): update pre-commit hook golangci/golangci-lint to v2.4.0 2025-08-13 21:05:49 +00:00
Renovate 96001183fb chore(deps): update golang:1.24.6 docker digest to 958bfd1 2025-08-12 23:05:07 +00:00
Renovate f652c92328 chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v6 2025-08-09 20:02:58 +00:00
Renovate 4152e9830f chore(deps): update golang docker tag to v1.24.6 2025-08-07 08:31:48 +02:00
Renovate caafda1f7c chore(deps): update dependency go to v1.24.6 2025-08-06 19:03:34 +00:00
Renovate e2041fe618 chore(deps): update pre-commit hook golangci/golangci-lint to v2.3.1 2025-08-02 22:03:57 +00:00
Renovate a05c89475f chore(deps): update golang:1.24.5 docker digest to 0a156a4 2025-07-22 05:03:23 +00:00
Renovate a028c38a4d chore(deps): update pre-commit hook golangci/golangci-lint to v2.3.0 2025-07-21 15:02:56 +00:00
Renovate 982fb0bb09 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.28.0 2025-07-20 17:01:08 +00:00
Renovate ce344d29bf chore(deps): update pre-commit hook golangci/golangci-lint to v2.2.2 2025-07-11 12:59:18 +00:00
Renovate 4e29b77504 chore(deps): update golang docker tag to v1.24.5 2025-07-09 19:02:31 +00:00
Renovate d2492e98fa chore(deps): update dependency go to v1.24.5 2025-07-08 17:59:36 +00:00
Renovate 35b8148f7f chore(deps): update golang:1.24.4 docker digest to 9f820b6 2025-07-01 06:00:10 +00:00
Renovate 3a9bd8dffe chore(deps): update pre-commit hook golangci/golangci-lint to v2.2.1 2025-06-29 21:58:21 +00:00
Renovate c8b6f33464 chore(deps): update pre-commit hook golangci/golangci-lint to v2.2.0 2025-06-28 20:58:34 +00:00
Renovate ff672b7a81 chore(deps): update golang:1.24.4 docker digest to 3494bbe 2025-06-11 03:07:47 +00:00
Renovate dba9093ed4 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.27.2 2025-06-09 00:59:15 +00:00
Renovate e02917ba5d chore(deps): update pre-commit hook gitleaks/gitleaks to v8.27.1 2025-06-08 02:58:02 +00:00
Renovate 05425c1d5f chore(deps): update golang docker tag to v1.24.4 2025-06-05 21:00:44 +00:00
Renovate b42a60844e chore(deps): update dependency go to v1.24.4 2025-06-05 18:58:53 +00:00
Renovate 72b66efc07 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.27.0 2025-06-01 16:59:16 +00:00
Renovate fb45f1eccc chore(deps): update golang:1.24.3 docker digest to f255a7d 2025-05-22 02:01:48 +00:00
Renovate b10691a7ad chore(deps): update pre-commit hook gitleaks/gitleaks to v8.26.0 2025-05-12 21:59:51 +00:00
Renovate 0677bb1e60 chore(deps): update golang docker tag to v1.24.3 2025-05-06 21:02:20 +00:00
Renovate 3bc038ba17 chore(deps): update dependency go to v1.24.3 2025-05-06 19:00:47 +00:00
Renovate 1c870c3d4e chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.6 2025-05-04 15:59:06 +00:00
argoyle 8b8bf53790 feat(ci): add defaults pipeline template for CI workflow
Add the 'Defaults.gitlab-ci.yml' pipeline template to the CI 
configuration to standardize the build environment across 
projects. This change ensures consistency and improves 
maintainability in the CI process.
2025-04-30 17:00:35 +02:00
Renovate 1f20ead820 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.25.1 2025-04-30 14:00:22 +00:00
Renovate 6b567fce3c chore(deps): update pre-commit hook gitleaks/gitleaks to v8.25.0 2025-04-29 15:00:56 +00:00
Renovate 08000f5e9f chore(deps): update golang:1.24.2 docker digest to bf7899c 2025-04-29 01:09:04 +00:00
Renovate 761bd0d75b chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.5 2025-04-24 19:59:47 +00:00
Renovate 2f7cf19696 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.4 2025-04-24 18:05:08 +00:00
Renovate 06a017f5a5 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.2 2025-04-15 14:01:19 +00:00
Renovate 0a5e432071 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.1 2025-04-12 19:04:36 +00:00
Renovate 957d9229b1 chore(deps): update pre-commit hook golangci/golangci-lint to v2.1.0 2025-04-12 17:58:59 +00:00
10 changed files with 347 additions and 49 deletions
+4 -2
View File
@@ -1,11 +1,13 @@
include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
- project: unboundsoftware/ci-templates
file: Defaults.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Release.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Pre-Commit-Go.gitlab-ci.yml
image: amd64/golang:1.24.2@sha256:aebb7dfe0e8da97fd4e22f95d2162cc6948f772fa947a00659634ece26cadb5a
image: amd64/golang:1.25.3@sha256:69d10098be2e990bb1d987daec0e36d18ad287e139450dc7d98a0ded3498888d
stages:
- deps
@@ -30,7 +32,7 @@ test:
vulnerabilities:
stage: test
image: amd64/golang:1.24.2@sha256:aebb7dfe0e8da97fd4e22f95d2162cc6948f772fa947a00659634ece26cadb5a
image: amd64/golang:1.25.3@sha256:69d10098be2e990bb1d987daec0e36d18ad287e139450dc7d98a0ded3498888d
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
+5 -5
View File
@@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@@ -18,7 +18,7 @@ repos:
- --project
- unboundsoftware/shiny/authz_client
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.22.0
rev: v9.23.0
hooks:
- id: commitlint
stages: [ commit-msg ]
@@ -32,15 +32,15 @@ repos:
- -local
- gitlab.com/unboundsoftware/shiny/authz_client
- repo: https://github.com/lietu/go-pre-commit
rev: v0.1.0
rev: v1.0.0
hooks:
- id: go-test
- id: gofumpt
- repo: https://github.com/golangci/golangci-lint
rev: v2.0.2
rev: v2.6.0
hooks:
- id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.3
rev: v8.28.0
hooks:
- id: gitleaks
+1
View File
@@ -0,0 +1 @@
{"version":"v0.3.1"}
+227 -31
View File
@@ -2,6 +2,82 @@
All notable changes to this project will be documented in this file.
## [0.3.1] - 2025-11-02
### 🐛 Bug Fixes
- Change to write lock for thread safety in json unmarshal
### ⚙️ Miscellaneous Tasks
- *(deps)* Update golang:1.25.1 docker digest to 53f7808
- *(deps)* Update pre-commit hook lietu/go-pre-commit to v1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.5.0
- *(deps)* Update golang:1.25.1 docker digest to 12640a4
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.23.0
- *(deps)* Update dependency go to v1.25.2
- *(deps)* Update golang docker tag to v1.25.2
- *(deps)* Update dependency go to v1.25.3
- *(deps)* Update golang docker tag to v1.25.3
- Add default configuration for git-cliff
- *(deps)* Update golang:1.25.3 docker digest to 69d1009
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.6.0
## [0.3.0] - 2025-09-06
### 🚀 Features
- *(ci)* Add defaults pipeline template for CI workflow
- Add salary privilege to privilege management system
### 🐛 Bug Fixes
- *(deps)* Update module github.com/sparetimecoders/goamqp to v0.3.3
- *(deps)* Update module github.com/stretchr/testify to v1.11.0
- *(deps)* Update module github.com/stretchr/testify to v1.11.1
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.4
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.5
- *(deps)* Update golang:1.24.2 docker digest to bf7899c
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.25.0
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.25.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.1.6
- *(deps)* Update dependency go to v1.24.3
- *(deps)* Update golang docker tag to v1.24.3
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.26.0
- *(deps)* Update golang:1.24.3 docker digest to f255a7d
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.27.0
- *(deps)* Update dependency go to v1.24.4
- *(deps)* Update golang docker tag to v1.24.4
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.27.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.27.2
- *(deps)* Update golang:1.24.4 docker digest to 3494bbe
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.2.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.2.1
- *(deps)* Update golang:1.24.4 docker digest to 9f820b6
- *(deps)* Update dependency go to v1.24.5
- *(deps)* Update golang docker tag to v1.24.5
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.2.2
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.28.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.3.0
- *(deps)* Update golang:1.24.5 docker digest to 0a156a4
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.3.1
- *(deps)* Update dependency go to v1.24.6
- *(deps)* Update golang docker tag to v1.24.6
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v6
- *(deps)* Update golang:1.24.6 docker digest to 958bfd1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.4.0
- *(deps)* Update golang docker tag to v1.25.0
- *(deps)* Update dependency go to v1.25.0
- *(deps)* Update golang:1.25.0 docker digest to f6b9e1a
- *(deps)* Update dependency go to v1.25.1
- *(deps)* Update golang docker tag to v1.25.1
## [0.2.0] - 2025-04-11
### 🚀 Features
@@ -19,6 +95,81 @@ All notable changes to this project will be documented in this file.
- *(ci)* Remove pre-commit job and add new template
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v5
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.20.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.0
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.2
- *(deps)* Pin golang docker tag to ad5c126
- *(deps)* Pin unbound/pre-commit docker tag to 92fce44
- *(deps)* Update golang docker tag to v1.23.3
- *(deps)* Update unbound/pre-commit docker digest to 596abf5
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.62.0
- *(deps)* Update golang:1.23.3 docker digest to 8956c08
- *(deps)* Update unbound/pre-commit docker digest to e78425c
- *(deps)* Update golang:1.23.3 docker digest to 3694e36
- *(deps)* Update golang:1.23.3 docker digest to b2ca381
- *(deps)* Update golang:1.23.3 docker digest to 2660218
- *(deps)* Update golang:1.23.3 docker digest to c2d828f
- *(deps)* Update golang:1.23.3 docker digest to 73f06be
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.62.2
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.19.0
- *(deps)* Update golang:1.23.3 docker digest to ee5f0ad
- *(deps)* Update golang:1.23.3 docker digest to b4aabba
- *(deps)* Update golang:1.23.3 docker digest to 2b01164
- *(deps)* Update golang:1.23.3 docker digest to 017ec6b
- *(deps)* Update golang docker tag to v1.23.4
- *(deps)* Update golang:1.23.4 docker digest to 574185e
- *(deps)* Update golang:1.23.4 docker digest to 7003184
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.20.0
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.3
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.21.4
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.22.0
- *(deps)* Update golang:1.23.4 docker digest to 7ea4c9d
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.22.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.3
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.63.4
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.0
- *(deps)* Update golang:1.23.4 docker digest to 3b1a7de
- *(deps)* Update golang:1.23.4 docker digest to 08e1417
- *(deps)* Update golang:1.23.4 docker digest to 585103a
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.1
- *(deps)* Update golang:1.23.4 docker digest to 5305905
- *(deps)* Update golang:1.23.4 docker digest to 9820aca
- *(deps)* Update golang docker tag to v1.23.5
- *(deps)* Update golang:1.23.5 docker digest to 8c10f21
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.2
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.23.3
- *(deps)* Update golang:1.23.5 docker digest to e213430
- *(deps)* Update golang docker tag to v1.23.6
- *(deps)* Update golang:1.23.6 docker digest to 958bd2e
- *(deps)* Update golang:1.23.6 docker digest to 9271129
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.2
- *(deps)* Update golang docker tag to v1.24.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.4
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.5
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.21.0
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.24.0
- *(deps)* Update golang:1.24.0 docker digest to 4a3f101
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.6
- *(deps)* Update golang docker tag to v1.24.1
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.22.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.7
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.64.8
- *(deps)* Update golang:1.24.1 docker digest to 5ecf333
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.24.2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.0.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.0.2
- *(deps)* Update golang docker tag to v1.24.2
- *(deps)* Update golang:1.24.2 docker digest to aebb7df
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.24.3
## [0.1.4] - 2024-10-05
### 🐛 Bug Fixes
@@ -26,31 +177,67 @@ All notable changes to this project will be documented in this file.
- *(deps)* Update module github.com/stretchr/testify to v1.9.0
- *(deps)* Update module github.com/sparetimecoders/goamqp to v0.3.1
### 💼 Other
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.2.1 to 0.3.0
### ⚙️ Miscellaneous Tasks
- Update to Go 1.21.6
- Update to Go 1.22.0
- *(deps)* Update node.js to v20
- *(deps)* Update pre-commit hook devopshq/gitlab-ci-linter to v1.0.6
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.11.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.56.2
- *(deps)* Update pre-commit hook lietu/go-pre-commit to v0.1.0
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v4.5.0
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.12.0
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.13.0
- *(deps)* Update golang docker tag to v1.22.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.57.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.57.1
- Add gitleaks to pre-commit setup
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.18.2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.57.2
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.14.0
- *(deps)* Update golang docker tag to v1.22.2
- *(deps)* Update pre-commit hook pre-commit/pre-commit-hooks to v4.6.0
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.15.0
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.16.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.58.0
- *(deps)* Update golang docker tag to v1.22.3
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.58.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.58.2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.59.0
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.18.3
- *(deps)* Update golang docker tag to v1.22.4
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.59.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.18.4
- *(deps)* Update golang docker tag to v1.22.5
- *(deps)* Update golang docker tag to v1.22.6
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.60.1
- *(deps)* Update golang docker tag to v1.23.0
- Update golangci-lint to use full version
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.60.2
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.60.3
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.17.0
- *(deps)* Update golang docker tag to v1.23.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v1.61.0
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.18.0
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.19.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.19.2
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.19.3
- *(deps)* Update golang docker tag to v1.23.2
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.20.0
- Add release flow
- Remove old release job
### Build
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.2.1 to 0.3.0
## [0.1.3] - 2023-12-26
### 🐛 Bug Fixes
- Prohibit concurrent read/write
### 💼 Other
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.4 to 0.1.5
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.5 to 0.2.0
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.2.0 to 0.2.1
### ⚙️ Miscellaneous Tasks
- Update Go version
@@ -63,32 +250,30 @@ All notable changes to this project will be documented in this file.
- Update to go 1.21.3 and remove patch level
- Update version of Go
### Build
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.4 to 0.1.5
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.5 to 0.2.0
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.2.0 to 0.2.1
## [0.1.2] - 2023-06-04
### 💼 Other
- *(deps)* Bump github.com/stretchr/testify from 1.8.2 to 1.8.3
- *(deps)* Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
### ⚙️ Miscellaneous Tasks
- Update pre-commit and fix golangci-lint
- Update golangci-lint
### Build
- *(deps)* Bump github.com/stretchr/testify from 1.8.2 to 1.8.3
- *(deps)* Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
## [0.1.1] - 2023-05-11
### 🐛 Bug Fixes
- Run builds with Go 1.19.2 to fix vulnerabilities
### 💼 Other
- *(deps)* Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.1 to 0.1.2
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.2 to 0.1.3
- *(deps)* Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.3 to 0.1.4
### ⚙️ Miscellaneous Tasks
- Add vulnerability-check
@@ -103,13 +288,31 @@ All notable changes to this project will be documented in this file.
- Update to Go 1.20.3
- Update Go version and fix gitlabci lint
### Build
- *(deps)* Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.1 to 0.1.2
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.2 to 0.1.3
- *(deps)* Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
- *(deps)* Bump github.com/sparetimecoders/goamqp from 0.1.3 to 0.1.4
## [0.1.0] - 2022-07-20
### 🐛 Bug Fixes
- Pipeline
### 💼 Other
### ⚙️ Miscellaneous Tasks
- Add dependabot config
- *(deps)* Bump gitlab.com/sparetimecoders/goamqp from 0.3.1 to 0.3.2
- *(deps)* Bump github.com/stretchr/testify from 1.4.0 to 1.7.0
- Remove dependabot-standalone
- Change to codecov binary instead of bash uploader
- *(deps)* Bump gitlab.com/sparetimecoders/goamqp from 0.3.2 to 0.4.0
- Switch to moved goamqp
### Build
- Add params to codecov
- *(deps)* Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
@@ -119,13 +322,6 @@ All notable changes to this project will be documented in this file.
- *(deps)* Bump github.com/stretchr/testify from 1.7.4 to 1.7.5
- *(deps)* Bump github.com/stretchr/testify from 1.7.5 to 1.8.0
### ⚙️ Miscellaneous Tasks
- Add dependabot config
- Remove dependabot-standalone
- Change to codecov binary instead of bash uploader
- Switch to moved goamqp
## [0.0.8] - 2021-05-15
### ⚙️ Miscellaneous Tasks
+5 -2
View File
@@ -20,6 +20,7 @@ type CompanyPrivileges struct {
Invoicing bool `json:"invoicing"`
Accounting bool `json:"accounting"`
Supplier bool `json:"supplier"`
Salary bool `json:"salary"`
}
// PrivilegeHandler processes PrivilegeAdded-events and fetches the initial set of privileges from an authz-service
@@ -66,8 +67,8 @@ func (h *PrivilegeHandler) Fetch() error {
return err
}
h.RLock()
defer h.RUnlock()
h.Lock()
defer h.Unlock()
err = json.Unmarshal(buff, &h.privileges)
if err != nil {
return err
@@ -139,6 +140,8 @@ func (h *PrivilegeHandler) setPrivileges(email, companyId string, privilege Priv
c.Accounting = set
case PrivilegeSupplier:
c.Supplier = set
case PrivilegeSalary:
c.Salary = set
}
} else {
priv[companyId] = &CompanyPrivileges{}
+15 -1
View File
@@ -236,6 +236,18 @@ func TestPrivilegeHandler_IsAllowed_Return_True_If_Privilege_Exists(t *testing.T
})
assert.True(t, result)
_, _ = handler.Process(&PrivilegeAdded{
Email: "jim@example.org",
CompanyID: "abc-123",
Privilege: PrivilegeSalary,
}, goamqp.Headers{})
result = handler.IsAllowed("jim@example.org", "abc-123", func(privileges CompanyPrivileges) bool {
return privileges.Salary
})
assert.True(t, result)
}
func TestPrivilegeHandler_Fetch_Error_Response(t *testing.T) {
@@ -289,7 +301,8 @@ func TestPrivilegeHandler_Fetch_Valid(t *testing.T) {
"time": true,
"invoicing": true,
"accounting": false,
"supplier": false
"supplier": false,
"salary": true
}
}
}`
@@ -313,6 +326,7 @@ func TestPrivilegeHandler_Fetch_Valid(t *testing.T) {
Invoicing: true,
Accounting: false,
Supplier: false,
Salary: true,
},
},
}
+80
View File
@@ -0,0 +1,80 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[changelog]
# template for the changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing s
trim = true
# postprocessors
postprocessors = [
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
]
# render body even when there are no releases to process
# render_always = true
# output file path
# output = "test.md"
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# Replace issue numbers
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
# Check spelling of the commit with https://github.com/crate-ci/typos
# If the spelling is incorrect, it will be automatically fixed.
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
+3 -1
View File
@@ -23,6 +23,7 @@ const (
PrivilegeInvoicing = "INVOICING"
PrivilegeAccounting = "ACCOUNTING"
PrivilegeSupplier = "SUPPLIER"
PrivilegeSalary = "SALARY"
)
var AllPrivilege = []Privilege{
@@ -33,11 +34,12 @@ var AllPrivilege = []Privilege{
PrivilegeInvoicing,
PrivilegeAccounting,
PrivilegeSupplier,
PrivilegeSalary,
}
func (e Privilege) IsValid() bool {
switch e {
case PrivilegeAdmin, PrivilegeCompany, PrivilegeConsumer, PrivilegeTime, PrivilegeInvoicing, PrivilegeAccounting, PrivilegeSupplier:
case PrivilegeAdmin, PrivilegeCompany, PrivilegeConsumer, PrivilegeTime, PrivilegeInvoicing, PrivilegeAccounting, PrivilegeSupplier, PrivilegeSalary:
return true
}
return false
+3 -3
View File
@@ -2,11 +2,11 @@ module gitlab.com/unboundsoftware/shiny/authz_client
go 1.22.12
toolchain go1.24.2
toolchain go1.25.3
require (
github.com/sparetimecoders/goamqp v0.3.2
github.com/stretchr/testify v1.10.0
github.com/sparetimecoders/goamqp v0.3.3
github.com/stretchr/testify v1.11.1
)
require (
+4 -4
View File
@@ -8,10 +8,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/sparetimecoders/goamqp v0.3.2 h1:XdlyUBAJS5RcURw+SnnPjPJJuofddZwQsjAf05VPXvI=
github.com/sparetimecoders/goamqp v0.3.2/go.mod h1:W9NRCpWLE+Vruv2dcRSbszNil2O826d2Nv6kAkETW5o=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/sparetimecoders/goamqp v0.3.3 h1:z/nfTPmrjeU/rIVuNOgsVLCimp3WFoNFvS3ZzXRJ6HE=
github.com/sparetimecoders/goamqp v0.3.3/go.mod h1:W9NRCpWLE+Vruv2dcRSbszNil2O826d2Nv6kAkETW5o=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=