Search in sources :

Example 1 with KsqlUserContextProvider

use of io.confluent.ksql.security.KsqlUserContextProvider in project ksql by confluentinc.

the class AuthTest method createServer.

@Override
protected void createServer(KsqlRestConfig serverConfig) {
    server = new Server(vertx, serverConfig, testEndpoints, new KsqlSecurityExtension() {

        @Override
        public void initialize(final KsqlConfig ksqlConfig) {
        }

        @Override
        public Optional<KsqlAuthorizationProvider> getAuthorizationProvider() {
            return Optional.ofNullable(authorizationProvider);
        }

        @Override
        public Optional<KsqlUserContextProvider> getUserContextProvider() {
            return Optional.ofNullable(userContextProvider);
        }

        @Override
        public void close() {
        }
    }, Optional.ofNullable(securityHandlerPlugin), serverState, Optional.empty());
    server.start();
}
Also used : Server(io.confluent.ksql.api.server.Server) KsqlUserContextProvider(io.confluent.ksql.security.KsqlUserContextProvider) KsqlConfig(io.confluent.ksql.util.KsqlConfig) KsqlSecurityExtension(io.confluent.ksql.security.KsqlSecurityExtension) KsqlAuthorizationProvider(io.confluent.ksql.security.KsqlAuthorizationProvider)

Aggregations

Server (io.confluent.ksql.api.server.Server)1 KsqlAuthorizationProvider (io.confluent.ksql.security.KsqlAuthorizationProvider)1 KsqlSecurityExtension (io.confluent.ksql.security.KsqlSecurityExtension)1 KsqlUserContextProvider (io.confluent.ksql.security.KsqlUserContextProvider)1 KsqlConfig (io.confluent.ksql.util.KsqlConfig)1