-
Notifications
You must be signed in to change notification settings - Fork 606
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
RFC-0004: Block insecure HTTP connections across Flux #3081
Conversation
ad14ef6
to
7b5ba3f
Compare
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.
Please document the use of insecure for Alert Providers, ref: fluxcd/notification-controller#404
Besides adding the flag to notification-controller, I guess the Provider CRD should have the insecure
field as well? If so which ones?
As food for thought, what if instead of the new controller level flag being named |
@pjbgf from what I understand, the |
"skip-tls-verify=true" would only suggest relaxing TLS behavior. It doesn't mention and should not relate to blocking/allowing plain HTTP. "force-https=false" (with a default to true) might make more sense both disabling TLS verification and permitting HTTP since it at least mentions the protocol. As an SRE/ops person, I would just prefer 2 (or more) flags to control TLS verification and HTTP separately:
I would put the word "insecure" at the front, so the flags get grouped with other sensitive options. If you need more flags to differentiate Kustomize remote base fetches from k8s API connections, that seems fine, but maybe not necessary. I do think this feature is incomplete until it addresses how to get Kustomize to filter out HTTP. Hopefully the Kustomize folks would be open to working this in? |
Remote bases bypass source-controller so they break many of Flux promises: as we don’t verify nor do we store the remote sources in-cluster as Flux artifacts. Pulling remote bases at every apply makes Flux unpredictable, for example: if external traffic is jammed, Flux can’t detect & correct drift as the last desired state is unknown. Tracing an object to its source is no longer accurate, diffing and any static analysis involves outbound traffic. And finally, there is no API to setup SSH or TLS certs for remote bases, so for private repos you’ll need to mount the private keys and certs in the kustomize-controller pod (breaks multi-tenancy). I think Flux should encourage users into using sources which can be verified and trusted. Ideally all the external artifacts which make the desired state should by signed and transported securely, so no remote bases and no insecure protocols. Maybe with OCI we can make this story more appealing, |
I think whether we should advice Flux users to avoid using remote bases is outside the crux of this proposal. The |
dc1ff5b
to
f67a356
Compare
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.
@aryan9600 please setup spellcheck in your editor
f67a356
to
8682259
Compare
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.
LGTM
8682259
to
105d32b
Compare
I agree with @stealthybox on the flag name, flagInsecureKubeConfigExec = "insecure-kubeconfig-exec"
flagInsecureKubeConfigTLS = "insecure-kubeconfig-tls" |
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.
LGTM
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.
LGTM!
Great job putting this together @aryan9600! 🙇
I'm assigning RFC-0004 for this one, @aryan9600 please add |
871c644
to
5d5d800
Compare
One more changed need, please set the status to |
5d5d800
to
bae4364
Compare
bae4364
to
aee7295
Compare
aee7295
to
3efa9e9
Compare
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
3efa9e9
to
98c7afd
Compare
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 love how this RFC is aligning controller flags, CLI flags and CRD fields. Thanks!
One concern I have is the rather generic term insecure
in both, the CRDs and the CLI as it's just not specific enough in my book. Calling it insecure-allow-http
would be much better to understand from a user's perspective. There's already been lots of confusion in the Helm project around what "insecure" really means.
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.
LGTM!
@makkes I concur that As for the CRD, although I agree that the same argument applies, I am not sure the trade-off of breaking backwards compatibility vs adding a more meaningful name is worth it on that case. But if that were to happen, we probably better do it ahead of GA. What are your thoughts here? Do you think there would be other variants within our CRDs that contain a |
Proposal for blocking HTTP connections across all Flux controllers and objects
TLDR:
--insecure-allow-http
shall be added to all controllers, which would be used to allow/disallow HTTP connections at the controller level. The default value istrue
, which allows HTTP connections.spec.insecure
shall be added to all relevant objects where the specified endpoint doesn't allow for inference of the transport type through the scheme and HTTP connections must be used.--insecure
shall be added to relevant CLI commands, to configure the value of.spec.insecure
in the related object definition.Sponsored by @pjbgf
Fixes #3076