This repository was archived by the owner on Jan 13, 2026. It is now read-only.
Add TLS support to the pinniped-proxy directly.#4951
Merged
Conversation
Signed-off-by: Michael Nelson <minelson@vmware.com>
✅ Deploy Preview for kubeapps-dev canceled.
|
Signed-off-by: Michael Nelson <minelson@vmware.com>
antgamdia
approved these changes
Jun 27, 2022
Contributor
antgamdia
left a comment
There was a problem hiding this comment.
Great! Thank for the explanation!
Comment on lines
+1
to
+3
| // Copyright 2020-2022 the Kubeapps contributors. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| use tokio_native_tls::native_tls::{Identity, TlsAcceptor}; |
Contributor
There was a problem hiding this comment.
Suggested change
| // Copyright 2020-2022 the Kubeapps contributors. | |
| // SPDX-License-Identifier: Apache-2.0 | |
| use tokio_native_tls::native_tls::{Identity, TlsAcceptor}; | |
| // Copyright 2022 the Kubeapps contributors. | |
| // SPDX-License-Identifier: Apache-2.0 | |
| use tokio_native_tls::native_tls::{Identity, TlsAcceptor}; |
| let server = Server::bind(&addr).serve(make_svc); | ||
|
|
||
| info!("Listening on http://{}", addr); | ||
| let with_tls = opt.proxy_tls_cert != "" && opt.proxy_tls_cert_key != ""; |
Contributor
There was a problem hiding this comment.
Maybe worth adding a warning if just one of them is set ?
Contributor
Author
There was a problem hiding this comment.
Even erroring and stopping - we can't run with just one.
| // result, otherwise, if it completes, we return Ok. | ||
| server.await?; | ||
| if with_tls { | ||
| info!("Configuring with TLS cert {} and key {}", opt.proxy_tls_cert, opt.proxy_tls_cert_key); |
Contributor
There was a problem hiding this comment.
I guess this is logging the secret name but not the content, isn't it?
Contributor
Author
There was a problem hiding this comment.
Nope, they're just file paths. Not so clear from the option names...
Signed-off-by: Michael Nelson <minelson@vmware.com>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Signed-off-by: Michael Nelson minelson@vmware.com
Description of the change
After playing around with different options, this appears to be the simplest way to add tls support to pinniped-proxy without breaking the existing non-tls setup.
I'm leaving this as a draft until I figure out how TLS on the related service will interact with this. After that, it should just be updating the api server to be able to trust the cert, then the related chart changes.
Benefits
Possible drawbacks
Applicable issues
Additional information