[
https://issues.apache.org/jira/browse/DRILL-5819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201009#comment-16201009
]
ASF GitHub Bot commented on DRILL-5819:
---------------------------------------
Github user bitblender commented on a diff in the pull request:
https://github.com/apache/drill/pull/983#discussion_r144143072
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
---
@@ -75,6 +80,29 @@ public ClusterInfo getClusterInfoJSON() {
final DrillConfig config = dbContext.getConfig();
final boolean userEncryptionEnabled =
config.getBoolean(ExecConstants.USER_ENCRYPTION_SASL_ENABLED);
final boolean bitEncryptionEnabled =
config.getBoolean(ExecConstants.BIT_ENCRYPTION_SASL_ENABLED);
+ // If the user is logged in and is admin user then show the admin user
info
+ // For all other cases the user info need-not or should-not be
displayed
+ OptionManager optionManager = work.getContext().getOptionManager();
+ final boolean isUserLoggedIn = AuthDynamicFeature.isUserLoggedIn(sc);
+ String adminUsers = isUserLoggedIn ?
+
ExecConstants.ADMIN_USERS_VALIDATOR.getAdminUsers(optionManager) : null;
+ String adminUserGroups = isUserLoggedIn ?
+
ExecConstants.ADMIN_USER_GROUPS_VALIDATOR.getAdminUserGroups(optionManager) :
null;
+
+ // separate groups by comma + space
+ if (adminUsers != null) {
+ String[] groups = adminUsers.split(",");
+ adminUsers = DrillStringUtils.join(groups, ", ");
+ }
+
+ // separate groups by comma + space
+ if (adminUserGroups != null) {
+ String[] groups = adminUserGroups.split(",");
+ adminUserGroups = DrillStringUtils.join(groups, ", ");
--- End diff --
I pushing changes that handle ill-formatted user input
> Default value of security.admin.user_groups and security.admin.users is "true"
> ------------------------------------------------------------------------------
>
> Key: DRILL-5819
> URL: https://issues.apache.org/jira/browse/DRILL-5819
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.11.0
> Reporter: Prasad Nagaraj Subramanya
> Fix For: 1.12.0
>
>
> Default value of security.admin.user_groups and security.admin.users is "true"
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)