How to change the administrator path in SilverStripe 3.1.x?

Can someone tell me how can I change the path to the administrator of SilverStripe 3.1.x? The site that I built has a security security issue other than a security check - apparently the path / admin is too easy to guess.

Recommendation:

Change the link, name or location of the administrator account so that it cannot be identified / guessed by an unauthorized user. If access is required only to internal users, follow additional restrictions to restrict access from the Internet.

I found something for SilverStripe 2.x here: http://www.silverstripe.org/archive/show/3550 , but I need something similar for SilverStripe 3.1.x

+4
source share
2 answers

Not fully validating, but adding them to yours config.ymlseems to do the trick:

Director:
  rules:
    'admin': ''
    'fancyLongAdminURL': 'AdminRootController'
AdminRootController:
  url_base: 'fancyLongAdminURL'
LeftAndMain:
  url_base: 'fancyLongAdminURL'

The only thing I see does not work is the link myProfilein the upper left corner. But this is because the URL is hard-coded in a template LeftAndMain_Menu.ssthat you could create yourself.

Edit: The above should work just fine for the framework. For CMS and other modules, this should be investigated and more class / template overrides may be required, for example:

  • CMS , URL- Intall_deleteinstallfiles.ss, AssetAdmin.js, VirtualPage.php, SiteTree.php, AssetAdmin.php, routes.yml....
  • Reports Report.php

URLRewrite , .

:. , 4.0: https://github.com/silverstripe/silverstripe-framework/pull/3274

+4

, . , , , .

, . SilverStripe - - , .

- .htaccess /admin IP-. , - " " - .

+1

Source: https://habr.com/ru/post/1543893/


All Articles