-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
APIGOV-26652 - Kong admin api security enhancements (#42)
* use proxy admin-api route * undo unnecessary changes to ParseProperties * refactor tls config * change port to ports + (wip) helm updates * Squashed commit of the following: commit 509f41c Author: Jason Collins <[email protected]> Date: Tue Nov 21 08:23:27 2023 -0700 APIGOV-26695 - update the handling and creation of api transactions for the kong agent (#40) * update deps * some refactoring for event handling * do not commit debug bin files * use server mux * refactor processing * reorganize traceability agent files * reorg code * update deps * Fix CRDs creation + fix credential de-provisioning + logging (#39) * APIGOV-26709 + APIGOV-26718 * fix plugins test * more credential logging * change debug to info log * solve log issues * code review --------- Co-authored-by: Dragos Gabriel Ghinea <[email protected]> commit a129ec2 Merge: 578441a 0291b2b Author: Alin Rosca <[email protected]> Date: Tue Nov 21 17:17:16 2023 +0200 Merge pull request #36 from Axway/APIGOV-26621 APIGOV-26621 - Get spec from dev portal commit 0291b2b Merge: d3e88f0 578441a Author: Alin Rosca <[email protected]> Date: Tue Nov 21 17:12:58 2023 +0200 Merge branch 'main' into APIGOV-26621 commit d3e88f0 Author: Alin Rosca <[email protected]> Date: Tue Nov 21 17:10:02 2023 +0200 APIGOV-26621 fix PR comms commit 15ffe60 Author: Alin Rosca <[email protected]> Date: Fri Nov 17 11:21:44 2023 +0200 APIGOV-26621 get spec from dev portal commit b7934b6 Merge: a181051 1187f08 Author: Alin Rosca <[email protected]> Date: Fri Nov 17 11:00:50 2023 +0200 Merge branch 'main' into APIGOV-26621 commit a181051 Author: Alin Rosca <[email protected]> Date: Tue Nov 14 16:43:52 2023 +0200 APIGOV-26621 fix PR comms commit 690002c Merge: 6a447cb b4fe37b Author: Alin Rosca <[email protected]> Date: Tue Nov 14 15:20:06 2023 +0200 Merge branch 'APIGOV-26463' into APIGOV-26621 commit 6a447cb Author: Alin Rosca <[email protected]> Date: Tue Nov 14 15:19:17 2023 +0200 APIGOV-26621 get spec from local * add sample env vars + helm configs + MR issues * modify sample env vars * revert to original config format + helm fixes * another one * readme updates * another one * camelCase issue * remove route path and assume full admin api url is always provided * remove routepath from readme * remove unnecessary helm values * change default proxy ports to 0 * merge issues * case issue --------- Co-authored-by: Jason Collins <[email protected]> Co-authored-by: Jason Collins <[email protected]>
- Loading branch information
1 parent
1262c18
commit cf2ea55
Showing
12 changed files
with
243 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.kong.admin.auth.basicAuth.username }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: kong-admin-auth-basicauth | ||
type: Opaque | ||
stringData: | ||
username: "{{ .Values.kong.admin.auth.basicAuth.username }}" | ||
password: "{{ .Values.kong.admin.auth.basicAuth.password }}" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package config | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestKongGateCfg(t *testing.T) { | ||
cfg := &KongGatewayConfig{} | ||
|
||
err := cfg.ValidateCfg() | ||
assert.Equal(t, hostErr, err.Error()) | ||
|
||
cfg.Proxy.Host = "localhost" | ||
err = cfg.ValidateCfg() | ||
assert.Equal(t, proxyPortErr, err.Error()) | ||
|
||
cfg.Proxy.Ports.HTTP = 8000 | ||
cfg.Proxy.Ports.HTTPS = 8443 | ||
err = cfg.ValidateCfg() | ||
assert.Equal(t, invalidUrlErr, err.Error()) | ||
|
||
cfg.Admin.Url = "sdl.com:8000" | ||
err = cfg.ValidateCfg() | ||
assert.Equal(t, invalidUrlErr, err.Error()) | ||
|
||
cfg.Admin.Url = "http://sdl.com" | ||
err = cfg.ValidateCfg() | ||
assert.Equal(t, invalidUrlErr, err.Error()) | ||
|
||
cfg.Admin.Url = "https://sds.com:8000" | ||
cfg.Admin.Auth.BasicAuth.Username = "test" | ||
err = cfg.ValidateCfg() | ||
assert.Equal(t, credentialConfigErr, err.Error()) | ||
|
||
cfg.Admin.Auth.BasicAuth.Username = "" | ||
cfg.Admin.Auth.BasicAuth.Password = "sas" | ||
err = cfg.ValidateCfg() | ||
assert.Equal(t, credentialConfigErr, err.Error()) | ||
|
||
cfg.Admin.Auth.BasicAuth.Password = "" | ||
|
||
err = cfg.ValidateCfg() | ||
assert.Equal(t, nil, err) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.