use of com.yahoo.pulsar.websocket.service.WebSocketProxyConfiguration in project pulsar by yahoo.
the class ProxyAuthenticationTest method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setClusterName("use");
config.setAuthenticationEnabled(true);
config.setAuthenticationProviders(Sets.newHashSet("com.yahoo.pulsar.websocket.proxy.MockAuthenticationProvider"));
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
use of com.yahoo.pulsar.websocket.service.WebSocketProxyConfiguration in project pulsar by yahoo.
the class ProxyAuthorizationTest method setup.
@BeforeClass
@Override
protected void setup() throws Exception {
conf.setClusterName("c1");
internalSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
Set<String> superUser = Sets.newHashSet("");
config.setAuthorizationEnabled(true);
config.setGlobalZookeeperServers("dummy-zk-servers");
config.setSuperUserRoles(superUser);
config.setClusterName("c1");
config.setWebServicePort(TEST_PORT);
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
service.start();
}
use of com.yahoo.pulsar.websocket.service.WebSocketProxyConfiguration in project pulsar by yahoo.
the class ProxyPublishConsumeTest method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setClusterName("use");
config.setGlobalZookeeperServers("dummy-zk-servers");
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
use of com.yahoo.pulsar.websocket.service.WebSocketProxyConfiguration in project pulsar by yahoo.
the class ProxyPublishConsumeTls method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setWebServicePortTls(TLS_TEST_PORT);
config.setTlsEnabled(true);
config.setTlsKeyFilePath(TLS_SERVER_KEY_FILE_PATH);
config.setTlsCertificateFilePath(TLS_SERVER_CERT_FILE_PATH);
config.setClusterName("use");
config.setGlobalZookeeperServers("dummy-zk-servers");
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
use of com.yahoo.pulsar.websocket.service.WebSocketProxyConfiguration in project pulsar by yahoo.
the class ProxyPublishConsumeWithoutZKTest method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setClusterName("use");
config.setServiceUrl(pulsar.getWebServiceAddress());
config.setServiceUrlTls(pulsar.getWebServiceAddressTls());
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
Aggregations