guibole
guibole

Reputation: 64

What's the difference between anonymous and security in the security.yml file?

Everything is in the title. I want to know the difference between both annotations. Sometimes I see anonymous and sometimes security. And I can't tell the difference.

Thank you guys for the help !

Upvotes: 1

Views: 183

Answers (1)

chalasr
chalasr

Reputation: 13167

The security parameter is used to totally disable/enable the features of the security component inside a firewall.

For example, the default dev firewall has the security parameter set to false.
That involves that the security is totally disabled on the routes handled by this firewall.

The anonymous parameter make non-loggedin users authenticated as Anonymous, so it keep all features of the security component enabled.
You can use security-related features (e.g. allowing/restricting routes) regardless the value of the anonymous parameter.

Read more in the documentation of the Security component.

Upvotes: 1

Related Questions