Ranger KMS contains big chunk of code from Hadoop KMS, slightly altered to implement necessary changes.
It seems that two thing changed in Ranger side :
- It is possible to customize the implementation for 'KMSACL'
- It is possible to capture the originating IP address
For the first, it would be better, if this code is up-streamed. For the second, a servlet filter with a thread local variable would work perfectly.
For Hadoop 3.0, the KMS module is evolved a bit, so the other solution, is to copy - again - a lot of code, would be a bigger change.