@Override
  public void start(CoprocessorEnvironment env) {
    // if running at region
    if (env instanceof RegionCoprocessorEnvironment) {
      RegionCoprocessorEnvironment regionEnv = (RegionCoprocessorEnvironment) env;
      /*
       * Getting the RpcServer from a RegionCE is wrong. There cannot be an expectation that Region
       * is hosted inside a RegionServer. If you need RpcServer, then pass in a RegionServerCE.
       * TODO: FIX.
       */
      RegionServerServices rss = ((HasRegionServerServices) regionEnv).getRegionServerServices();
      RpcServerInterface server = rss.getRpcServer();
      SecretManager<?> mgr = ((RpcServer) server).getSecretManager();
      if (mgr instanceof AuthenticationTokenSecretManager) {
        secretManager = (AuthenticationTokenSecretManager) mgr;
      }
    }
  }
Provides a service for obtaining authentication tokens via the {@link AuthenticationProtos}
AuthenticationService coprocessor service.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenProvider.java