[ 
https://issues.apache.org/jira/browse/SENTRY-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269367#comment-16269367
 ] 

Liam Sargent commented on SENTRY-410:
-------------------------------------

Interested in taking this Issue on.

>From what I understand, verifyAuthzExceptionForState can be used to check the 
>SqlState of a SqlException thrown by Hive. State 42000 is used for "syntax 
>error or access violation" - these are seemingly disparate exceptional cases. 
>A common semantic error != a sentry access violation.

Curious what anyone thinks is a better way to verify the expected Exception has 
occurred - perhaps more strict Exception-type checking in addition to SQLState?



> Some negative test cases do not check for specific Sentry exceptions
> --------------------------------------------------------------------
>
>                 Key: SENTRY-410
>                 URL: https://issues.apache.org/jira/browse/SENTRY-410
>             Project: Sentry
>          Issue Type: Test
>    Affects Versions: 1.4.0
>            Reporter: Sravya Tirukkovalur
>             Fix For: 2.1.0
>
>
> in Context.java:
> {noformat}
> // verify that the sqlexception is due to authorization failure
>   public void verifyAuthzException(SQLException sqlException) throws 
> SQLException{
>     verifyAuthzExceptionForState(sqlException, AUTHZ_EXCEPTION_SQL_STATE);
>   }
> {noformat}
> This just checks for status 42000, which would also be the case for other 
> failures other than SemanticExceptions. We need to make stronger checks in 
> the tests.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to