HUE-9183 [impala] communicate securely with Impala when webserver_require_spnego or is_kerberos_enabled is on

Review Request #14823 — Created March 2, 2020 and updated

weixia
hue
ci-commit-master-hue9183
HUE-9183
hue
johan, ranade, romain, yingc

Authenticate with kerberos principal to avoid 401 error

unit test passed

  • 0
  • 0
  • 7
  • 0
  • 7
Description From Last Updated
romain
  1. Shorter title?

    "HUE-9183 [impala] update hue to use kerberos principal to communicate with Impala when webserver_require_spnego or is_kerberos_enabled is on"

    -->

    "HUE-9183 [impala] Communicate securely with Impala UI when webserver_require_spnego or is_kerberos_enabled is on"

    Nice one! A few nits

    And preparing an example of mock test so that it can be tested

  2. apps/impala/src/impala/conf.py (Diff revision 1)
     
     
     
     
     
     
     

    To revert as not used (and indeed not needed with the other flag)

  3. apps/impala/src/impala/impala_flags.py (Diff revision 1)
     
     
     
     
     

    nit: Indentation

  4. apps/impala/src/impala/server.py (Diff revision 1)
     
     

    Would it make sense to use either one?

    LOG.info('Using username / password for authentication')
    elif self._webserver_spnego_required() or self._security_enabled:
    self._client.set_kerberos_auth()

  5. apps/impala/src/impala/server.py (Diff revision 1)
     
     

    is_kerberos_enabled --> is_kerberos_enabled()

    ?

  6. apps/impala/src/impala/server.py (Diff revision 1)
     
     

    Nit: comment not needed

  7. 
      
romain
  1. e.g. https://review.cloudera.org/r/14825/ for testing. e.g. Could add a new 'test_spnego_auth'

    1. Thanks Romain for the review and examples, added new unit test.

  2. 
      
weixia
romain
  1. Commit name?

    Nice!

  2. apps/impala/src/impala/server.py (Diff revision 2)
     
     
    nit: _webserver_spnego_required --> _webserver_spnego_enabled
    
    (that way we are consistent with _security_enabled)
  3. apps/impala/src/impala/server_tests.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Already done one before?

  4. 
      
weixia
Review request changed
Loading...