hellobabygogo closed pull request #6708: fix druid-basic-security rolling
upgrade bug
URL: https://github.com/apache/incubator-druid/pull/6708
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java
b/server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java
index 21c2e675fc5..091d79f9a27 100644
---
a/server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java
+++
b/server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java
@@ -102,6 +102,11 @@ public AuthenticatorMapper get()
}
for (String authenticatorName : authenticators) {
+ if (AuthConfig.ALLOW_ALL_NAME.equals(authenticatorName)) {
+ authenticatorMap.put(AuthConfig.ALLOW_ALL_NAME, new
AllowAllAuthenticator());
+ continue;
+ }
+
final String authenticatorPropertyBase =
StringUtils.format(AUTHENTICATOR_PROPERTIES_FORMAT_STRING, authenticatorName);
final JsonConfigProvider<Authenticator> authenticatorProvider = new
JsonConfigProvider<>(
authenticatorPropertyBase,
diff --git
a/server/src/main/java/org/apache/druid/server/initialization/AuthorizerMapperModule.java
b/server/src/main/java/org/apache/druid/server/initialization/AuthorizerMapperModule.java
index bd2d7cbf7ce..bb42f484731 100644
---
a/server/src/main/java/org/apache/druid/server/initialization/AuthorizerMapperModule.java
+++
b/server/src/main/java/org/apache/druid/server/initialization/AuthorizerMapperModule.java
@@ -114,6 +114,12 @@ public Authorizer getAuthorizer(String name)
}
for (String authorizerName : authorizers) {
+ if (AuthConfig.ALLOW_ALL_NAME.equals(authorizerName)) {
+ AllowAllAuthorizer allowAllAuthorizer = new AllowAllAuthorizer();
+ authorizerMap.put(AuthConfig.ALLOW_ALL_NAME, allowAllAuthorizer);
+ continue;
+ }
+
final String authorizerPropertyBase =
StringUtils.format(AUTHORIZER_PROPERTIES_FORMAT_STRING, authorizerName);
final JsonConfigProvider<Authorizer> authorizerProvider = new
JsonConfigProvider<>(
authorizerPropertyBase,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]