Shopify / pyoozie

Library for querying and scheduling with Apache Oozie
https://py-oozie.readthedocs.io
MIT License
11 stars 12 forks source link

Include support for KNOX gateway authentication mechanism #76

Open Kondasamy opened 5 years ago

Kondasamy commented 5 years ago

If Oozie is added with Knox gateway support, the below constructor in OozieClient class lacks support for Basic authentication.

    def __init__(self, url=None, user=None, timeout=None, verbose=True, **_):
        self.logger = logging.getLogger('pyoozie.OozieClient')
        oozie_url = (url or 'http://localhost').rstrip('/')
        if not oozie_url.endswith('/oozie'):
            oozie_url += '/oozie'
        self._url = oozie_url
        self._user = user
        self._timeout = timeout or 30
        self._verbose = verbose  # Note: change default for verbose!
        self._stats = OozieClient.Stats()
        self._valid_server = False
cfournie commented 5 years ago

We could provide the ability to pass in a session object so you could configure whichever authentication scheme you desired.

Kondasamy commented 5 years ago

Yeah, that would work. Better than customising just for Basic authentication. Thanks