I have a problem with Symfony2 firewall component taking ages on some requests.
I've noticed that it mainly happens during AJAX requests, and very specific ones - when I search for an entity using LIKE %..% statements in doctrine (not sure it matters, but that's what I noticed ;)).
Calling the same URL a little later (1 or 2s later) results in "normal" firewall processing time.
I am not using any external data sources for authentication, everything is stored in PostgreSQL.
Look at the following timeline:
Is there a way to debug the firewall directly?
My config looks like this:
security:
firewalls:
admin_area:
provider: db_users
pattern: ^/admin
anonymous: ~
form_login:
login_path: /admin/login
check_path: /admin/login-check
logout:
path: /admin/logout
target: /admin
switch_user: { role: ROLE_SUPERADMIN, parameter: _become_user }
secured_area:
pattern: ~
anonymous: ~
http_basic:
realm: "Secured Demo Area"
access_control:
- { path: ^/admin/clip-manager/clip/encode/*, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
- { path: ^/admin/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/login-check, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin, roles: [ROLE_ADMIN_LOGIN, ADMIN_AREA] }
providers:
db_users:
entity: { class: Webility\Bundle\AppUserBundle\Entity\User, property: username }
encoders:
Webility\Bundle\AppUserBundle\Entity\User:
algorithm: sha256
iterations: 3
encode_as_base64: false
acl:
connection: default
I am using Symfony\SecurityBundle
and JMSSecurityExtraBundle
.