title: How to Impersonate Impala queries on Superset
body: <p>I'm setting up Superset (0.36.0) in production Mode (with Gunicorn), and I would like to set up impersonate while running Impala queries on my Kerberized Cluster, to each user of Superset have privilegies on tables/databases like he has on Hive/Hue/HDFS. I've tried to set "Impersonate the logged on user" to true in my database config, but it's not changing the user that is running the query, it's always using the celery-worker user.</p>
  
  <p>My database config is:</p>
  
  <p><a href="https://i.stack.imgur.com/fseo0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fseo0.png" alt="Top Database Config"></a>
  <a href="https://i.stack.imgur.com/0aMvr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0aMvr.png" alt="End of Database Config"></a></p>
  
  <p>Extras:</p>
  
  <pre><code>{
      "metadata_params": {},
      "engine_params":  {
              "connect_args": {  
                      "port": 21050,
                      "use_ssl": "True", 
                      "ca_cert": "/path/to/my/cert.pem",
                      "auth_mechanism": "GSSAPI"
           }
       },
      "metadata_cache_timeout": {},
      "schemas_allowed_for_csv_upload": []
  }
  </code></pre>
  
  <p>My query resume in Cloudera Manager (5.13):</p>
  
  <p><a href="https://i.stack.imgur.com/tZz3Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tZz3Z.png" alt="Query in CM"></a></p>
  
  <p>How can I enable Impersonate correctly in my Superset? Maybe there is something related to the config <code>impala.doas.user</code> in HiveServer2 connection, but I don't know how to config this properly.</p>