Repository navigation
Recommended approach for multiple listeners and routers #57850
|
Hi all, I currently have a use case where different endpoints require different TLS client authentication policies:
Using a single listener with After looking through the management interface pull request (#30506) and some other discussions and issues on GitHub, it seems Quarkus already supports multiple Vert.x listeners with dedicated routers and TLS configurations. Right now, my questions are:
Thank you for any hints pointing me in the right direction. I would be willing to contribute a guide if deemed useful for the Quarkus documentation. |
Replies: 2 comments 2 replies
public void registerManagementRoutes(@Observes ManagementInterface mi) {
mi.router().get("/.well-known/cmp").handler(rc -> rc.response().end("..."));
}Note that these are plain Vert.x Web routes, so JAX-RS resources are not served from there. Management paths are also relative to
A guide on this would be welcome. A dedicated section in the management interface reference on "using the management port as a second TLS listener" would fit well. (I looked this up in the code with help from an AI assistant; the links are to the lines I checked.) |
|
Thanks a lot for your response, @stanleys12. However, thinking about it a bit more, the challenge is not limited to CMP. In my use case, an EST This makes me think that protocols which authenticate at the application layer (e.g. CMP, EST Basic Auth) and protocols which authenticate at the TLS layer (e.g. EST with client certificates) may need to be separated onto different listeners. I read the TLS Registry Reference and realized that the TLS Registry API exposes So my follow-up question would be this: Does Quarkus consider the following a supported integration pattern:
or is the TLS Registry intended only for Quarkus-managed listeners such as the main or management interface? If I could use the pattern above, my architecture could look like this: I hope you do not mind me mentioning you @cescoffier, but I remember you being a TLS expert on the Quarkus team :-) |
You can create your own http server and retrieve a specific configuration from the TLS registry. It has been designed for this.