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

Bug fixing for the test case "TestMetaStoreWithPigHCat"

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • None

    Description

      The policyFile is not set correctly.
      Currently, the privilege is set by the following code, "server=server1->db=db_1->table=*->action=SELECT", and the value of table is "*". The method List<MSentryPrivilege> getMSentryPrivileges(Set<String> roleNames, TSentryAuthorizable authHierarchy) in SentryStore can't get this privilege.

      .addPermissionsToRole(db_all_role, "server=server1->db=" + dbName)
               .addPermissionsToRole("read_db_role",
                 "server=server1->db=" + dbName + "->table=*->action=SELECT")
      

      The error setting cause the following exception,

      try {
         execPigLatin(USER2_1, pigServer, "store A into '" + dbName + "." + tabName + "' using "
                + HCatStorer.class.getName() + " ('part_col=part2');");
            fail("USER2_1 has no access to the metadata, exception will be thrown.");
          } catch (IOException e) {
            // ignore the exception
          }
      

      Attachments

        1. SENTRY-570.001.patch
          4 kB
          Colin
        2. SENTRY-570.002.patch
          4 kB
          Colin

        Issue Links

          Activity

            People

              colin Colin
              colin Colin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: