private Config decorate(Config config, String licenceKey) { config.setLicenseKey(licenceKey); config.setProperty(GroupProperties.PROP_WAIT_SECONDS_BEFORE_JOIN, "0"); final SecurityInterceptorConfig securityInterceptorConfig = new SecurityInterceptorConfig(); securityInterceptorConfig.setClassName(HazelcastSecurityInterceptor.class.getName()); final SecurityConfig securityConfig = config.getSecurityConfig(); securityConfig.setEnabled(true).addSecurityInterceptorConfig(securityInterceptorConfig); //When you enable security all client requests are denied, so we need to give permission first //security-interceptor will be run after checking this permission final PermissionConfig permissionConfig = new PermissionConfig(PermissionConfig.PermissionType.ALL, "", null); securityConfig.addClientPermissionConfig(permissionConfig); return config; }
public void configure(SecurityConfig securityConfig, Properties properties) { }
/** * Configures {@link IPermissionPolicy}. * * @param securityConfig Hazelcast {@link SecurityConfig} * @param properties */ void configure(SecurityConfig securityConfig, Properties properties);