0

是否可以在 (/system/console/configMgr) 配置管理器中更改 Apache Authentication 模块的设置?我想关闭“允许匿名访问”,但由于配置问题,访问登录屏幕所需的匿名访问已被禁用。我假设这可以通过 cURL 以某种方式完成?

4

1 回答 1

2

对的,这是可能的。以下 cUrl 语句对我有用,恢复 sling.auth.requirements 设置并禁用匿名访问。

curl -u admin:admin 'http://localhost:4502/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator' --data 'apply=true&action=ajaxConfigManager&%24location=launchpad%3Aresources%2Finstall%2F19%2Forg.apache.sling.auth.core-1.3.6.jar&auth.sudo.cookie=sling.sudo&auth.sudo.parameter=sudo&auth.annonymous=false&sling.auth.requirements=%2B%2F&sling.auth.requirements=-%2Flibs%2Fgranite%2Fcore%2Fcontent%2Flogin&sling.auth.requirements=-%2Fetc%2Fclientlibs%2Fgranite&sling.auth.anonymous.user=&sling.auth.anonymous.password=unmodified&auth.http=preemptive&auth.http.realm=Sling+(Development)&auth.uri.suffix=%2Fj_security_check&propertylist=auth.sudo.cookie%2Cauth.sudo.parameter%2Cauth.annonymous%2Csling.auth.requirements%2Csling.auth.anonymous.user%2Csling.auth.anonymous.password%2Cauth.http%2Cauth.http.realm%2Cauth.uri.suffix'
于 2015-12-24T11:23:33.110 回答