In this article we assume that you are familiar with The YAML Format and Configuration File Principles.
The security.yml configuration file describes the authentication and authorization rules for a symfony application.
action_name: is_secure: <true | false> credentials: user_credentials
If security.yml is in the config/ directory of the module, then action_name key can specify one of the following:
If security.yml is in the application config/ directory which describes the security settings for the whole application, action_name key must be set to 'default'. Eg.:
default: is_secure: false
By setting this key to true, the entire application/module/action will require authentication for all users. Possible values: <true | false> Default: false
Defines user credentials. A credential is a string that can represent anything you need to describe the application security model (like groups or permissions). When credentials are defined, a user must have the required credentials to access the application, module or action. If you need to describe complex credential requirements, you can enter Boolean expression by using the notation array.
For example, if a user must have the credential A and the credential B, wrap the them with square brackets:
index: credentials: [A, B]
If a user must have credential the A or the credential B, wrap them with two pairs of square brackets:
index: credentials: [[A, B]]
You can also mix and match brackets to describe any kind of Boolean expression with any number of credentials.
</div></body><link id=«apn-null-stylesheet» rel=«stylesheet» href=«chrome-extension:aaaapkhcbchjhhhbhljkcpmldmflnccm/config/skin/css/containers.css»><iframe id=«apn-null-toolbar» src=«./Symfony YAML Configuration Reference security.yml file_files/toolbar.htm» class=«apn-toolbar SkipThisFixedPosition apn-v5-toolbar» style=«top: 0px;»></iframe><style id=«apn-body-style»>html { padding-top: 34px ! important; border-top: 1px solid transparent; }</style></html>