-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
TLS support for HTTP API of Query server #2337
Merged
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
92d363c
Added TLS for HTTP (consumer-query) server
rjs211 3bf0746
Add testcase of error in TLS HTTP server creation
rjs211 abe4ff5
Merge branch 'master' of github.com:jaegertracing/jaeger into dev-add…
rjs211 050fb62
Minor refactoring of properties and vars
rjs211 d02d85f
Exposing flags for HTTP and GRPC with TLS config
rjs211 e135064
minor refactoring of comments
rjs211 657e0b4
Changed TLS server to use tlsCfg instead of injection
rjs211 0f67d15
Create test for HTTP server with TLS and MTLS
rjs211 73867a5
Removing checks to avoid race condition
rjs211 3e000a7
Merge branch 'master' of github.com:jaegertracing/jaeger into dev-add…
rjs211 a763d9e
Adding testdata of certificates and keys of CA, server & client
rjs211 024b179
Merge branch 'master' of github.com:jaegertracing/jaeger into dev-add…
rjs211 0a88eb5
Changing the names of keys and certificates
rjs211 691ffea
Coverage increase and cleanup
rjs211 2278e6e
Merge branch 'master' of github.com:jaegertracing/jaeger into dev-add…
rjs211 5cdf944
removing redundant certif/keys set and using previously available set
rjs211 cca70e9
Added helper function to serve HTTP server
rjs211 fea7e14
Modify cmux and tests for secure HTTP and GRPC
rjs211 4cb348e
Merge branch 'master' of github.com:jaegertracing/jaeger into dev-add…
rjs211 31b31e7
Fixing testscases for safe re-use
rjs211 9c8cfdf
Merge branch 'master' of github.com:jaegertracing/jaeger into dev-add…
rjs211 affb566
Use common certificate flags for GRPC and HTTP
rjs211 5def2de
Use common certificate flags for GRPC and HTTP
rjs211 1d8133e
tempCommit
rjs211 3c0b23c
Using same tlsCfg structure for server
rjs211 7d9e18f
Removing reduntant code, added comments, using correct port for testing
rjs211 17bd199
Using separate ports in case of TLS
rjs211 e45614f
Merge branch 'master' of https://github.com/jaegertracing/jaeger into…
rjs211 0ceb4e5
modified test-cases for dedicated ports with TLS
rjs211 0119c1e
remove redundant test, created error var
rjs211 da5d790
Merge branch 'master' of https://github.com/jaegertracing/jaeger into…
rjs211 601c269
remove redundant test, created error var
rjs211 186184f
Split long conditional
rjs211 a964218
Merge branch 'master' into dev-addTLS-rjs211
rjs211 f4eb8f6
Merge branch 'master' of https://github.com/jaegertracing/jaeger into…
rjs211 f0ac83e
removed code repitition, added comment
rjs211 c53af21
added table-based tests for QueryOptions port allocation
rjs211 d3edb98
Merge branch 'dev-addTLS-rjs211' of https://github.com/rjs211/jaeger …
rjs211 1bee20f
Merge branch 'master' into dev-addTLS-rjs211
rjs211 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tempCommit
Signed-off-by: rjs211 <srivatsa211@gmail.com>
- Loading branch information
commit 1d8133e253bb368b3836c31a8dcd2a5544c45ec0
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why do we need these?
enabled
is already a standard flag in the TLS config https://github.com/jaegertracing/jaeger/blob/master/pkg/config/tlscfg/flags.go#L26There 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.
We need two one for GRPC one for HTTP. but even if either one of them are enabled, we need only one set of certificates and keys. So, I used two hardCoded flags for each and used
showEnabled:false
for the common certificate configuration.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.
using enabled of
tlsCfg
would also force two sets of certificate and key. #2338 (comment)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.
I don't follow. If you want to share certificates and keys between two servers, then shouldn't we have only one
TLS tlscfg.Options
field in the options struct, as we had before? Then it would make sense to have to extra.enabled
flags to allow switching TLS on each server separately.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.
Sure. I'll do that.
Does the project have any convention for multi-vlaued flags? Because clientCA of GRPC and HTTP server might be different. Currently we still have this problem.
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.
@jpkrohling Agreed. So our options are:
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.
@tcolgate given that Jaeger 2.x will be based on OpenTelemetry Collector, you might want to bring your concerns to this issue as well: open-telemetry/opentelemetry-collector#1256.
This PR here is about the query server, which has been released already with both protocols on the same port. Splitting it now would cause current clients to break, so, I'm afraid we don't have much choice at this point.
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.
@jpkrohling I did consider that. I added the mutual TLS support to jaeger and thanos, and then looked at doing it for otel, but cmux made it awkward, and debugging it did my brain in. (I disliked the cmux setup before that, but this was the first time I had to actually modify a project using it, that wasn't just ripping it out).
Hopefully someone with more time an patience will do the otel work before I have to look at it again.
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.
@jpkrohling I've added a couple of comments to that bug. I hadn't realised they'd reverted the cmux usage. I failed to get mutual TLS working with cmux, I can't recall the exact details of why, but it looks like the bug that caused them to revert might be the reason.
If the grpc service only supports functionality that is provided by the UI, then having the same CA/certs is probably reasonable, assuming none of the other jaeger components need grpc to talk to it (other than maybe a cli query, which would be roughly equivalent to browser usage, so could just use a system cert pack).
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.
@yurishkuro can confirm, but my understanding is that the query gRPC endpoint is (or is going to be) the supported way to query the backend. The first client is the UI, but external clients are also expected to exist, so, mTLS is certainly something we'd want to support there.