From 25811385b331f8289f32bcdc1f00058c38218cd1 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 20 May 2017 18:06:42 -0600 Subject: [PATCH 1/3] Change firewall name from "default" to "main" --- security.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/security.rst b/security.rst index 992d1b70c85..de7405beee1 100644 --- a/security.rst +++ b/security.rst @@ -48,7 +48,7 @@ configuration looks like this: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false - default: + main: anonymous: ~ .. code-block:: xml @@ -70,7 +70,7 @@ configuration looks like this: pattern="^/(_(profiler|wdt)|css|images|js)/" security="false" /> - + @@ -90,7 +90,7 @@ configuration looks like this: 'pattern' => '^/(_(profiler|wdt)|css|images|js)/', 'security' => false, ), - 'default' => array( + 'main' => array( 'anonymous' => null, ), ), @@ -106,7 +106,7 @@ by your security. You can also match a request against other details of the request (e.g. host). For more information and examples read :doc:`/security/firewall_restriction`. -All other URLs will be handled by the ``default`` firewall (no ``pattern`` +All other URLs will be handled by the ``main`` firewall (no ``pattern`` key means it matches *all* URLs). You can think of the firewall like your security system, and so it usually makes sense to have just one main firewall. But this does *not* mean that every URL requires authentication - the ``anonymous`` @@ -144,7 +144,7 @@ To activate this, add the ``http_basic`` key under your firewall: firewalls: # ... - default: + main: anonymous: ~ http_basic: ~ @@ -161,7 +161,7 @@ To activate this, add the ``http_basic`` key under your firewall: - + @@ -175,7 +175,7 @@ To activate this, add the ``http_basic`` key under your firewall: // ... 'firewalls' => array( // ... - 'default' => array( + 'main' => array( 'anonymous' => null, 'http_basic' => null, ), @@ -216,7 +216,7 @@ user to be logged in to access this URL: # ... firewalls: # ... - default: + main: # ... access_control: @@ -236,7 +236,7 @@ user to be logged in to access this URL: - + @@ -252,7 +252,7 @@ user to be logged in to access this URL: // ... 'firewalls' => array( // ... - 'default' => array( + 'main' => array( // ... ), ), @@ -707,7 +707,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio firewalls: # ... - default: + main: # ... access_control: @@ -727,7 +727,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio - + @@ -744,7 +744,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio 'firewalls' => array( // ... - 'default' => array( + 'main' => array( // ... ), ), From 3b06b47ce158976eced86b4ffd2be6d50471515d Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 20 May 2017 17:49:41 -0600 Subject: [PATCH 2/3] Replace ";" with "." on lists items for consistency --- security.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/security.rst b/security.rst index de7405beee1..ca294d561b7 100644 --- a/security.rst +++ b/security.rst @@ -14,9 +14,9 @@ is both flexible and (hopefully) fun to work with. Since there's a lot to talk about, this article is organized into a few big sections: -#. Initial ``security.yml`` setup (*authentication*); +#. Initial ``security.yml`` setup (*authentication*). -#. Denying access to your app (*authorization*); +#. Denying access to your app (*authorization*). #. Fetching the current User object. @@ -611,10 +611,10 @@ basic auth and loads users right from the ``security.yml`` file. Your next steps depend on your setup: * Configure a different way for your users to login, like a :ref:`login form ` - or :doc:`something completely custom `; + or :doc:`something completely custom `. * Load users from a different source, like the :doc:`database ` - or :doc:`some other source `; + or :doc:`some other source `. * Learn how to deny access, load the User object and deal with roles in the :ref:`Authorization ` section. @@ -684,7 +684,7 @@ There are **two** ways to deny access to something: #. :ref:`access_control in security.yml ` allows you to protect URL patterns (e.g. ``/admin/*``). This is easy, - but less flexible; + but less flexible. #. :ref:`in your code via the security.authorization_checker service `. From 88390cbf7c6c6ae04f46b0079ea09cefa15c112f Mon Sep 17 00:00:00 2001 From: Ivan Date: Sun, 21 May 2017 12:41:37 -0600 Subject: [PATCH 3/3] Don't replace ";" with "." on lists items --- security.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/security.rst b/security.rst index ca294d561b7..de7405beee1 100644 --- a/security.rst +++ b/security.rst @@ -14,9 +14,9 @@ is both flexible and (hopefully) fun to work with. Since there's a lot to talk about, this article is organized into a few big sections: -#. Initial ``security.yml`` setup (*authentication*). +#. Initial ``security.yml`` setup (*authentication*); -#. Denying access to your app (*authorization*). +#. Denying access to your app (*authorization*); #. Fetching the current User object. @@ -611,10 +611,10 @@ basic auth and loads users right from the ``security.yml`` file. Your next steps depend on your setup: * Configure a different way for your users to login, like a :ref:`login form ` - or :doc:`something completely custom `. + or :doc:`something completely custom `; * Load users from a different source, like the :doc:`database ` - or :doc:`some other source `. + or :doc:`some other source `; * Learn how to deny access, load the User object and deal with roles in the :ref:`Authorization ` section. @@ -684,7 +684,7 @@ There are **two** ways to deny access to something: #. :ref:`access_control in security.yml ` allows you to protect URL patterns (e.g. ``/admin/*``). This is easy, - but less flexible. + but less flexible; #. :ref:`in your code via the security.authorization_checker service `.