Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-739

when user doesn't have admin privileges, show grant throw exception, better improve error message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.6.0
    • Hive Plugin
    • None

    Description

      Better to improve the below error message to instruct user to grant admin privilege.

      0: jdbc:hive2://a2110.halxg.cloudera.com:1000> SHOW GRANT ROLE lktfddwe_role_7 ON TABLE lktfddwe_db_1.tab_4;
      ERROR : Error processing Sentry command: Access denied to systest. Server Stacktrace: org.apache.sentry.provider.db.SentryAccessDeniedException: Access denied to systest
      	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.list_sentry_privileges_by_role(SentryPolicyStoreProcessor.java:491)
      	at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$list_sentry_privileges_by_role.getResult(SentryPolicyService.java:973)
      	at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$list_sentry_privileges_by_role.getResult(SentryPolicyService.java:958)
      	at sentry.org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
      	at sentry.org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
      	at org.apache.sentry.provider.db.service.thrift.SentryProcessorWrapper.process(SentryProcessorWrapper.java:48)
      	at sentry.org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123)
      	at sentry.org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      
      Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.SentryGrantRevokeTask. SentryAccessDeniedException: Access denied to systest (state=08S01,code=1)
      

      Attachments

        1. SENTRY-739.001.patch
          1 kB
          Colin

        Activity

          People

            colin Colin
            anneyu Anne Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: