-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Introduce inclusive authentication mode, improve documentation of inclusive authentication and make its config runtime #46183
Introduce inclusive authentication mode, improve documentation of inclusive authentication and make its config runtime #46183
Conversation
This comment has been minimized.
This comment has been minimized.
🙈 The PR is closed and the preview is expired. |
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
Hi Michal, @michalvavrik, thanks for working on eliminating the current ambiguity related to the inclusive authentication, it looks good, I've tried to suggest some possible doc simplifications. My understanding that if it is |
This comment has been minimized.
This comment has been minimized.
I'll check the failures (seems related) and have a look at comments in 2-3 hours.
Yes, it is exactly how you say it, let me drop the |
I see, the way Elytron produces |
9d6fd56
to
b16f0d5
Compare
Thank you @sberyozkin for the review, I think I have handled everything, but I also a wrote a new text that you requested, so better have a look again. Thanks |
7f34116
to
ab54509
Compare
This comment has been minimized.
This comment has been minimized.
@michalvavrik Hey
You did the right thing :-), we should always do it :-). Let me have a quick look |
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Show resolved
Hide resolved
...nsions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/AuthRuntimeConfig.java
Outdated
Show resolved
Hide resolved
Thanks Michal @michalvavrik, a few more suggestions are proposed to try to make it clearer how these modes differ and when lax mode can really help, but overall looks good, thanks |
This comment has been minimized.
This comment has been minimized.
ab54509
to
ac29c5a
Compare
ac29c5a
to
ccec714
Compare
@sberyozkin I think your docs suggestions are great, but we are running out of time and I think it will be hard to convince Guillaume to backport this. Unless you can see something major, can we get this in and do a docs PR that would address your further suggestions? This PR needs to get in today. Thanks. |
Status for workflow
|
* This property is false by default which means that the authentication process is complete as soon as the first | ||
* `SecurityIdentity` is created. | ||
* <p> | ||
* This property will be ignored if the path specific authentication is enabled. |
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 think, given the example you give about relying on the lax mode inclusive authentication to decide which mechanisms did the authentication makes this line a bit confusing... Futhermore, once we at some point just let users configure more than one mechanism per path, the inclusive strict mode can impact if it is and
or or
combination... IMHO it is worth dropping this line and for us keep tuning things going forward.
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.
This line is also present in the main branch already.
Futhermore, once we at some point just let users configure more than one mechanism per path, the inclusive strict mode can impact if it is and or or combination
I am not sure if I understand you, but inclusive authentication does not apply when for certain path user specifically selected one mechanism. I don't think it even makes sense. If I annotate endpoint with @BasicAuthentication
I expect to use this mechanism and not all the registered mechanisms. I suspect I misunderstood your comment?
IMHO it is worth dropping this line and for us keep tuning things going forward.
I think it is extremely important information. You need to know that if you select specific path-matching authentication mechanism, inclusive authentication does not happen.
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.
but inclusive authentication does not apply when for certain path user specifically selected one mechanism
It is just that you added a doc section called Using inclusive authentication to enable path-based authentication
but this line says the inclusive authentication is ignored for the path based authentication. So the messaging is conflicting,
How about saying something like This property is ignored for the enabled path based authentication which can currently support only a single authentication mechanism.
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.
@michalvavrik Never mind, that doc section clarifies that it is used in the lax mode, the messaging around inclusive authentication can be reworked later when more than one mechanism is supported for a specific path
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.
How about saying something like This property is ignored for the enabled path based authentication which can currently support only a single authentication mechanism.
I see, yes that is a good point.
@michalvavrik Never mind, that doc section clarifies that it is used in the lax mode, the messaging around inclusive authentication can be reworked later when more than one mechanism is supported for a specific path
I put #46167 on my list, I don't think it is realistic someone else will implement it anytime soon, so I'll try to go back to it in few months and we can revise this docs.
Status for workflow
|
...rtx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpAuthenticator.java
Show resolved
Hide resolved
@sberyozkin this can't be backported without dedicated changes because Vert.x HTTP config has been migrated to Configmapping in 3.19. I'll drop the backport label, if you still feel this needs to be backported, I can prepare dedicated backport commit. |
HttpAuthenticator
is initialized, but:RoutingContext
PreRouterFinalizationBuildItem
because I realized thatFilterBuildItem
is sometimes consumed before runtime config are ready (e.g. inUndertowBuildStep
) and it would cause a circular reference