-
Notifications
You must be signed in to change notification settings - Fork 62
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 app-wide property for quarkus.cxf.tls-configuration-name #1680
Comments
@ppalaga would this be something to consider? I have holidays starting from next week, so I'd be happy to work towards it during that time, if you are in agreement. |
Thanks for for the reminder, @dcheng1248 and apologizes for not reacting promptly. I am still pondering whether we should use the "nameless" default Quarkus trust store defined by properties That's how they do it in some Quarkus extensions GRPC client OpenTelemetry REST Client But on the other hand, there are extensions not taking Keycloak admin Mailer OIDC Client Redis Client WebSocket client There seem to be all kinds of flavors to handle the defaults. I think in our case, a CXF specific client-only property (let's call it
(We need tests for all the above scenarios.) We have to decide what would the default of
Any opinion on that? We have to implement and document some clean precedence rules for various levels of named and default TLS configs as well as for the old (and now deprecated) I can gladly assign this to you if you like @dcheng1248 . |
@ppalaga many thanks for the detailed response and thoughts you put into this! I'm still new to large codebases so your examples provide great help for me to orient myself and think about the issue and implementations. To your question, here are my thoughts:
I'm tempted towards the second option just for the compatibility, but think the first could also be a good choice. Do you think it would be practical to throw an error (that asks the user to set the tls configurations) if the user sets a client-endpoint-url to https but do not have a tls configured? This would prevent going down the rabbit hole of weird server responses (like I did) due to the lack of TLS. If this is possible, I would be inclined to say the first option along with the error warning. For the implementation, I would love to contribute. How urgent do you think this issue is? I will have a lot more time starting next week, as I will be on holiday from work. This is, however, an admittedly non-trivial implementation for me (due to unfamiliarity with the codebase, needing to think about the precedence rules and my general inexperience) so it might take me a bit longer. If you prefer a faster implementation, I would love to help however I can. |
I think
Would we need it if we make
Not urgent from my PoV, but folks following #1665 might be happy if it could reach Let me assign it to you for now. Feel free to let me know if you stop looking at it. |
Probably not. But if
Great! I will do my best and be in touch about any problems. Thank you! |
We do not need to introduce that name, because Quarkus defines it already: |
|
Thanks! I'm working on this. It's taking longer than expected because lunar new year was... busier than expected. Sorry! |
BTW, if Quarkus team won't backport the |
It looks like it's only going to be in 3.20. Should we temporarily host it? Edit: I'm not sure how to host the functionality in CXF. Assuming I understand your quarkus commit correctly, I moved over the I've tried moving over the content of the Would you have any pointers or suggestions about this? |
Yes, let's host it temporarily. Yeah, I see the visibility of the Quarkus methods is not ideal. Because we want to host it only temporarily, I'd say it would be OK ,to call |
Edit: I just saw that Quarkus 3.18.2 doesn't have the I cannot get reflection to work on my end, could you kindly check if I am missing something obvious? One of my earlier attempts is found here (no tests and probably some other mistakes because I can't get the tests to build, because the method cannot be found). Since then, I've also tried variations such as:
When I check with the debugger, only the public methods from CertificateRecorder show up in the methods array (no private or protected methods). Afaik getDeclaredMethod/s() should return all methods, so I am quite puzzled. Also tried replacing Class.forName etc. with the class directly with no success. |
Let's wait for Quarkus 3.19.0.CR1 tomorrow. If they branch it from |
It seems that 3.19.0.CR1 does contain the changes. Would you have an estimate when the cxf main would be updated, or should I update the version locally for the feature? |
I am working on it now, but do not feel blocked. Do whatever you need locally and you'll be able to rebase later. |
@ppalaga I ran into a strange issue when testing the code. I got an exception
I had to change it (locally, I copied the class over since we're still on 3.18.2) to this for the exception to disappear.
I think it is a local issue, given that your commit to quarkus passed CI. Any suggestions where it might have went wrong locally? |
First draft PR here |
Indeed, |
Currently, to set the TLS truststore for a client, the quarkus property
quarkus.cxf.client."client-name".tls-configuration-name
must be set. In our use case, we have all the certificates gathered into one truststore but have several clients, and it can feel cumbersome to have to set the property for every client. It would help avoid repeated code if an app-wide property is introduced.I would be happy to see if I can help implement this if you think it is worth doing but not high priority.
The text was updated successfully, but these errors were encountered: