-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ingress: adds configurable SSL redirect nginx controller #850
ingress: adds configurable SSL redirect nginx controller #850
Conversation
@simonswine I fixed that issue in #766 (not merged yet) using |
Hi @aledbf, I missed your work on that. I am not too sure why it's not merged. I guess your PR is rather large and doing a lot of different things. How and where exactly did you solve the default value overriding problem with bool (default=true) and you want to have it set false via ConfigMap. See fix + tests in #849 |
@@ -256,6 +259,7 @@ func newDefaultNginxCfg() nginxConfiguration { | |||
SSLBufferSize: sslBufferSize, | |||
SSLCiphers: sslCiphers, | |||
SSLProtocols: sslProtocols, | |||
SSLRedirect: true, |
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 update the docs on how we flip this
I'm fine with a smaller change, doens't matter either way how it gets in i guess, as long as we alll agree on how it's expressed. You and @aledbf can choose which one of the 2 prs goes in :) |
@simonswine please check the latest version |
05982e4
to
303f873
Compare
@aledbf thanks for that update. Thinking a bit about it, I came to the conclusion that we probably want to be able to configure HSTS, and server-side SSL redirect enforcement separately. For my particular use case I want to be always able to access something via HTTP (if the clients wants to do so). It's needed for doing the |
Yes, you are right about this. How about defining the redirect and hsts in the configuration to define a default value and adding an annotation in the services? This way is possible to just enable things like http-01 challenge and force the behavior with tls rules with existing certificates |
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
303f873
to
45c3ef4
Compare
@aledbf could please take a look at my changes. They are still a WiP. It felt like it is a bit messy implemented. Definitely missing are docs |
@simonswine looks good 👍 Just the |
@simonswine why not the annotation in the ingress instead of the service? |
45c3ef4
to
c6ed811
Compare
As I want it to be able to config stuff on
It's modified now:
Is now public
added |
@eparis IMHO now ready to merge |
Why, just create a restriction: using this annotation in an ingress rules applies to all the paths
I know, but if the annotation is in the service and not the ingress rule then:
|
@simonswine can you rebase? |
@aledbf sorry I haven't managed to get this done before 0.7. I can see your point in the ingress vs. service resource discussion. It feels cleaner to me now to do it in the ingress. I will modify this accordingly.. |
c6ed811
to
505bc16
Compare
* add global value to config map * add per ingress value as annotation to ingress resources
505bc16
to
6fdd444
Compare
Refactored the code to use ingress resource annotations. It is now part of rewrite package. Moved config into own package to prevent dependency cycles in the imports |
|
||
// SSL enabled protocols to use | ||
// http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols | ||
sslProtocols = "TLSv1 TLSv1.1 TLSv1.2" |
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 know this is just cut/paste, but why include tls1 as a default?
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.
@bprashanth please do not change this. Some clients do not support 1.1 or 1.2
https://www.ssllabs.com/ssltest/viewClient.html?name=IE&version=8-10&platform=Win%207&key=113
https://www.ssllabs.com/ssltest/viewClient.html?name=Java&version=7u25&key=26
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 was suggesting an opt in, not default. I'm ok if we really need it, but tls 1 is compromised and people can just force a downgrade and BEAST. Please add a 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.
@bprashanth just in case the defaults in sslCiphers
and sslProtocols
mitigate BEAST
(screenshot from ssllabs.com/ssltest/analyze.html
of a site with defaults)
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.
alright, SG, lets add it to the readme somewhere?
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 but for the nit, thanks for the package cleanup also |
LGTM |
Spinoff pr for docs sounds good, merging |
Hi everyone,
I want my services behind the ingress to decide if HTTPS is strictly required or not. So I added the feature to disable the 301 redirect to the https:/ URL.
To make this actually work #849 needs to be merged before. (Otherwise you cannot override and default value true with a false)
Cheers,
Christian