rgupta94 opened a new pull request, #1121: URL: https://github.com/apache/ranger/pull/1121
Fix a race in RangerPDPKnoxFilter where the static KnoxRangerPlugin instance was published before init() finished. Previously, plugin was assigned immediately after construction, and plugin.init() ran afterward. When multiple Knox topologies initialized the filter concurrently, another thread could observe a partially initialized plugin and use it for authorization. This change assigns the new plugin to a local variable, calls init() on that instance, and only then sets the static plugin field. That keeps the singleton fully initialized before it is visible to other threads. Also adds a unit test to verify that concurrent filter initialization blocks until the first plugin finishes initializing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
