-
Notifications
You must be signed in to change notification settings - Fork 414
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 security to edgex via openziti #2603
Conversation
@dovholuknf Thanks. Please follow the Details link in DCO check to sign the commit. |
Ahhh shoot. I forgot. Thanks |
dc735bb
to
4d78b12
Compare
I have fixed the DCO issue. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When do you expect to merge this? We may help if available.
sorry i've been away from this for a long long time... i'm nearly through the edgex work... i am hoping to return to this this week or next week. |
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
4d78b12
to
c7c46d0
Compare
This should be ready to re-review now. If you would like to see instructions on testing with edgex - just let me know and i can provide a set of docker steps here |
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
also is the test case failure due to something i did? I'm surprised to see that based on what i added?
i'll try to fix the 'max commit len' issue -- 58 chars at the moment? ;/ |
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
OK, we can try to fix lint and ut problems |
much appreciated. i found the linter error by looking at the raw logs. the "UI view" just showed all the errors and confused me. i ran gofumpt and hopefully appeased the linter. |
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
i think i figured out how to run gci and gofumpt and hopefully the linter will be happy this time |
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
I do think I somehow broke that test now that i see this. I changed this file. I'm definitely going to ask for help figuring out how to fix that. Also thanks for pushing the 'approve' button on all the linter commits. I sure hope I have them all sorted now :( |
Sure, I'll take a look later today but not now since I am busy with other things in hand. Once you have a commit merged, the checks will be run without a need of approval. |
copyright should be in the beginning of each file Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Signed-off-by: Jiyong Huang <huangjy@emqx.io>
By default, it is close. To use with EdgeX secure mode, it should be turned on. Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Build packages errorThe default build has edgex tag, the build package check will run the built kuiperd to check. Then the caErr cause a panic in openziti.go AuthenicatedContext. UT errorIt is caused by the logger adaptor. It seems to me that the adaptor is unneccessary to apply to the logger globally. We can decorate it only when calling open ziti functions. Thus, I make a commit for that. Now all checks are passed except the coverage is too low. Is it possible to add ut? (Looks hard to me because of external dependencies). |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2603 +/- ##
==========================================
- Coverage 63.49% 63.17% -0.32%
==========================================
Files 339 345 +6
Lines 38932 39283 +351
==========================================
+ Hits 24717 24816 +99
- Misses 12046 12295 +249
- Partials 2169 2172 +3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
Signed-off-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
@dovholuknf Thank you. All looks good now. Is it possible to add more unit tests? If not, I think we can merge for now. And we'll need doc updates in another PR. |
Thank you for the help! I'd really like to say yes to adding tests but I'm really strapped trying to get this and all the other edgex work out the door. i will put it on my backlog though and maybe in the coming weeks I can add them? Unit tests aren't probably too useful here other than maybe making sure configuration is set and defaults processed since it really needs an openziti overlay -- if that makes sense? I'm happy to look at it in the future, when I can get to it. Right now it's tight. :( |
I'll need help with what kind of doc and 'how/where' to doc. If you have any pointers on that, please let me know! Maybe make an issue and assign it to me? -- same for test now that i think about it? |
and one related question - will a docker container be produced from this repo that I could reference in the edgex project? sorry for all the comments... |
Yes, we can trigger an alpha release, that would produce a docker image. |
OK, I'll create an issue for that. |
that would be much appreciated. I looked but it doesn't seem like one exists yet. Should I use GH Discussions for this request? Add a new issue? or just keep commenting here? :) thanks again |
@dovholuknf https://github.com/lf-edge/ekuiper/releases/tag/v1.14.0-alpha.2 tagged. Discussions thread is OK for me. |
EdgexFoundry has elected to adopt OpenZiti for additional security. This is an initial attempt at what integrating github.com/openziti/ziti into ekuiper for EdgexFoundry might look like. (I tried my best to follow the commit guidelines, but I'm sure I didn't do something quite right, apologies in advance)
This PR adds functionality to ekuiper. It allows ekuiper to be removed from the underlay network if desired. In this PR the
restPort
is no longer available on the underlay (IP-based) network as it is exclusively accessible via OpenZiti if enabled.Considerations/Notes:
logrus.StandardLogger()
and had to be adapted to in order to allow OpenZiti logging in the ekuiper logs for debuggingVaultSecret
was created to keep the vault token fresh and obtain new jwt's on a regular intervalListenAndServe/ListenAndServeTLS
are changed toServe(listener)/ServeTLS(listener)
respectively. http server is able to be taken off the IP-based underlay network entirely (making it unattackable by conventional IP-based attacks)