Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-15772 More visible security warnings in Admin UI (#1296)

Jan Høydahlee8c18188eb8
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 3671e59d17a..d7b96214ea8 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -121,6 +121,8 @@ Improvements
* SOLR-16616: JWTAuthPlugin: Read trusted X509 certificates from multiple files (janhoy)
+* SOLR-15772: More visible security warnings in Admin UI (janhoy)
+
Optimizations
---------------------
diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.js
index a8bd2f5eb0e..206f246e866 100644
--- a/solr/webapp/web/js/angular/app.js
+++ b/solr/webapp/web/js/angular/app.js
@@ -524,6 +524,7 @@ solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $
System.get(function(data) {
$scope.isCloudEnabled = data.mode.match( /solrcloud/i );
$scope.usersPermissions = data.security.permissions;
+ $scope.isSecurityEnabled = $scope.authenticationPlugin != null;
$scope.isSchemaDesignerEnabled = $scope.isPermitted([
permissions.CONFIG_EDIT_PERM,
diff --git a/solr/webapp/web/partials/index.html b/solr/webapp/web/partials/index.html
index 3fe47efa64a..8e0c2b04882 100644
--- a/solr/webapp/web/partials/index.html
+++ b/solr/webapp/web/partials/index.html
@@ -260,7 +260,7 @@ limitations under the License.
<h2>Security</h2>
- <div class="content">
+ <div class="content" ng-show="isSecurityEnabled">
<ul class="data">
@@ -286,7 +286,12 @@ limitations under the License.
</ul>
+ </div>
+ <div ng-show="!isSecurityEnabled" style="text-align: left">
+ <p class="warning-msg"><img src="img/ico/shield--exclamation.png"/>&nbsp;WARNING: Security is not enabled for this server!</p>
+ <p>See <a href="/solr/#/~security">security screen</a> for how to enable authentication</p>
+ <p>TLS enabled? <img ng-show="tls" src="img/ico/tick.png"/><img ng-show="!tls" src="img/ico/cross.png"/></p>
</div>
</div>