/** * Adds a rule that forbids access to the given set of IP addresses. * * @param blackList * The list of rejected IP addresses. */ public void addIpAddressesBlackList(List<String> blackList) { add(new FirewallIpFilteringRule(blackList, false)); }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of concurrent requests, in any other case the access is forbidden. * * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesConcurrencyCounter(Map<String, Integer> limitsPerRole) { addRolesConcurrencyCounter(limitsPerRole, 0); }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of requests by period of time, in any other case the access is forbidden. * * @param period * The period of time. * @param periodUnit * Period time unit associated to the rule. * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesPeriodicCounter(int period, TimeUnit periodUnit, Map<String, Integer> limitsPerRole) { addRolesPeriodicCounter(period, periodUnit, limitsPerRole, 0); }
private void addIpFilterRules(FirewallSettings firewallSettings, FirewallConfig firewallConfig) { if (firewallSettings.getIpFilters() != null) { for (FirewallIpFilter ipFilter : firewallSettings.getIpFilters()) { if (ipFilter.isWhiteList()) { firewallConfig.addIpAddressesWhiteList(ipFilter.getIps()); } else { firewallConfig.addIpAddressesBlackList(ipFilter.getIps()); } } } }
FirewallModule firewallModule = new FirewallModule( restletCloudConfig, modulesSettings); FirewallConfig firewallConfig = new FirewallConfig( firewallRules); firewallModule.updateFirewallConfig(firewallConfig);
private void addIpFilterRules(FirewallSettings firewallSettings, FirewallConfig firewallConfig) { if (firewallSettings.getIpFilters() != null) { for (FirewallIpFilter ipFilter : firewallSettings.getIpFilters()) { if (ipFilter.isWhiteList()) { firewallConfig.addIpAddressesWhiteList(ipFilter.getIps()); } else { firewallConfig.addIpAddressesBlackList(ipFilter.getIps()); } } } }
FirewallModule firewallModule = new FirewallModule( restletCloudConfig, modulesSettings); FirewallConfig firewallConfig = new FirewallConfig( firewallRules); firewallModule.updateFirewallConfig(firewallConfig);
/** * Adds a rule that forbids access to the given set of IP addresses. * * @param blackList * The list of rejected IP addresses. */ public void addIpAddressesBlackList(List<String> blackList) { add(new FirewallIpFilteringRule(blackList, false)); }
private void addIpFilterRules(FirewallSettings firewallSettings, FirewallConfig firewallConfig) { if (firewallSettings.getIpFilters() != null) { for (FirewallIpFilter ipFilter : firewallSettings.getIpFilters()) { if (ipFilter.isWhiteList()) { firewallConfig.addIpAddressesWhiteList(ipFilter.getIps()); } else { firewallConfig.addIpAddressesBlackList(ipFilter.getIps()); } } } }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of requests by period of time, in any other case the access is forbidden. * * @param period * The period of time. * @param periodUnit * Period time unit associated to the rule. * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesPeriodicCounter(int period, TimeUnit periodUnit, Map<String, Integer> limitsPerRole) { addRolesPeriodicCounter(period, periodUnit, limitsPerRole, 0); }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of concurrent requests, in any other case the access is forbidden. * * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesConcurrencyCounter(Map<String, Integer> limitsPerRole) { addRolesConcurrencyCounter(limitsPerRole, 0); }
FirewallModule firewallModule = new FirewallModule( restletCloudConfig, modulesSettings); FirewallConfig firewallConfig = new FirewallConfig( firewallRules); firewallModule.updateFirewallConfig(firewallConfig);
/** * Adds a rule that restricts access to the given set of IP addresses. * * @param whiteList * The list of accepted IP addresses. */ public void addIpAddressesWhiteList(List<String> whiteList) { add(new FirewallIpFilteringRule(whiteList, true)); }
private void addIpFilterRules(FirewallSettings firewallSettings, FirewallConfig firewallConfig) { if (firewallSettings.getIpFilters() != null) { for (FirewallIpFilter ipFilter : firewallSettings.getIpFilters()) { if (ipFilter.isWhiteList()) { firewallConfig.addIpAddressesWhiteList(ipFilter.getIps()); } else { firewallConfig.addIpAddressesBlackList(ipFilter.getIps()); } } } }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of requests by period of time, in any other case the access is forbidden. * * @param period * The period of time. * @param periodUnit * Period time unit associated to the rule. * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesPeriodicCounter(int period, TimeUnit periodUnit, Map<String, Integer> limitsPerRole) { addRolesPeriodicCounter(period, periodUnit, limitsPerRole, 0); }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of concurrent requests, in any other case the access is forbidden. * * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesConcurrencyCounter(Map<String, Integer> limitsPerRole) { addRolesConcurrencyCounter(limitsPerRole, 0); }
FirewallModule firewallModule = new FirewallModule( restletCloudConfig, modulesSettings); FirewallConfig firewallConfig = new FirewallConfig( firewallRules); firewallModule.updateFirewallConfig(firewallConfig);
/** * Adds a rule that restricts access to the given set of IP addresses. * * @param whiteList * The list of accepted IP addresses. */ public void addIpAddressesWhiteList(List<String> whiteList) { add(new FirewallIpFilteringRule(whiteList, true)); }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of requests by period of time, in any other case the access is forbidden. * * @param period * The period of time. * @param periodUnit * Period time unit associated to the rule. * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesPeriodicCounter(int period, TimeUnit periodUnit, Map<String, Integer> limitsPerRole) { addRolesPeriodicCounter(period, periodUnit, limitsPerRole, 0); }
/** * Adds a rule that restricts access according to the {@link Role} of the * current authenticated {@link User}. Each role is defined a limit in terms * of concurrent requests, in any other case the access is forbidden. * * @param limitsPerRole * The limit assigned per role's name. */ public void addRolesConcurrencyCounter(Map<String, Integer> limitsPerRole) { addRolesConcurrencyCounter(limitsPerRole, 0); }