I am trying to obtain the userID used to log in to Zeppelin within my scala (%livy) script. I've tried searching online and noted that there is a property named "proxyUser". However, I can not work out how to get this property within my Scala Script.
I've tried dumping all properties in my SparkContext (spark) and ScalaContext (sc), but have not found anything the looks promising.
I am not sure where else to look, any guidance would be appreciated...
The end goal is to access the logged in user from a custom library that I will build. So ideally, I would like to obtain some sort of read only properties that contain the login ID and pass that structure to my custom library which will in turn extract the user ID. Put another way, I do not want the script author to pass in the user ID as a string variable (because I do not want them trying to pass themselves off as another user).
After pulling much of my hair out and a colleague stating what should have been obvious to me in the first place:
sc.sparkUser
Returns the impersonated user ID in Zeppelin.