module

Analyzer::Php::SymfonySecurity

Symfony security: config (config/packages/security.yaml, or app/config/security.yml before Flex): which firewall a request lands in and the access_control rule that then decides who may call it.

Symfony's semantics, read here:

  • the first firewall whose pattern matches the path handles the request; security: false (or no matching firewall) means no access control runs;
  • the first access_control rule whose path (and methods) matches decides; its roles are alternatives, and PUBLIC_ACCESS / IS_AUTHENTICATED_ANONYMOUSLY (or no roles at all) let anyone through. A firewall or rule that also conditions on host, IP, port, allow_if or a request matcher cannot be decided statically, so the answer is "unknown".

Constants

CONDITIONS = ["host", "ip", "ips", "port", "allow_if", "request_matcher", "attributes", "route"] of ::String
PUBLIC_ROLES = ["PUBLIC_ACCESS", "IS_AUTHENTICATED_ANONYMOUSLY"] of ::String

Class methods

config?(path : String, & : -> String) : Config | Nil

The security config in path, if it is one.

Source

Nested types