Search in sources :

Example 1 with DenyAuthorizer

use of org.apache.storm.security.auth.authorizer.DenyAuthorizer in project storm by apache.

the class DRPCTest method testDeny.

@Test
public void testDeny() throws Exception {
    try (DRPC server = new DRPC(new StormMetricsRegistry(), new DenyAuthorizer(), 100)) {
        assertThrows(() -> server.executeBlocking("testing", "test"), AuthorizationException.class);
        assertThrows(() -> server.fetchRequest("testing"), AuthorizationException.class);
    }
}
Also used : DenyAuthorizer(org.apache.storm.security.auth.authorizer.DenyAuthorizer) StormMetricsRegistry(org.apache.storm.metric.StormMetricsRegistry) Test(org.junit.Test)

Aggregations

StormMetricsRegistry (org.apache.storm.metric.StormMetricsRegistry)1 DenyAuthorizer (org.apache.storm.security.auth.authorizer.DenyAuthorizer)1 Test (org.junit.Test)1