Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple security enabled from reverse proxying functionality #635

Open
bnevis-i opened this issue Sep 21, 2023 · 0 comments
Open

Decouple security enabled from reverse proxying functionality #635

bnevis-i opened this issue Sep 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bnevis-i
Copy link
Collaborator

🚀 Feature Request

Relevant Package [REQUIRED]

internal

Description [REQUIRED]

Issue edgexfoundry/edgex-helm#22 explains the problem in detail.

Describe the solution you'd like

In EdgeX 3.0, all microservices take a JWT for authentication. Therefore, the following functionality that routes requests differently should be decoupled from secure mode. Specifically, there should be separate switches the enable JWT processing and backend routing through the API gateway.

	for prefix := range clientsMapping {
		if strings.HasPrefix(path, prefix) {
			if common.IsSecurityEnabled() {
				app.secure(w, r)
				return
			}
			originalPath := strings.TrimPrefix(path, prefix)
			targetAddr := clientsMapping[prefix]
			insecure(w, r, originalPath, targetAddr)
		}
	}

Note that in insecure mode, edgex-ui-go works as normal. In the helm deployment, we would like to do service routing via kubernetes, instead of the API gateway, to fix this bug.

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?
@bnevis-i bnevis-i added the enhancement New feature or request label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant