Skip to content

Commit

Permalink
set authenticator via system property (stargate#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekl007 authored Mar 4, 2021
1 parent 9fe6fb4 commit 0435b64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ public static Config makeConfig(File baseDir) throws IOException {
String enableAuth = System.getProperty("stargate.enable_auth", "false");

if (enableAuth.equalsIgnoreCase("true")) {
c.authenticator = PasswordAuthenticator.class.getCanonicalName();
c.authenticator =
System.getProperty(
"stargate.authenticator_class_name", PasswordAuthenticator.class.getCanonicalName());
c.authorizer = DelegatingAuthorizer.class.getCanonicalName();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public static Config makeConfig(File baseDir) throws IOException {
String enableAuth = System.getProperty("stargate.enable_auth", "false");

if (enableAuth.equalsIgnoreCase("true")) {
c.authenticator = PasswordAuthenticator.class.getCanonicalName();
c.authenticator =
System.getProperty(
"stargate.authenticator_class_name", PasswordAuthenticator.class.getCanonicalName());
c.authorizer = DelegatingAuthorizer.class.getCanonicalName();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ public static Config makeConfig(File baseDir) throws IOException {

if (enableAuth.equalsIgnoreCase("true")) {
// TODO: Use DseAuthenticator and DseAuthorizer. We need to configure them properly
c.authenticator = PasswordAuthenticator.class.getCanonicalName();
c.authenticator =
System.getProperty(
"stargate.authenticator_class_name", PasswordAuthenticator.class.getCanonicalName());
c.authorizer = DelegatingAuthorizer.class.getName();
}

Expand Down

0 comments on commit 0435b64

Please sign in to comment.