@Test public void onEvent() throws MetaException, NoSuchObjectException, InvalidOperationException { PreCreateTableEvent context = mock(PreCreateTableEvent.class); when(context.getEventType()).thenReturn(PreEventType.CREATE_TABLE); Table table = new Table(); table.setTableName(tableName); table.setDbName(dbName); when(context.getTable()).thenReturn(table); UserGroupInformation ugi = UserGroupInformation.createRemoteUser(userName); UserGroupInformation.setLoginUser(ugi); rangerAuth.onEvent(context); }
@Override public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException, InvalidOperationException { String user = null; Set<String> groups = null; try { UserGroupInformation ugi = Utils.getUGI(); user = ugi.getUserName(); groups = Sets.newHashSet(ugi.getGroupNames()); } catch (Exception e) { throw new InvalidOperationException("Unable to read user/group information: " + e); } String operationName = null; HiveAccessType accessType = null; Table table = null; Database db = null; String databaseName = null; String tableName = null; RangerAccessResourceImpl resource = new RangerAccessResourceImpl(); switch (context.getEventType()) { case CREATE_TABLE: table = ((PreCreateTableEvent) context).getTable(); operationName = HiveOperationType.CREATETABLE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_TABLE: table = ((PreDropTableEvent) context).getTable(); operationName = HiveOperationType.DROPTABLE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_TABLE: table = ((PreAlterTableEvent) context).getOldTable(); operationName = "ALTERTABLE"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case READ_TABLE: table = ((PreReadTableEvent) context).getTable(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ADD_PARTITION: table = ((PreAddPartitionEvent) context).getTable(); operationName = "ADDPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_PARTITION: table = ((PreDropPartitionEvent) context).getTable(); operationName = "DROPPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_PARTITION: databaseName = ((PreAlterPartitionEvent) context).getDbName(); tableName = ((PreAlterPartitionEvent) context).getTableName(); accessType = HiveAccessType.ALTER; operationName = "ALTERPARTITION"; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ADD_INDEX: databaseName = ((PreAddIndexEvent) context).getIndex().getDbName(); tableName = ((PreAddIndexEvent) context).getIndex().getOrigTableName(); operationName = "ADDINDEX"; accessType = HiveAccessType.CREATE; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case DROP_INDEX: operationName = "DROPINDEX"; accessType = HiveAccessType.DROP; databaseName = ((PreDropIndexEvent) context).getIndex().getDbName(); tableName = ((PreDropIndexEvent) context).getIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ALTER_INDEX: operationName = "ALTERINDEX"; accessType = HiveAccessType.ALTER; databaseName = ((PreAlterIndexEvent) context).getOldIndex().getDbName(); tableName = ((PreAlterIndexEvent) context).getOldIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case READ_DATABASE: db = ((PreReadDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", db.getName()); break; case CREATE_DATABASE: db = ((PreCreateDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.CREATEDATABASE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", db.getName()); break; case DROP_DATABASE: db = ((PreDropDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.DROPDATABASE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", db.getName()); break; default: return; } resource.setServiceDef(plugin.getServiceDef()); RangerAccessRequestImpl request = new RangerAccessRequestImpl(resource, accessType.name().toLowerCase(), user, groups); request.setAccessTime(new Date()); request.setAction(operationName); RangerAccessResult result = plugin.isAccessAllowed(request); if (result == null) { throw new InvalidOperationException("Permission denied: unable to evaluate ranger policy"); } if (!result.getIsAllowed()) { String path = resource.getAsString(); throw new InvalidOperationException(String .format("Permission denied: user [%s] does not have [%s] privilege on [%s]", user, accessType.name().toLowerCase(), path)); } }
ApiaryRangerAuthPreEventListener extends MetaStorePreEventListener { @Override public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException, InvalidOperationException { String user = null; Set<String> groups = null; try { UserGroupInformation ugi = Utils.getUGI(); user = ugi.getUserName(); groups = Sets.newHashSet(ugi.getGroupNames()); } catch (Exception e) { throw new InvalidOperationException("Unable to read user/group information: " + e); } String operationName = null; HiveAccessType accessType = null; Table table = null; Database db = null; String databaseName = null; String tableName = null; RangerAccessResourceImpl resource = new RangerAccessResourceImpl(); switch (context.getEventType()) { case CREATE_TABLE: table = ((PreCreateTableEvent) context).getTable(); operationName = HiveOperationType.CREATETABLE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_TABLE: table = ((PreDropTableEvent) context).getTable(); operationName = HiveOperationType.DROPTABLE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_TABLE: table = ((PreAlterTableEvent) context).getOldTable(); operationName = "ALTERTABLE"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case READ_TABLE: table = ((PreReadTableEvent) context).getTable(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ADD_PARTITION: table = ((PreAddPartitionEvent) context).getTable(); operationName = "ADDPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_PARTITION: table = ((PreDropPartitionEvent) context).getTable(); operationName = "DROPPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_PARTITION: databaseName = ((PreAlterPartitionEvent) context).getDbName(); tableName = ((PreAlterPartitionEvent) context).getTableName(); accessType = HiveAccessType.ALTER; operationName = "ALTERPARTITION"; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ADD_INDEX: databaseName = ((PreAddIndexEvent) context).getIndex().getDbName(); tableName = ((PreAddIndexEvent) context).getIndex().getOrigTableName(); operationName = "ADDINDEX"; accessType = HiveAccessType.CREATE; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case DROP_INDEX: operationName = "DROPINDEX"; accessType = HiveAccessType.DROP; databaseName = ((PreDropIndexEvent) context).getIndex().getDbName(); tableName = ((PreDropIndexEvent) context).getIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ALTER_INDEX: operationName = "ALTERINDEX"; accessType = HiveAccessType.ALTER; databaseName = ((PreAlterIndexEvent) context).getOldIndex().getDbName(); tableName = ((PreAlterIndexEvent) context).getOldIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case READ_DATABASE: db = ((PreReadDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", db.getName()); break; case CREATE_DATABASE: db = ((PreCreateDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.CREATEDATABASE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", db.getName()); break; case DROP_DATABASE: db = ((PreDropDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.DROPDATABASE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", db.getName()); break; default: return; } resource.setServiceDef(plugin.getServiceDef()); RangerAccessRequestImpl request = new RangerAccessRequestImpl(resource, accessType.name().toLowerCase(), user, groups); request.setAccessTime(new Date()); request.setAction(operationName); RangerAccessResult result = plugin.isAccessAllowed(request); if (result == null) { throw new InvalidOperationException("Permission denied: unable to evaluate ranger policy"); } if (!result.getIsAllowed()) { String path = resource.getAsString(); throw new InvalidOperationException(String .format("Permission denied: user [%s] does not have [%s] privilege on [%s]", user, accessType.name().toLowerCase(), path)); } } }
ApiaryRangerAuthPreEventListener extends MetaStorePreEventListener { @Override public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException, InvalidOperationException { String user = null; Set<String> groups = null; try { UserGroupInformation ugi = Utils.getUGI(); user = ugi.getUserName(); groups = Sets.newHashSet(ugi.getGroupNames()); } catch (Exception e) { throw new InvalidOperationException("Unable to read user/group information: " + e); } String operationName = null; HiveAccessType accessType = null; Table table = null; Database db = null; String databaseName = null; String tableName = null; RangerAccessResourceImpl resource = new RangerAccessResourceImpl(); switch (context.getEventType()) { case CREATE_TABLE: table = ((PreCreateTableEvent) context).getTable(); operationName = HiveOperationType.CREATETABLE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_TABLE: table = ((PreDropTableEvent) context).getTable(); operationName = HiveOperationType.DROPTABLE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_TABLE: table = ((PreAlterTableEvent) context).getOldTable(); operationName = "ALTERTABLE"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case READ_TABLE: table = ((PreReadTableEvent) context).getTable(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ADD_PARTITION: table = ((PreAddPartitionEvent) context).getTable(); operationName = "ADDPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_PARTITION: table = ((PreDropPartitionEvent) context).getTable(); operationName = "DROPPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_PARTITION: databaseName = ((PreAlterPartitionEvent) context).getDbName(); tableName = ((PreAlterPartitionEvent) context).getTableName(); accessType = HiveAccessType.ALTER; operationName = "ALTERPARTITION"; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ADD_INDEX: databaseName = ((PreAddIndexEvent) context).getIndex().getDbName(); tableName = ((PreAddIndexEvent) context).getIndex().getOrigTableName(); operationName = "ADDINDEX"; accessType = HiveAccessType.CREATE; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case DROP_INDEX: operationName = "DROPINDEX"; accessType = HiveAccessType.DROP; databaseName = ((PreDropIndexEvent) context).getIndex().getDbName(); tableName = ((PreDropIndexEvent) context).getIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ALTER_INDEX: operationName = "ALTERINDEX"; accessType = HiveAccessType.ALTER; databaseName = ((PreAlterIndexEvent) context).getOldIndex().getDbName(); tableName = ((PreAlterIndexEvent) context).getOldIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case READ_DATABASE: db = ((PreReadDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", db.getName()); break; case CREATE_DATABASE: db = ((PreCreateDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.CREATEDATABASE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", db.getName()); break; case DROP_DATABASE: db = ((PreDropDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.DROPDATABASE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", db.getName()); break; default: return; } resource.setServiceDef(plugin.getServiceDef()); RangerAccessRequestImpl request = new RangerAccessRequestImpl(resource, accessType.name().toLowerCase(), user, groups); request.setAccessTime(new Date()); request.setAction(operationName); RangerAccessResult result = plugin.isAccessAllowed(request); if (result == null) { throw new InvalidOperationException("Permission denied: unable to evaluate ranger policy"); } if (!result.getIsAllowed()) { String path = resource.getAsString(); throw new InvalidOperationException(String .format("Permission denied: user [%s] does not have [%s] privilege on [%s]", user, accessType.name().toLowerCase(), path)); } } ApiaryRangerAuthPreEventListener(Configuration config);  ApiaryRangerAuthPreEventListener(Configuration config, RangerBasePlugin plugin); }
ApiaryRangerAuthPreEventListener extends MetaStorePreEventListener { @Override public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException, InvalidOperationException { String user = null; Set<String> groups = null; try { UserGroupInformation ugi = Utils.getUGI(); user = ugi.getUserName(); groups = Sets.newHashSet(ugi.getGroupNames()); } catch (Exception e) { throw new InvalidOperationException("Unable to read user/group information: " + e); } String operationName = null; HiveAccessType accessType = null; Table table = null; Database db = null; String databaseName = null; String tableName = null; RangerAccessResourceImpl resource = new RangerAccessResourceImpl(); switch (context.getEventType()) { case CREATE_TABLE: table = ((PreCreateTableEvent) context).getTable(); operationName = HiveOperationType.CREATETABLE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_TABLE: table = ((PreDropTableEvent) context).getTable(); operationName = HiveOperationType.DROPTABLE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_TABLE: table = ((PreAlterTableEvent) context).getOldTable(); operationName = "ALTERTABLE"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case READ_TABLE: table = ((PreReadTableEvent) context).getTable(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ADD_PARTITION: table = ((PreAddPartitionEvent) context).getTable(); operationName = "ADDPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_PARTITION: table = ((PreDropPartitionEvent) context).getTable(); operationName = "DROPPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_PARTITION: databaseName = ((PreAlterPartitionEvent) context).getDbName(); tableName = ((PreAlterPartitionEvent) context).getTableName(); accessType = HiveAccessType.ALTER; operationName = "ALTERPARTITION"; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ADD_INDEX: databaseName = ((PreAddIndexEvent) context).getIndex().getDbName(); tableName = ((PreAddIndexEvent) context).getIndex().getOrigTableName(); operationName = "ADDINDEX"; accessType = HiveAccessType.CREATE; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case DROP_INDEX: operationName = "DROPINDEX"; accessType = HiveAccessType.DROP; databaseName = ((PreDropIndexEvent) context).getIndex().getDbName(); tableName = ((PreDropIndexEvent) context).getIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ALTER_INDEX: operationName = "ALTERINDEX"; accessType = HiveAccessType.ALTER; databaseName = ((PreAlterIndexEvent) context).getOldIndex().getDbName(); tableName = ((PreAlterIndexEvent) context).getOldIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case READ_DATABASE: db = ((PreReadDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", db.getName()); break; case CREATE_DATABASE: db = ((PreCreateDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.CREATEDATABASE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", db.getName()); break; case DROP_DATABASE: db = ((PreDropDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.DROPDATABASE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", db.getName()); break; default: return; } resource.setServiceDef(plugin.getServiceDef()); RangerAccessRequestImpl request = new RangerAccessRequestImpl(resource, accessType.name().toLowerCase(), user, groups); request.setAccessTime(new Date()); request.setAction(operationName); RangerAccessResult result = plugin.isAccessAllowed(request); if (result == null) { throw new InvalidOperationException("Permission denied: unable to evaluate ranger policy"); } if (!result.getIsAllowed()) { String path = resource.getAsString(); throw new InvalidOperationException(String .format("Permission denied: user [%s] does not have [%s] privilege on [%s]", user, accessType.name().toLowerCase(), path)); } } ApiaryRangerAuthPreEventListener(Configuration config);  ApiaryRangerAuthPreEventListener(Configuration config, RangerBasePlugin plugin); @Override void onEvent(PreEventContext context); }
ApiaryRangerAuthPreEventListener extends MetaStorePreEventListener { @Override public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException, InvalidOperationException { String user = null; Set<String> groups = null; try { UserGroupInformation ugi = Utils.getUGI(); user = ugi.getUserName(); groups = Sets.newHashSet(ugi.getGroupNames()); } catch (Exception e) { throw new InvalidOperationException("Unable to read user/group information: " + e); } String operationName = null; HiveAccessType accessType = null; Table table = null; Database db = null; String databaseName = null; String tableName = null; RangerAccessResourceImpl resource = new RangerAccessResourceImpl(); switch (context.getEventType()) { case CREATE_TABLE: table = ((PreCreateTableEvent) context).getTable(); operationName = HiveOperationType.CREATETABLE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_TABLE: table = ((PreDropTableEvent) context).getTable(); operationName = HiveOperationType.DROPTABLE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_TABLE: table = ((PreAlterTableEvent) context).getOldTable(); operationName = "ALTERTABLE"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case READ_TABLE: table = ((PreReadTableEvent) context).getTable(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ADD_PARTITION: table = ((PreAddPartitionEvent) context).getTable(); operationName = "ADDPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case DROP_PARTITION: table = ((PreDropPartitionEvent) context).getTable(); operationName = "DROPPARTITION"; accessType = HiveAccessType.ALTER; resource.setValue("database", table.getDbName()); resource.setValue("table", table.getTableName()); break; case ALTER_PARTITION: databaseName = ((PreAlterPartitionEvent) context).getDbName(); tableName = ((PreAlterPartitionEvent) context).getTableName(); accessType = HiveAccessType.ALTER; operationName = "ALTERPARTITION"; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ADD_INDEX: databaseName = ((PreAddIndexEvent) context).getIndex().getDbName(); tableName = ((PreAddIndexEvent) context).getIndex().getOrigTableName(); operationName = "ADDINDEX"; accessType = HiveAccessType.CREATE; resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case DROP_INDEX: operationName = "DROPINDEX"; accessType = HiveAccessType.DROP; databaseName = ((PreDropIndexEvent) context).getIndex().getDbName(); tableName = ((PreDropIndexEvent) context).getIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case ALTER_INDEX: operationName = "ALTERINDEX"; accessType = HiveAccessType.ALTER; databaseName = ((PreAlterIndexEvent) context).getOldIndex().getDbName(); tableName = ((PreAlterIndexEvent) context).getOldIndex().getOrigTableName(); resource.setValue("database", databaseName); resource.setValue("table", tableName); break; case READ_DATABASE: db = ((PreReadDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.QUERY.name(); accessType = HiveAccessType.SELECT; resource.setValue("database", db.getName()); break; case CREATE_DATABASE: db = ((PreCreateDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.CREATEDATABASE.name(); accessType = HiveAccessType.CREATE; resource.setValue("database", db.getName()); break; case DROP_DATABASE: db = ((PreDropDatabaseEvent) context).getDatabase(); operationName = HiveOperationType.DROPDATABASE.name(); accessType = HiveAccessType.DROP; resource.setValue("database", db.getName()); break; default: return; } resource.setServiceDef(plugin.getServiceDef()); RangerAccessRequestImpl request = new RangerAccessRequestImpl(resource, accessType.name().toLowerCase(), user, groups); request.setAccessTime(new Date()); request.setAction(operationName); RangerAccessResult result = plugin.isAccessAllowed(request); if (result == null) { throw new InvalidOperationException("Permission denied: unable to evaluate ranger policy"); } if (!result.getIsAllowed()) { String path = resource.getAsString(); throw new InvalidOperationException(String .format("Permission denied: user [%s] does not have [%s] privilege on [%s]", user, accessType.name().toLowerCase(), path)); } } ApiaryRangerAuthPreEventListener(Configuration config);  ApiaryRangerAuthPreEventListener(Configuration config, RangerBasePlugin plugin); @Override void onEvent(PreEventContext context);  }