@Override
  public TableDescriptor preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
    TableName tableName, TableDescriptor currentDesc, TableDescriptor newDesc) throws IOException {
    verifyCoprocessors(ctx, newDesc);
    return newDesc;
  }
Master observer for restricting coprocessor assignments.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/CoprocessorWhitelistMasterObserver.java