我已经使用SimplesamlphpBundle创建了防火墙
登录工作正常,问题在于如果没有登录,我无法进入网站的公共部分。
访问控制规则根本不适用。我不知道在哪里找。如果我使用基本防火墙,则控制访问规则将正确应用。
这是我的安全性。yml
security:
role_hierarchy:
ROLE_ADMIN: [ROLE_ALLOWED_TO_SWITCH, ROLE_USER, ROLE_BACKOFFICE]
ROLE_POWER_USER: [ROLE_USER, ROLE_BACKOFFICE]
providers:
cc_users:
entity: { class: Binova\CcBundle\Entity\CcUser, property: NNI }
encoders:
Binova\ERDFBundle\Entity\CcUser:
algorithm: sha512
iterations: 10
encode_as_base64: true
access_decision_manager:
strategy: unanimous
allow_if_all_abstain: ~
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: ~
stateless: true
simple_preauth:
authenticator: samlphp.authenticator
provider: cc_users
logout:
path: shared_logout
success_handler: samlphp.logout_handler
switch_user: { role: ROLE_ADMIN, parameter: _want_to_be_this_user }
access_control:
- { path: ^/shared, roles: ROLE_BACKOFFICE }
- { path: ^/shared/Maintenance, roles: ROLE_ADMIN }
- { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY }