Class TestCoprocessorWhitelistMasterObserver

java.lang.Object
org.apache.hadoop.hbase.security.access.SecureTestUtil
org.apache.hadoop.hbase.security.access.TestCoprocessorWhitelistMasterObserver

Performs coprocessor loads for various paths and malformed strings
  • Field Details

  • Constructor Details

  • Method Details

    • tearDownTestCoprocessorWhitelistMasterObserver

      Throws:
      Exception
    • positiveTestCase

      private static void positiveTestCase(String[] whitelistedPaths, String coprocessorPath) throws Exception
      Test a table modification adding a coprocessor path which is not whitelisted.
      Parameters:
      whitelistedPaths - A String array of paths to add in for the whitelisting configuration
      coprocessorPath - A String to use as the path for a mock coprocessor
      Throws:
      Exception - should be thrown and caught to show coprocessor is working as desired
    • negativeTestCase

      private static void negativeTestCase(String[] whitelistedPaths, String coprocessorPath) throws Exception
      Test a table modification adding a coprocessor path which is whitelisted. The coprocessor should be added to the table descriptor successfully.
      Parameters:
      whitelistedPaths - A String array of paths to add in for the whitelisting configuration
      coprocessorPath - A String to use as the path for a mock coprocessor
      Throws:
      Exception
    • testSubstringNonWhitelisted

      public void testSubstringNonWhitelisted() throws Exception
      Test a table modification adding a coprocessor path which is not whitelisted.
      Throws:
      Exception - should be thrown and caught to show coprocessor is working as desired
    • testDifferentFileSystemNonWhitelisted

      Test a table creation including a coprocessor path which is not whitelisted. Coprocessor should be added to table descriptor. Table is disabled to avoid an IOException due to the added coprocessor not actually existing on disk.
      Throws:
      Exception
    • testSchemeAndDirectorywhitelisted

      Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be added to table descriptor. Table is disabled to avoid an IOException due to the added coprocessor not actually existing on disk.
      Throws:
      Exception
    • testSchemeWhitelisted

      public void testSchemeWhitelisted() throws Exception
      Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be added to table descriptor. Table is disabled to avoid an IOException due to the added coprocessor not actually existing on disk.
      Throws:
      Exception
    • testDFSNameWhitelistedWorks

      public void testDFSNameWhitelistedWorks() throws Exception
      Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be added to table descriptor. Table is disabled to avoid an IOException due to the added coprocessor not actually existing on disk.
      Throws:
      Exception
    • testDFSNameNotWhitelistedFails

      Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be added to table descriptor. Table is disabled to avoid an IOException due to the added coprocessor not actually existing on disk.
      Throws:
      Exception
    • testBlanketWhitelist

      public void testBlanketWhitelist() throws Exception
      Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be added to table descriptor. Table is disabled to avoid an IOException due to the added coprocessor not actually existing on disk.
      Throws:
      Exception
    • testCreationNonWhitelistedCoprocessorPath

      Test a table creation including a coprocessor path which is not whitelisted. Table will not be created due to the offending coprocessor.
      Throws:
      Exception
    • testCreationClasspathCoprocessor

      Test a table creation including a coprocessor path which is on the classpath. Table will be created with the coprocessor.
      Throws:
      Exception