@Override
    public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
      Map<String, String> options = new HashMap<>();
      if (principal != null && keyTab != null) {
        options.put("principal", principal);
        options.put("keyTab", keyTab);
        options.put("useKeyTab", "true");
        options.put("storeKey", "true");
      } else {
        options.put("useKeyTab", "false");
        options.put("storeKey", "false");
      }
      options.put("doNotPrompt", "true");
      options.put("useTicketCache", "true");
      options.put("renewTGT", "true");
      options.put("refreshKrb5Config", "true");
      options.put("isInitiator", "true");
      String ticketCache = System.getenv("KRB5CCNAME");
      if (ticketCache != null) {
        options.put("ticketCache", ticketCache);
      }
      options.put("debug", "true");

      return new AppConfigurationEntry[] {
        new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule",
          AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, options) };
    }
See the instructions under hbase-examples/README.txt
hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/HttpDoAsClient.java