Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple firewalls with symfony2

Tags:

How to have multiple firewalls with symfony2?

This is mentioned in the documentation but never explained.

like image 853
Bouki Avatar asked Aug 02 '11 10:08

Bouki


People also ask

Can you run two firewalls at the same time?

You should never run two firewalls together as they will probably conflict, and cause system errors that will not normally happen if you run either of the firewalls separately. We highly recommend you not only disable, but also uninstall completely, other firewalls you have when running CPF.

Do companies have multiple firewalls?

Depending on an organization's size and type, a comprehensive data security plan can include more than one firewall. If your business has less than 1,000 users actively on the network, you probably only need one firewall. If you have multiple internet connections, you'll need a firewall for each.


1 Answers

I finally found the answer. Here is the final working security.yml :

security:     encoders:         entity_admin:             class: MyBundle\Entity\AdminUser             algorithm: sha512             iterations: 5000             encode_as_base64: false         entity_members:             class: MyBundle\Entity\User             algorithm: sha512             iterations: 1000             encode_as_base64: false      providers:         entity_admin:             entity:                 class: MyBundle\Entity\AdminUser                 property: username         entity_members:             entity:                 class: MyBundle\Entity\User                 property: username      firewalls:         admin_secured_area:             pattern: /admin/.*             provider: entity_admin             anonymous: ~             form_login:                 check_path: /admin/login_check                 login_path: /admin/login             logout:                 path:   /admin/logout                 target: /admin/         members_secured_area:             pattern: /members/.*             provider: entity_members             anonymous: ~             form_login:                 check_path: /members/login_check                 login_path: /members/login             logout:                 path:   /members/logout                 target: /members/      access_control:         admin_login:             path: /admin/login             roles: IS_AUTHENTICATED_ANONYMOUSLY         admin_area:             path: /admin/.*             roles: ROLE_ADMIN         members_login:             path: /members/login             roles: IS_AUTHENTICATED_ANONYMOUSLY         members_register:             path: /members/register             roles: IS_AUTHENTICATED_ANONYMOUSLY         members_area:             path: /members/.*             roles: ROLE_USER 

And a pastebin

like image 153
Bouki Avatar answered Sep 16 '22 22:09

Bouki