-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[FEATURE REQ] Allow Passing Custom Thread Factory to Blob Store HTTP Client #4009
Comments
Thank you for opening this issue! We are routing it to the appropriate team for follow up. |
@jianghaolu @JonathanGiles is this something that will be possible in v12? |
@jianghaolu could you please take a look? |
@original-brownbear Thank you for this suggestion. We have included this in our work items for v12. We will notify you when there is a release that has this feature. |
@rickle-msft Thanks, sounds great! |
We could probably expose API specific to Netty through the following draft PR: #5104. |
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment. |
Is your feature request related to a problem? Please describe.
We are trying to integrate Azure blob storage SDK v11 into the Elasticsearch Azure repository plugin in elastic/elasticsearch#43309. One challenge we ran into is the fact that the SDK v11 does require certain permissions that our security manager setup does not grant by default.
One example would be Jackson's
"java.lang.RuntimePermission" "accessDeclaredMembers"
:While in the legacy SDK v8 we could cleanly resolve this by granting the necessary permissions to the SDKs codebase and executing calls to it in a privileged context, we cannot do this in v11. This is due to the fact that calls like the above example run on Netty threads that are set up by the SDK itself without any possibility to grant them the necessary privileges (happy to be corrected here obviously).
Describe the solution you'd like
It seems like the easiest solution here would be to allow for more customization of the Netty setup. In Elasticsearch itself we resolve the above problem by using a custom
ThreadFactory
when setting up aNioEventLoopGroup
. This way we can make the custom factory create threads that are of the same group as the calling code and thus resolve any permissions/security manager issues by that route.=> Having the ability to pass a
java.util.concurrent.ThreadFactory
when setting up thecom.microsoft.azure.storage.blob.PipelineOptions
(or theHttpClient
, so we could set up a custom one with our thread factory) seems to be the most direct solution to enabling the use of the SDK with a security manager.Describe alternatives you've considered
The only alternative I was able to come up with so far was to set up our own implementation of
HttpClient
which is less than desirable due to the complexity of maintaining that solution. I'd be happy to hear alternative suggestions for integration with the security manager though.The text was updated successfully, but these errors were encountered: