Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access control for Pinot server segment download api. #5260

Merged
merged 4 commits into from
Apr 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import org.apache.pinot.server.realtime.ServerSegmentCompletionProtocolHandler;
import org.apache.pinot.server.starter.ServerInstance;
import org.apache.pinot.spi.filesystem.PinotFSFactory;
import org.apache.pinot.spi.plugin.PluginManager;
import org.apache.pinot.spi.utils.builder.TableNameBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -159,9 +160,11 @@ public HelixServerStarter(String helixClusterName, String zkAddress, Configurati
LOGGER.info("Using class: {} as the AccessControlFactory", accessControlFactoryClass);
final AccessControlFactory accessControlFactory;
try {
accessControlFactory = (AccessControlFactory) Class.forName(accessControlFactoryClass).newInstance();
accessControlFactory = PluginManager.get().createInstance(accessControlFactoryClass);
} catch (Exception e) {
throw new RuntimeException("Caught exception while creating new AccessControlFactory instance", e);
throw new RuntimeException(
"Caught exception while creating new AccessControlFactory instance in class " + this.getClass()
chenboat marked this conversation as resolved.
Show resolved Hide resolved
.getSimpleName(), e);
}

int adminApiPort = _serverConf.getInt(CONFIG_OF_ADMIN_API_PORT, DEFAULT_ADMIN_API_PORT);
Expand Down