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

feat: add openziti bind support to ui #775

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

dovholuknf
Copy link
Contributor

This PR allows the UI to be OpenZiti enabled for binding services as well

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
ozUrl := b.cfg.Service.SecurityOptions["OpenZitiController"]
var zctx ziti.Context
var authErr error
if os.Getenv("SERVICE_SECURITYOPTIONS_OPENZITIAUTHMETHOD") == "identity" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should eventually probably be replaced by using the standard configuration options but these two keys need to be added to the "default" and I can't remember where that is :)

@@ -125,8 +133,64 @@ func (b *HttpServer) BootstrapHandler(
b.isRunning = false
}()

var ln net.Listener
listenMode := strings.ToLower(b.cfg.Service.SecurityOptions[bscfg.SecurityModeKey])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all this functionality should also be moved to go-mod-bootstrap or some other common place. this code is largely simlar to code in app-functions-sdk-go/internal/webserver/server.go

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we should do it when we have a chance

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cloudxxx8 cloudxxx8 merged commit 06a86f4 into edgexfoundry:main Jul 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants