[
https://issues.apache.org/jira/browse/RANGER-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682705#comment-17682705
]
Madhan Neethiraj commented on RANGER-4064:
------------------------------------------
[~abhi_2110] - thank you for reporting this issue. As you noted, this is
indeed a regression in RANGER-3348, while introducing RangerClientHttp
abstraction. To be backward compliant for references to RangerClient.session, I
suggest to address this issue by adding following line in
RangerClient._{_}init{_}_() method:
{code:java}
self.session = self.client_http.session{code}
> RANGER-3348 introduces bug in python client for SSL enabled clusters
> --------------------------------------------------------------------
>
> Key: RANGER-4064
> URL: https://issues.apache.org/jira/browse/RANGER-4064
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Affects Versions: 2.2.0
> Reporter: Abhishek Kumar
> Priority: Major
>
> Bug was introduced in RANGER-3348 wherein using the python client on an SSL
> enabled cluster w/o host verification is no longer possible.
> ranger.session.verify = False # this was used to skip host verification
> earlier whereas in current code it is not possible to do so.
> >>> from apache_ranger.model.ranger_service import *
> >>> from apache_ranger.client.ranger_client import *
> >>> from apache_ranger.model.ranger_policy import *
> >>> ranger_url = 'someurl'
> >>> ranger_auth = ('admin', 'XXXXXXXXXXXXX')
> >>> from requests_kerberos import HTTPKerberosAuth
> >>> ranger_auth = HTTPKerberosAuth()
> >>> ranger = RangerClient(ranger_url, ranger_auth)
> >>> ranger.
> Display all 123 possibilities? (y or n)
> >>> ranger.session.verify = True
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'RangerClient' object has no attribute 'session'
> CC: [~kishor.gollapalliwar]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)