Repository: jkroepke/openvpn-auth-oauth2
Pull request #51 (2023-10-27 20:49:06)

update dependencies
**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Particularly user-facing changes**:

**PR Readiness Checklist**:

Complete these before marking the PR as `ready to review`:

- [ ] The PR title has a summary of the changes
- [ ] The PR body has a summary to reflect any significant (and particularly user-facing) changes introduced by this PR


codecov[bot]: We're currently processing your upload.  This comment will be updated when the results are available.

Patch:
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index d658853..ed1b51a 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -55,8 +55,8 @@ report_sizes: true
 metadata:
   mod_timestamp: "{{ .CommitTimestamp }}"
 
-gomod:
-  proxy: true
+#gomod:
+#  proxy: true
 
 release:
   prerelease: auto
diff --git a/go.mod b/go.mod
index 52adce7..2202856 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
 	github.com/mitchellh/mapstructure v1.5.0
 	github.com/spf13/pflag v1.0.5
 	github.com/stretchr/testify v1.8.4
-	github.com/zitadel/oidc/v3 v3.0.2
+	github.com/zitadel/oidc/v3 v3.1.1
 	golang.org/x/oauth2 v0.13.0
 	golang.org/x/text v0.13.0
 )
@@ -21,13 +21,13 @@ require (
 require (
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/fatih/structs v1.1.0 // indirect
-	github.com/fsnotify/fsnotify v1.6.0 // indirect
+	github.com/fsnotify/fsnotify v1.7.0 // indirect
 	github.com/go-chi/chi/v5 v5.0.10 // indirect
 	github.com/go-jose/go-jose/v3 v3.0.0 // indirect
 	github.com/go-logr/logr v1.2.4 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/golang/protobuf v1.5.3 // indirect
-	github.com/google/uuid v1.3.1 // indirect
+	github.com/google/uuid v1.4.0 // indirect
 	github.com/gorilla/securecookie v1.1.1 // indirect
 	github.com/knadh/koanf/maps v0.1.1 // indirect
 	github.com/kr/text v0.2.0 // indirect
@@ -38,7 +38,7 @@ require (
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/rs/cors v1.10.1 // indirect
 	github.com/sirupsen/logrus v1.9.3 // indirect
-	github.com/zitadel/logging v0.4.0 // indirect
+	github.com/zitadel/logging v0.5.0 // indirect
 	github.com/zitadel/schema v1.3.0 // indirect
 	go.opentelemetry.io/otel v1.19.0 // indirect
 	go.opentelemetry.io/otel/metric v1.19.0 // indirect
diff --git a/go.sum b/go.sum
index b0c7d2d..cfeda48 100644
--- a/go.sum
+++ b/go.sum
@@ -1,10 +1,11 @@
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
 github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
-github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
-github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
+github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
+github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
 github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
 github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
 github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo=
@@ -24,8 +25,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
 github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
-github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
+github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
 github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
 github.com/jeremija/gosubmit v0.2.7 h1:At0OhGCFGPXyjPYAsCchoBUhE099pcBXmsb4iZqROIc=
@@ -74,10 +75,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
 github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
 github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/zitadel/logging v0.4.0 h1:lRAIFgaRoJpLNbsL7jtIYHcMDoEJP9QZB4GqMfl4xaA=
-github.com/zitadel/logging v0.4.0/go.mod h1:6uALRJawpkkuUPCkgzfgcPR3c2N908wqnOnIrRelUFc=
-github.com/zitadel/oidc/v3 v3.0.2 h1:fw0EAjx8lIlDMJ54hDz2fWIhpW/Y13tW5gd1qWGqbr4=
-github.com/zitadel/oidc/v3 v3.0.2/go.mod h1:ne9V9FHug4iUZDV42JirWVLHcbmwaxY8LnkcfekHgRg=
+github.com/zitadel/logging v0.5.0 h1:Kunouvqse/efXy4UDvFw5s3vP+Z4AlHo3y8wF7stXHA=
+github.com/zitadel/logging v0.5.0/go.mod h1:IzP5fzwFhzzyxHkSmfF8dsyqFsQRJLLcQmwhIBzlGsE=
+github.com/zitadel/oidc/v3 v3.1.1 h1:6A4j2ynPGuduM0v74zOf27v7m7ehsDtNEWFMw2WZyVs=
+github.com/zitadel/oidc/v3 v3.1.1/go.mod h1:ne9V9FHug4iUZDV42JirWVLHcbmwaxY8LnkcfekHgRg=
 github.com/zitadel/schema v1.3.0 h1:kQ9W9tvIwZICCKWcMvCEweXET1OcOyGEuFbHs4o5kg0=
 github.com/zitadel/schema v1.3.0/go.mod h1:NptN6mkBDFvERUCvZHlvWmmME+gmZ44xzwRXwhzsbtc=
 go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
@@ -111,7 +112,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
 golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
diff --git a/go.work b/go.work
index 7209106..2628a84 100644
--- a/go.work
+++ b/go.work
@@ -3,5 +3,4 @@ go 1.21.1
 use (
 	.
 	pkg/plugin
-	pkg/testutils
 )


Test patch:
diff --git a/cmd/root_test.go b/cmd/root_test.go
index ed1734e..11580f2 100644
--- a/cmd/root_test.go
+++ b/cmd/root_test.go
@@ -14,6 +14,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/utils"
 	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestExecuteVersion(t *testing.T) {
@@ -78,21 +79,21 @@ func TestExecuteConfigInvalid(t *testing.T) {
 
 func TestExecuteConfigFileFound(t *testing.T) { //nolint: paralleltest
 	clientListener, err := net.Listen("tcp", "127.0.0.1:0")
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	defer clientListener.Close()
 
 	svr, client, err := testutils.SetupResourceServer(clientListener)
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	l, err := net.Listen("tcp", "127.0.0.1:0")
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	defer l.Close()
 
 	go func() {
 		conn, err := l.Accept()
-		assert.NoError(t, err)
+		require.NoError(t, err)
 
 		defer conn.Close()
 		reader := bufio.NewReader(conn)
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index b016f15..e11b689 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -5,7 +5,9 @@ import (
 	"testing"
 
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/config"
+	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestFlagSet(t *testing.T) {
@@ -37,20 +39,20 @@ func TestFlagSet(t *testing.T) {
 
 			flagSet := config.FlagSet()
 			err := flagSet.Parse(append([]string{"openvpn-auth-oauth2"}, tt.args...))
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			for arg, expected := range tt.expectArgs {
 				switch expectedTyped := expected.(type) {
 				case string:
 					value, err := flagSet.GetString(arg)
-					assert.NoError(t, err)
+					require.NoError(t, err)
 					assert.Equal(t, expectedTyped, value)
 				case bool:
 					value, err := flagSet.GetBool(arg)
-					assert.NoError(t, err)
+					require.NoError(t, err)
 					assert.Equal(t, expectedTyped, value)
 				case []string:
 					value, err := flagSet.GetStringSlice(arg)
-					assert.NoError(t, err)
+					require.NoError(t, err)
 					assert.Equal(t, expectedTyped, value)
 				}
 			}
@@ -80,11 +82,11 @@ func TestValidate(t *testing.T) {
 		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "invalid"}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "-"},
 		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "invalid", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "http.secret requires a length of 16, 24 or 32"},
 		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "invalid", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "http.secret requires a length of 16, 24 or 32"},
-		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "0123456789101112", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "openvpn.addr is required"},
-		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "0123456789101112", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcps", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "openvpn.addr: invalid URL. only tcp://addr or unix://addr scheme supported"},
-		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "httpss", Host: "invalid"}, Secret: "0123456789101112", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcp", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "-"},
-		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "0123456789101112", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcp", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, ""},
-		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: "0123456789101112", Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{Token: &url.URL{Scheme: "http", Host: "invalid"}, Auth: &url.URL{Scheme: "http", Host: "invalid"}}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcp", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, ""},
+		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: testutils.HTTPSecret, Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "openvpn.addr is required"},
+		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: testutils.HTTPSecret, Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcps", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "openvpn.addr: invalid URL. only tcp://addr or unix://addr scheme supported"},
+		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "httpss", Host: "invalid"}, Secret: testutils.HTTPSecret, Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcp", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, "-"},
+		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: testutils.HTTPSecret, Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcp", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, ""},
+		{"", config.Config{HTTP: config.HTTP{BaseURL: &url.URL{Scheme: "http", Host: "invalid"}, Secret: testutils.HTTPSecret, Check: config.HTTPCheck{}}, OAuth2: config.OAuth2{Issuer: &url.URL{Scheme: "http", Host: "invalid"}, Client: config.OAuth2Client{ID: "client"}, Endpoints: config.OAuth2Endpoints{Token: &url.URL{Scheme: "http", Host: "invalid"}, Auth: &url.URL{Scheme: "http", Host: "invalid"}}, Validate: config.OAuth2Validate{}}, OpenVpn: config.OpenVpn{Addr: &url.URL{Scheme: "tcp", Host: "127.0.0.1:9000"}, Bypass: config.OpenVpnBypass{}}, Log: config.Log{}}, ""},
 	} {
 		tt := tt
 		t.Run(tt.name, func(t *testing.T) {
@@ -92,8 +94,9 @@ func TestValidate(t *testing.T) {
 
 			err := config.Validate(config.ManagementClient, tt.conf)
 			if tt.err == "" {
-				assert.NoError(t, err)
-			} else if assert.Error(t, err) && tt.err != "-" {
+				require.NoError(t, err)
+			} else if tt.err != "-" {
+				require.Error(t, err)
 				assert.Equal(t, tt.err, err.Error())
 			}
 		})
diff --git a/internal/config/decode_hooks_test.go b/internal/config/decode_hooks_test.go
index ed128c2..b12ca47 100644
--- a/internal/config/decode_hooks_test.go
+++ b/internal/config/decode_hooks_test.go
@@ -9,6 +9,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/config"
 	"github.com/mitchellh/mapstructure"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestStringToURLHookFunc(t *testing.T) {
@@ -35,12 +36,12 @@ func TestStringToURLHookFunc(t *testing.T) {
 			actual, err := mapstructure.DecodeHookExec(f, tt.f, tt.t)
 
 			if tt.err {
-				assert.Error(t, err)
+				require.Error(t, err)
 
 				return
 			}
 
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			assert.Equal(t, tt.result, actual)
 			assert.True(t, reflect.DeepEqual(actual, tt.result))
 		})
@@ -58,7 +59,7 @@ func TestStringToTemplateHookFunc(t *testing.T) {
 	}{
 		{"valid", reflect.ValueOf("./../../README.md"), reflect.ValueOf(template.Template{}), func() *template.Template {
 			tmpl, err := template.New("callback").ParseFiles("./../../README.md")
-			assert.NoError(t, err)
+			require.NoError(t, err)
 
 			return tmpl
 		}(), false},
@@ -76,12 +77,12 @@ func TestStringToTemplateHookFunc(t *testing.T) {
 			actual, err := mapstructure.DecodeHookExec(f, tt.f, tt.t)
 
 			if tt.err {
-				assert.Error(t, err)
+				require.Error(t, err)
 
 				return
 			}
 
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			assert.Equal(t, tt.result, actual)
 			assert.True(t, reflect.DeepEqual(actual, tt.result))
 		})
diff --git a/internal/http/main_test.go b/internal/http/main_test.go
index 4bd394d..6505b52 100644
--- a/internal/http/main_test.go
+++ b/internal/http/main_test.go
@@ -14,6 +14,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/madflojo/testcerts"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestNewHTTPServer(t *testing.T) {
@@ -22,13 +23,11 @@ func TestNewHTTPServer(t *testing.T) {
 	logger := testutils.NewTestLogger()
 
 	cert, key, err := testcerts.GenerateCertsToTempFile("/tmp/")
-	if !assert.NoError(t, err) {
-		return
-	}
+	require.NoError(t, err)
 
 	t.Cleanup(func() {
-		assert.NoError(t, os.Remove(key))
-		assert.NoError(t, os.Remove(cert))
+		require.NoError(t, os.Remove(key))
+		require.NoError(t, os.Remove(cert))
 	})
 
 	confs := []struct {
@@ -90,15 +89,16 @@ func TestNewHTTPServer(t *testing.T) {
 				defer wg.Done()
 				err := svr.Listen()
 				if tt.err == nil {
-					assert.NoError(t, err)
-				} else if assert.Error(t, err) {
+					require.NoError(t, err)
+				} else {
+					require.Error(t, err)
 					assert.Equal(t, tt.err.Error(), err.Error())
 				}
 			}()
 
 			time.Sleep(50 * time.Millisecond)
 
-			assert.NoError(t, svr.Shutdown())
+			require.NoError(t, svr.Shutdown())
 			wg.Wait()
 		})
 	}
diff --git a/internal/oauth2/handler_test.go b/internal/oauth2/handler_test.go
index bf95fdb..482736a 100644
--- a/internal/oauth2/handler_test.go
+++ b/internal/oauth2/handler_test.go
@@ -21,6 +21,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/state"
 	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestHandler(t *testing.T) {
@@ -40,7 +41,7 @@ func TestHandler(t *testing.T) {
 			"default",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: false,
 					},
@@ -70,7 +71,7 @@ func TestHandler(t *testing.T) {
 			"with ipaddr",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: true,
 					},
@@ -100,7 +101,7 @@ func TestHandler(t *testing.T) {
 			"with ipaddr + forwarded-for",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: true,
 					},
@@ -131,7 +132,7 @@ func TestHandler(t *testing.T) {
 			"with ipaddr + disabled forwarded-for",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: true,
 					},
@@ -162,7 +163,7 @@ func TestHandler(t *testing.T) {
 			"with ipaddr + multiple forwarded-for",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: true,
 					},
@@ -193,7 +194,7 @@ func TestHandler(t *testing.T) {
 			"with empty state",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: true,
 					},
@@ -224,7 +225,7 @@ func TestHandler(t *testing.T) {
 			"with invalid state",
 			config.Config{
 				HTTP: config.HTTP{
-					Secret: "0123456789101112",
+					Secret: testutils.HTTPSecret,
 					Check: config.HTTPCheck{
 						IPAddr: true,
 					},
@@ -260,19 +261,19 @@ func TestHandler(t *testing.T) {
 			t.Parallel()
 
 			managementInterface, err := net.Listen("tcp", "127.0.0.1:0")
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			defer managementInterface.Close()
 
 			clientListener, err := net.Listen("tcp", "127.0.0.1:0")
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			defer clientListener.Close()
 
 			resourceServer, clientCredentials, err := testutils.SetupResourceServer(clientListener)
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			defer resourceServer.Close()
 
 			resourceServerURL, err := url.Parse(resourceServer.URL)
-			assert.NoError(t, err)
+			require.NoError(t, err)
 
 			tt.conf.OAuth2.Client = clientCredentials
 			tt.conf.OAuth2.Issuer = resourceServerURL
@@ -283,9 +284,7 @@ func TestHandler(t *testing.T) {
 			defer client.Shutdown()
 
 			provider, err := oauth2.NewProvider(logger, tt.conf)
-			if !assert.NoError(t, err) {
-				return
-			}
+			require.NoError(t, err)
 
 			httpClientListener := httptest.NewUnstartedServer(oauth2.Handler(logger, tt.conf, provider, client))
 			httpClientListener.Listener.Close()
@@ -302,7 +301,7 @@ func TestHandler(t *testing.T) {
 				defer client.Shutdown()
 
 				conn, err := managementInterface.Accept()
-				assert.NoError(t, err)
+				require.NoError(t, err)
 
 				defer conn.Close()
 				reader := bufio.NewReader(conn)
@@ -332,14 +331,12 @@ func TestHandler(t *testing.T) {
 				defer wg.Done()
 				err := client.Connect()
 				if err != nil && !strings.HasSuffix(err.Error(), "EOF") {
-					assert.NoError(t, err)
+					require.NoError(t, err)
 				}
 			}()
 
 			jar, err := cookiejar.New(nil)
-			if !assert.NoError(t, err) {
-				return
-			}
+			require.NoError(t, err)
 
 			httpClient.Jar = jar
 
@@ -349,9 +346,8 @@ func TestHandler(t *testing.T) {
 			if tt.state == "-" {
 				sessionState := state.New(state.ClientIdentifier{Cid: 0, Kid: 1}, tt.ipaddr, "name")
 				err = sessionState.Encode(tt.conf.HTTP.Secret)
-				if !assert.NoError(t, err) {
-					return
-				}
+				require.NoError(t, err)
+
 				session = sessionState.Encoded()
 			}
 
@@ -360,18 +356,14 @@ func TestHandler(t *testing.T) {
 				nil,
 			)
 
-			if !assert.NoError(t, err) {
-				return
-			}
+			require.NoError(t, err)
 
 			if tt.xForwardedFor != "" {
 				request.Header.Set("X-Forwarded-For", tt.xForwardedFor)
 			}
 
 			resp, err := httpClient.Do(request)
-			if !assert.NoError(t, err) {
-				return
-			}
+			require.NoError(t, err)
 
 			if tt.state != "-" {
 				assert.Equal(t, http.StatusBadRequest, resp.StatusCode)
@@ -380,9 +372,7 @@ func TestHandler(t *testing.T) {
 			}
 
 			body, err := io.ReadAll(resp.Body)
-			if !assert.NoError(t, err) {
-				return
-			}
+			require.NoError(t, err)
 			_ = resp.Body.Close()
 
 			expectedStatus := 200
diff --git a/internal/oauth2/provider_test.go b/internal/oauth2/provider_test.go
index dec10ce..98ea6f2 100644
--- a/internal/oauth2/provider_test.go
+++ b/internal/oauth2/provider_test.go
@@ -12,6 +12,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/oauth2/providers/generic"
 	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 	"github.com/zitadel/oidc/v3/example/server/storage"
 	"github.com/zitadel/oidc/v3/pkg/op"
 	"golang.org/x/text/language"
@@ -36,7 +37,7 @@ func TestNewProvider(t *testing.T) {
 		op.WithAllowInsecure(),
 	)
 
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	svr := httptest.NewServer(handler)
 	logger := testutils.NewTestLogger()
@@ -150,13 +151,14 @@ func TestNewProvider(t *testing.T) {
 			t.Parallel()
 
 			provider, err := oauth2.NewProvider(logger, tt.config)
-			if tt.err != "" && assert.Error(t, err) {
+			if tt.err != "" {
+				require.Error(t, err)
 				assert.Equal(t, strings.TrimSpace(err.Error()), tt.err)
 
 				return
 			}
 
-			assert.NoError(t, err)
+			require.NoError(t, err)
 
 			assert.Equal(t, provider.OAuthConfig().ClientID, tt.config.OAuth2.Client.ID)
 			assert.Equal(t, provider.OAuthConfig().ClientSecret, tt.config.OAuth2.Client.Secret)
diff --git a/internal/oauth2/providers/generic/check_test.go b/internal/oauth2/providers/generic/check_test.go
index 8f9bf04..59edd86 100644
--- a/internal/oauth2/providers/generic/check_test.go
+++ b/internal/oauth2/providers/generic/check_test.go
@@ -8,6 +8,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/oauth2/providers/generic"
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/state"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 	"github.com/zitadel/oidc/v3/pkg/oidc"
 )
 
@@ -35,10 +36,10 @@ func TestCheckUser(t *testing.T) {
 	provider := generic.NewProvider(conf)
 
 	userData, err := provider.GetUser(context.Background(), token)
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	err = provider.CheckUser(context.Background(), state.State{}, userData, token)
-	assert.NoError(t, err)
+	require.NoError(t, err)
 }
 
 func TestValidateGroups(t *testing.T) {
@@ -84,8 +85,9 @@ func TestValidateGroups(t *testing.T) {
 			err := generic.NewProvider(conf).CheckGroups(token)
 
 			if tt.err == "" {
-				assert.NoError(t, err)
-			} else if assert.Error(t, err) {
+				require.NoError(t, err)
+			} else {
+				require.Error(t, err)
 				assert.Equal(t, tt.err, err.Error())
 			}
 		})
@@ -134,8 +136,9 @@ func TestValidateRoles(t *testing.T) {
 
 			err := generic.NewProvider(conf).CheckRoles(token)
 			if tt.err == "" {
-				assert.NoError(t, err)
-			} else if assert.Error(t, err) {
+				require.NoError(t, err)
+			} else {
+				require.Error(t, err)
 				assert.Equal(t, tt.err, err.Error())
 			}
 		})
@@ -184,8 +187,9 @@ func TestValidateCommonName(t *testing.T) {
 
 			err := generic.NewProvider(conf).CheckCommonName(session, token)
 			if tt.err == "" {
-				assert.NoError(t, err)
-			} else if assert.Error(t, err) {
+				require.NoError(t, err)
+			} else {
+				require.Error(t, err)
 				assert.Equal(t, tt.err, err.Error())
 			}
 		})
@@ -236,8 +240,9 @@ func TestValidateIpAddr(t *testing.T) {
 
 			err := generic.NewProvider(conf).CheckIPAddress(session, token)
 			if tt.err == "" {
-				assert.NoError(t, err)
-			} else if assert.Error(t, err) {
+				require.NoError(t, err)
+			} else {
+				require.Error(t, err)
 				assert.Equal(t, tt.err, err.Error())
 			}
 		})
diff --git a/internal/openvpn/connection/client_test.go b/internal/openvpn/connection/client_test.go
index 83387de..d8c89a8 100644
--- a/internal/openvpn/connection/client_test.go
+++ b/internal/openvpn/connection/client_test.go
@@ -6,6 +6,7 @@ import (
 
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/openvpn/connection"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestNewClientConnection(t *testing.T) {
@@ -93,10 +94,10 @@ func TestNewClientConnection(t *testing.T) {
 
 			clientConnection, err := connection.NewClient(message)
 			if tt.err == "" {
-				assert.NoError(t, err)
+				require.NoError(t, err)
 				assert.Equal(t, tt.clientConnection, clientConnection)
 			} else {
-				assert.Error(t, err)
+				require.Error(t, err)
 				assert.Equal(t, tt.err, err.Error())
 			}
 		})
diff --git a/internal/openvpn/main_test.go b/internal/openvpn/main_test.go
index ee33d51..032ef44 100644
--- a/internal/openvpn/main_test.go
+++ b/internal/openvpn/main_test.go
@@ -15,6 +15,7 @@ import (
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/state"
 	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestClientInvalidServer(t *testing.T) {
@@ -24,7 +25,7 @@ func TestClientInvalidServer(t *testing.T) {
 	conf := config.Config{
 		HTTP: config.HTTP{
 			BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-			Secret:  "0123456789101112",
+			Secret:  testutils.HTTPSecret,
 		},
 		OpenVpn: config.OpenVpn{
 			Addr:   &url.URL{Scheme: "tcp", Host: "0.0.0.0:1"},
@@ -33,7 +34,7 @@ func TestClientInvalidServer(t *testing.T) {
 	}
 	client := openvpn.NewClient(logger, conf)
 	err := client.Connect()
-	assert.Error(t, err)
+	require.Error(t, err)
 	assert.Equal(t, "unable to connect to openvpn management interface tcp://0.0.0.0:1: dial tcp 0.0.0.0:1: connect: connection refused", err.Error())
 }
 
@@ -50,26 +51,25 @@ func TestClientFull(t *testing.T) {
 		err    error
 	}{
 		{
-			"without password",
-			config.Config{
+			name: "without password",
+			conf: config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass: config.OpenVpnBypass{CommonNames: make([]string, 0)},
 				},
 			},
-			">CLIENT:CONNECT,1,2\r\n>CLIENT:ENV,untrusted_ip=127.0.0.1\r\n>CLIENT:ENV,common_name=test\r\n>CLIENT:ENV,IV_SSO=webauth\r\n>CLIENT:ENV,END\r\n",
-			"client-pending-auth 1 2 \"WEB_AUTH::",
-			nil,
+			client: ">CLIENT:CONNECT,1,2\r\n>CLIENT:ENV,untrusted_ip=127.0.0.1\r\n>CLIENT:ENV,common_name=test\r\n>CLIENT:ENV,IV_SSO=webauth\r\n>CLIENT:ENV,END\r\n",
+			expect: "client-pending-auth 1 2 \"WEB_AUTH::",
 		},
 		{
 			"with password",
 			config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass:   config.OpenVpnBypass{CommonNames: make([]string, 0)},
@@ -101,7 +101,7 @@ func TestClientFull(t *testing.T) {
 			config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass:   config.OpenVpnBypass{CommonNames: make([]string, 0)},
@@ -117,7 +117,7 @@ func TestClientFull(t *testing.T) {
 			config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass:   config.OpenVpnBypass{CommonNames: []string{"bypass"}},
@@ -133,7 +133,7 @@ func TestClientFull(t *testing.T) {
 			config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass:   config.OpenVpnBypass{CommonNames: []string{"bypass"}},
@@ -149,7 +149,7 @@ func TestClientFull(t *testing.T) {
 			config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass:   config.OpenVpnBypass{CommonNames: []string{"bypass"}},
@@ -165,7 +165,7 @@ func TestClientFull(t *testing.T) {
 			config.Config{
 				HTTP: config.HTTP{
 					BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-					Secret:  "0123456789101112",
+					Secret:  testutils.HTTPSecret,
 				},
 				OpenVpn: config.OpenVpn{
 					Bypass:   config.OpenVpnBypass{CommonNames: []string{"bypass"}},
@@ -185,7 +185,7 @@ func TestClientFull(t *testing.T) {
 			t.Parallel()
 
 			l, err := net.Listen("tcp", "127.0.0.1:0")
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			defer l.Close()
 
 			tt.conf.OpenVpn.Addr = &url.URL{Scheme: l.Addr().Network(), Host: l.Addr().String()}
@@ -197,7 +197,7 @@ func TestClientFull(t *testing.T) {
 			go func() {
 				defer wg.Done()
 				conn, err := l.Accept()
-				assert.NoError(t, err)
+				require.NoError(t, err)
 
 				defer conn.Close()
 				defer client.Shutdown()
@@ -243,7 +243,7 @@ func TestClientFull(t *testing.T) {
 
 					sessionState := state.NewEncoded(matches[1])
 					err := sessionState.Decode(tt.conf.HTTP.Secret)
-					assert.NoError(t, err)
+					require.NoError(t, err)
 
 					assert.Equal(t, uint64(1), sessionState.Client.Cid)
 					assert.Equal(t, uint64(2), sessionState.Client.Kid)
@@ -254,14 +254,14 @@ func TestClientFull(t *testing.T) {
 
 			err = client.Connect()
 			if tt.err != nil {
-				if assert.Error(t, err) {
-					assert.Equal(t, tt.err.Error(), err.Error())
-				}
+				require.Error(t, err)
+				assert.Equal(t, tt.err.Error(), err.Error())
+
 				client.Shutdown()
 			} else {
 				wg.Wait()
 				if err != nil && !strings.HasSuffix(err.Error(), "EOF") {
-					assert.NoError(t, err)
+					require.NoError(t, err)
 				}
 			}
 		})
@@ -273,14 +273,14 @@ func TestClientInvalidPassword(t *testing.T) {
 
 	logger := testutils.NewTestLogger()
 	l, err := net.Listen("tcp", "127.0.0.1:0")
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	defer l.Close()
 
 	conf := config.Config{
 		HTTP: config.HTTP{
 			BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-			Secret:  "0123456789101112",
+			Secret:  testutils.HTTPSecret,
 		},
 		OpenVpn: config.OpenVpn{
 			Addr:     &url.URL{Scheme: l.Addr().Network(), Host: l.Addr().String()},
@@ -293,7 +293,7 @@ func TestClientInvalidPassword(t *testing.T) {
 
 	go func() {
 		conn, err := l.Accept()
-		assert.NoError(t, err)
+		require.NoError(t, err)
 
 		defer conn.Close()
 		reader := bufio.NewReader(conn)
@@ -307,9 +307,8 @@ func TestClientInvalidPassword(t *testing.T) {
 
 	err = client.Connect()
 
-	if assert.Error(t, err) {
-		assert.Equal(t, "unable to connect to openvpn management interface: invalid password", err.Error())
-	}
+	require.Error(t, err)
+	assert.Equal(t, "unable to connect to openvpn management interface: invalid password", err.Error())
 
 	client.Shutdown()
 }
@@ -322,7 +321,7 @@ func TestClientInvalidVersion(t *testing.T) {
 	conf := config.Config{
 		HTTP: config.HTTP{
 			BaseURL: &url.URL{Scheme: "http", Host: "localhost"},
-			Secret:  "0123456789101112",
+			Secret:  testutils.HTTPSecret,
 		},
 		OpenVpn: config.OpenVpn{
 			Bypass: config.OpenVpnBypass{CommonNames: make([]string, 0)},
@@ -358,7 +357,7 @@ func TestClientInvalidVersion(t *testing.T) {
 			t.Parallel()
 
 			l, err := net.Listen("tcp", "127.0.0.1:0")
-			assert.NoError(t, err)
+			require.NoError(t, err)
 			defer l.Close()
 
 			conf.OpenVpn.Addr = &url.URL{Scheme: l.Addr().Network(), Host: l.Addr().String()}
@@ -367,7 +366,7 @@ func TestClientInvalidVersion(t *testing.T) {
 
 			go func() {
 				conn, err := l.Accept()
-				assert.NoError(t, err)
+				require.NoError(t, err)
 
 				defer conn.Close()
 				reader := bufio.NewReader(conn)
@@ -382,9 +381,9 @@ func TestClientInvalidVersion(t *testing.T) {
 			}()
 
 			err = client.Connect()
-			if assert.Error(t, err) {
-				assert.Equal(t, tt.err, err.Error())
-			}
+			require.Error(t, err)
+			assert.Equal(t, tt.err, err.Error())
+
 			client.Shutdown()
 		})
 	}
diff --git a/internal/state/state_test.go b/internal/state/state_test.go
index e2013aa..aa2cc6b 100644
--- a/internal/state/state_test.go
+++ b/internal/state/state_test.go
@@ -5,20 +5,22 @@ import (
 	"time"
 
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/state"
+	"github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestState(t *testing.T) {
 	t.Parallel()
 
-	encryptionKey := "0123456789101112"
+	encryptionKey := testutils.HTTPSecret
 
 	for i := 1; i < 50; i++ {
 		token := state.New(state.ClientIdentifier{Cid: 1, Kid: 2}, "127.0.0.1", "test")
-		assert.NoError(t, token.Encode(encryptionKey))
+		require.NoError(t, token.Encode(encryptionKey))
 
 		encodedToken := state.NewEncoded(token.Encoded())
-		assert.NoError(t, encodedToken.Decode(encryptionKey))
+		require.NoError(t, encodedToken.Decode(encryptionKey))
 
 		assert.Equal(t, token.Client.Cid, encodedToken.Client.Cid)
 		assert.Equal(t, token.Client.Kid, encodedToken.Client.Kid)
@@ -33,38 +35,38 @@ func TestStateInvalid_Key(t *testing.T) {
 	encryptionKey := "01234567891011"
 
 	token := state.New(state.ClientIdentifier{Cid: 1, Kid: 2}, "127.0.0.1", "test")
-	assert.Error(t, token.Encode(encryptionKey), "crypto/aes: invalid key size 14")
+	require.Error(t, token.Encode(encryptionKey), "crypto/aes: invalid key size 14")
 }
 
 func TestStateInvalid_Future(t *testing.T) {
 	t.Parallel()
 
-	encryptionKey := "0123456789101112"
+	encryptionKey := testutils.HTTPSecret
 
 	token := state.New(state.ClientIdentifier{Cid: 1, Kid: 2}, "127.0.0.1", "test")
 	token.Issued = time.Now().Add(time.Hour)
 
-	assert.NoError(t, token.Encode(encryptionKey))
+	require.NoError(t, token.Encode(encryptionKey))
 	assert.Contains(t, token.Decode(encryptionKey).Error(), "invalid state: issued in future, issued at:")
 }
 
 func TestStateInvalid_TooOld(t *testing.T) {
 	t.Parallel()
 
-	encryptionKey := "0123456789101112"
+	encryptionKey := testutils.HTTPSecret
 
 	token := state.New(state.ClientIdentifier{Cid: 1, Kid: 2}, "127.0.0.1", "test")
 	token.Issued = time.Now().Add(-1 * time.Hour)
 
-	assert.NoError(t, token.Encode(encryptionKey))
+	require.NoError(t, token.Encode(encryptionKey))
 	assert.Contains(t, token.Decode(encryptionKey).Error(), "invalid state: expired after 2 minutes, issued at:")
 }
 
 func TestStateInvalid_Encoded(t *testing.T) {
 	t.Parallel()
 
-	encryptionKey := "0123456789101112"
+	encryptionKey := testutils.HTTPSecret
 
 	token := state.NewEncoded("test")
-	assert.Error(t, token.Decode(encryptionKey))
+	require.Error(t, token.Decode(encryptionKey))
 }
diff --git a/internal/utils/slices_test.go b/internal/utils/slices_test.go
index 0267954..c7a7fdb 100644
--- a/internal/utils/slices_test.go
+++ b/internal/utils/slices_test.go
@@ -5,30 +5,29 @@ import (
 
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/utils"
 	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 func TestCastToSlice(t *testing.T) {
 	t.Parallel()
 
 	stringSlice, err := utils.CastToSlice[string]([]any{"string1", "string2", "string3"})
-	assert.NoError(t, err)
-	assert.Equal(t, stringSlice, []string{"string1", "string2", "string3"})
+	require.NoError(t, err)
+	assert.Equal(t, []string{"string1", "string2", "string3"}, stringSlice)
 }
 
 func TestCastToSliceInvalidSlice(t *testing.T) {
 	t.Parallel()
 
 	_, err := utils.CastToSlice[string]("string")
-	if assert.Error(t, err) {
-		assert.Equal(t, "unable to cast input to []any", err.Error())
-	}
+	require.Error(t, err)
+	assert.Equal(t, "unable to cast input to []any", err.Error())
 }
 
 func TestCastToSliceInvalidElement(t *testing.T) {
 	t.Parallel()
 
 	_, err := utils.CastToSlice[string]([]any{"string1", "string2", 0})
-	if assert.Error(t, err) {
-		assert.Equal(t, "unable to cast element", err.Error())
-	}
+	require.Error(t, err)
+	assert.Equal(t, "unable to cast element", err.Error())
 }
diff --git a/pkg/testutils/go.mod b/pkg/testutils/go.mod
deleted file mode 100644
index 30a574b..0000000
--- a/pkg/testutils/go.mod
+++ /dev/null
@@ -1,38 +0,0 @@
-module github.com/jkroepke/openvpn-auth-oauth2/pkg/testutils
-
-go 1.21.1
-
-require (
-	github.com/stretchr/testify v1.8.4
-	github.com/zitadel/oidc/v3 v3.0.2
-	golang.org/x/text v0.13.0
-)
-
-require (
-	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/go-chi/chi/v5 v5.0.10 // indirect
-	github.com/go-jose/go-jose/v3 v3.0.0 // indirect
-	github.com/go-logr/logr v1.2.4 // indirect
-	github.com/go-logr/stdr v1.2.2 // indirect
-	github.com/golang/protobuf v1.5.3 // indirect
-	github.com/google/uuid v1.3.1 // indirect
-	github.com/gorilla/securecookie v1.1.1 // indirect
-	github.com/kr/text v0.2.0 // indirect
-	github.com/muhlemmer/gu v0.3.1 // indirect
-	github.com/muhlemmer/httpforwarded v0.1.0 // indirect
-	github.com/pmezard/go-difflib v1.0.0 // indirect
-	github.com/rs/cors v1.10.1 // indirect
-	github.com/sirupsen/logrus v1.9.3 // indirect
-	github.com/zitadel/logging v0.4.0 // indirect
-	github.com/zitadel/schema v1.3.0 // indirect
-	go.opentelemetry.io/otel v1.19.0 // indirect
-	go.opentelemetry.io/otel/metric v1.19.0 // indirect
-	go.opentelemetry.io/otel/trace v1.19.0 // indirect
-	golang.org/x/crypto v0.14.0 // indirect
-	golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
-	golang.org/x/oauth2 v0.13.0 // indirect
-	golang.org/x/sys v0.13.0 // indirect
-	google.golang.org/appengine v1.6.8 // indirect
-	google.golang.org/protobuf v1.31.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
-)
diff --git a/pkg/testutils/go.sum b/pkg/testutils/go.sum
deleted file mode 100644
index 62994ac..0000000
--- a/pkg/testutils/go.sum
+++ /dev/null
@@ -1,89 +0,0 @@
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
-github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo=
-github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
-github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
-github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
-github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
-github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
-github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
-github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/muhlemmer/gu v0.3.1 h1:7EAqmFrW7n3hETvuAdmFmn4hS8W+z3LgKtrnow+YzNM=
-github.com/muhlemmer/gu v0.3.1/go.mod h1:YHtHR+gxM+bKEIIs7Hmi9sPT3ZDUvTN/i88wQpZkrdM=
-github.com/muhlemmer/httpforwarded v0.1.0 h1:x4DLrzXdliq8mprgUMR0olDvHGkou5BJsK/vWUetyzY=
-github.com/muhlemmer/httpforwarded v0.1.0/go.mod h1:yo9czKedo2pdZhoXe+yDkGVbU0TJ0q9oQ90BVoDEtw0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
-github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
-github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
-github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
-github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/zitadel/logging v0.4.0 h1:lRAIFgaRoJpLNbsL7jtIYHcMDoEJP9QZB4GqMfl4xaA=
-github.com/zitadel/oidc/v3 v3.0.2 h1:fw0EAjx8lIlDMJ54hDz2fWIhpW/Y13tW5gd1qWGqbr4=
-github.com/zitadel/oidc/v3 v3.0.2/go.mod h1:ne9V9FHug4iUZDV42JirWVLHcbmwaxY8LnkcfekHgRg=
-github.com/zitadel/schema v1.3.0 h1:kQ9W9tvIwZICCKWcMvCEweXET1OcOyGEuFbHs4o5kg0=
-go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
-go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
-go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE=
-go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8=
-go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg=
-go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
-golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
-golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
-golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
-golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
-golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
-golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
-google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
-google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/pkg/testutils/main.go b/pkg/testutils/main.go
index 669d12c..194537f 100644
--- a/pkg/testutils/main.go
+++ b/pkg/testutils/main.go
@@ -12,26 +12,28 @@ import (
 	"testing"
 
 	"github.com/jkroepke/openvpn-auth-oauth2/internal/config"
-	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 	"github.com/zitadel/oidc/v3/example/server/storage"
 	"github.com/zitadel/oidc/v3/pkg/op"
 	"golang.org/x/text/language"
 )
 
+const HTTPSecret = "0123456789101112"
+
 var mu = sync.Mutex{} //nolint:gochecknoglobals
 
 func SendLine(tb testing.TB, conn net.Conn, msg string, a ...any) {
 	tb.Helper()
 
 	_, err := fmt.Fprintf(conn, msg, a...)
-	assert.NoError(tb, err)
+	require.NoError(tb, err)
 }
 
 func ReadLine(t *testing.T, reader *bufio.Reader) string {
 	t.Helper()
 
 	line, err := reader.ReadString('\n')
-	assert.NoError(t, err)
+	require.NoError(t, err)
 
 	return strings.TrimSpace(line)
 }