-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Automatically disable the HTTP port when client certs are required #37324
Conversation
🙈 The PR is closed and the preview is expired. |
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.
IMHO if REQUIRED
is set then no plain port should be open by default, so the proposal is to fail the build if insecure requests are not disabled but doc that users can open it if they really need it
This comment has been minimized.
This comment has been minimized.
That was incomplete, having I honestly don't think disabling insecure requests on the main router with I can open a PR if you'd like me to. |
My only doubt is whether |
I think it sounds reasonable. It's also potentially breaking change, FWIW +1 |
@sberyozkin There is a problem with this solution. Both REQUIRED and REDIRECTED make sense. It's up to the user to decide. I agree that REQUIRED is probably better, but it is a strong opinion. So, we would need to log something explaining that we took this decision because the user didn't set any value. |
3bc3468
to
dffb740
Compare
@sberyozkin is there an easy way to know if mTLS is configured? I was wondering if looking if |
This comment has been minimized.
This comment has been minimized.
Disabling insecure ports by default is a breaking change, difficult to evaluate the consequences
@cescoffier Right, at build time it is checked if it is set to I've dismissed my review, even though I feel it is worth be stricter by default, when Please fix the conflict, sorry it took me a while to think about it |
dffb740
to
ff76463
Compare
@sberyozkin Can you review, I automatically disable the plain server. |
ff76463
to
1272aba
Compare
That is the Quarkus opinionated way :-) 👍 |
...http/runtime/src/main/java/io/quarkus/vertx/http/runtime/options/HttpServerOptionsUtils.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
I can propose a migration note once this one is merged, even though technically it is a breaking change, as suggested above, I have high hopes very few users if any will notice it |
The CI issue is most probably related. |
1272aba
to
abec3b6
Compare
This comment has been minimized.
This comment has been minimized.
abec3b6
to
303252a
Compare
This comment has been minimized.
This comment has been minimized.
303252a
to
601904d
Compare
@cescoffier FYI, I prototyped https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.7#insecure-http-port-is-disabled-when-mtls-client-authentication-is-required. Please do not hesitate to change/fix it as you prefer, it would be fine. Thanks |
@sberyozkin I changed it a bit. |
This comment has been minimized.
This comment has been minimized.
@cescoffier This one is a new test, which got into the build after the rebase :-), I can push an update to it to have it accepting insecure requests or the test can validate that the HTTP connection is closed to verify the insecure port is effectively disabled - how to correctly check it though ? |
@sberyozkin Connection refused is exactly what we want in this case. Could you adapt the test to check for that exception? Otherwise, enable the the "plain" HTTP server. |
601904d
to
6f8706c
Compare
There are a few import * statement to cleanup. |
Failing Jobs - Building 6f8706c
Full information is available in the Build summary check run. Failures⚙️ Maven Tests - JDK 17 #- Failing: integration-tests/maven
📦 integration-tests/maven✖
✖
|
These test failure are not related |
This is particularly important when mTLS is used.