jpoullet2000/atlasclient

Kerberos login support

Closed this issue · 4 comments

There's an auth module for requests that can make this happen. Any chance atlasclient can get support of switching auth to kerberos?
https://github.com/requests/requests-kerberos

Hi dimon22... it is indeed certainly an interesting/important feature to have for this client. Probably a few modifs in the request method should make it work. However, I'd like to test it in a real env with a kerberized atlas before pushing. So far, I'm mocking all the requests. Would you agree to test it in a real environment? Another way would be to set up a true Hadoop + Kerberized Atlas env when testing... if you have any suggestion about it I'd be interested as well.

@jpoullet2000 I gave it a look, and I think there's even easier way. Potentially requests.Session object allows auth attribute to be set to switch auth globally for all requests done with it.
http://docs.python-requests.org/en/master/api/#requests.Session.auth

If we just plug new auth in Session after instantiating Session in constructor of HttpClient, that should be it!

self.session = requests.Session()

I'll give it a try in kerberized environment.

Sadly, I no longer have kerberized environment in my possession :(
I prepared PR with necessary change for custom Auth support if anyone gets a chance to test.