You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/06/03 13:32:11 UTC

[GitHub] [superset] ukm21 opened a new issue #14970: User Impersonation is not working for Alert Condition in Alerts

ukm21 opened a new issue #14970:
URL: https://github.com/apache/superset/issues/14970


   Alert condition query is failing in hive as user impersonation is not there
   
   ### Expected results
   
   Alert condition query should execute successfully via user impersonation
   
   ### Actual results
   
   Since user impersonation is not there, User is None so the query is failing in hive
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `1.1.0`
   - python version: `3.8.9`
   - node.js version: `12`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #14970: User Impersonation is not working for Alert Condition in Alerts

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #14970:
URL: https://github.com/apache/superset/issues/14970#issuecomment-854303655


   Hi @ukm21 . How did you configure the Hive authentication? could you show more superset error log ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] pawankurmi commented on issue #14970: User Impersonation is not working for Alert Condition in Alerts

Posted by GitBox <gi...@apache.org>.
pawankurmi commented on issue #14970:
URL: https://github.com/apache/superset/issues/14970#issuecomment-855715394


   @zhaoyongjie  Please find requested information , here I am providing info on the behalf of @ukm21  .
   We have the LDAP authentication and on hive we are having kerberos authentication enabled. User impersonation is enabled at the source. 
   It is working(user impersonation) for superset chart queries, celery warm-up query and email report queries .
   source connection url ans pram snapshot :
   ![image](https://user-images.githubusercontent.com/82380708/120978861-8ffff100-c792-11eb-9188-dbec58c8b7ae.png)
   We can see for the above scenario query is running from ambari 
   
   superset query log which shows user impersonation happening for source.
   ![image](https://user-images.githubusercontent.com/82380708/120977796-5ed2f100-c791-11eb-959d-21b5a67ff83a.png)
   same way impersonation celery warm-up query and email report queries.
   
   but it is not working for the event query which is been submitted for event based alert in superset.
   Please find he error snapshot.
   ![image](https://user-images.githubusercontent.com/82380708/120983644-85942600-c797-11eb-900c-0939874ba029.png)
   
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rumbin commented on issue #14970: User Impersonation is not working for Alert Condition in Alerts

Posted by GitBox <gi...@apache.org>.
rumbin commented on issue #14970:
URL: https://github.com/apache/superset/issues/14970#issuecomment-1018806600


   Confirming this for Superset 1.4.
   
   The queries for taking the snapshots of the dashboards are correctly run with user impersonation as user `admin`, which, I think, is the intended behavior.
   
   However, when the alert condition query is run, the username that is passed as second argument into the `DB_CONNECTION_MUTATOR` is the username that is configured in the basic/unmutated connection string of the DB connection.
   
   Not an expert here, but I have the feeling that the Security Manager is not being used for issuing the alert query. Or at least, the user impersonation is not being applied.
   
   In our case we are working around this issue by using `admin` as the username in the original connection string. This way we achieve that both the alerting query and the snapshotting are passing the same username to the connection mutator. This way we can treat them both the same way.
   
   However, I still feel that this in an improper implementation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #14970: User Impersonation is not working for Alert Condition in Alerts

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #14970:
URL: https://github.com/apache/superset/issues/14970#issuecomment-854303655


   Hi @ukm21 . How did you configure the Hive authentication? could you show more superset error log ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org