Skip to content

Commit 3d0eb51

Browse files
committed
feature #15503 [Security] Rewrite Security documentation (wouterj, weaverryan)
This PR was merged into the 5.3 branch. Discussion ---------- [Security] Rewrite Security documentation This is still very WIP, but I wanted to get it out here to receive the first set of global feedback (I haven't re-read anything, so no need to comment on typos, wrong sentences or grammar yet). Of course, the main goal of this rewrite is to document the new authenticator system and remove anything about guards, authentication providers, etc. Besides that, I've focused on 3 other things: 1. **Give the user something that's working as quick as possible.** This means using lots of makers and showing real code examples. I've discussed with Ryan and Jesse and we'll also extend the security makers to make even more docs redundant (I'm jealous at Laravel, which basically replaced all its authentication docs with "run `jetstream:install`"). 2. **Move as much information to the main guide as possible** (following our doc practices of the last years). This means e.g. documenting all user providers and authenticators in the main guide. The subguides should be clearly scoped and about advanced/reference documentation (most of the subguides are yet to be worked on) 3. **Focus on the built-in authenticators, rather than implementing your own authenticator.** We've pushed writing your own guard in the docs way to much for my liking. E.g. for 90% of the use-cases, using the built-in `form_login` authenticator works perfectly. This will also be updated in the maker (where `make:auth` is not only going to suggest making a PHP authenticator) sometime in the future. For the structure, I decided to follow the security config generated by the recipe/maker and explain section per section. Commits ------- cc84098 Fixes after final review from Javier and Ryan 1e49d52 fixing syntax error df05fdb Various tweaks to the new security documentation d5460ed Rewrite Security documentation
2 parents 9748dce + cc84098 commit 3d0eb51

32 files changed

+3875
-5193
lines changed

_build/conf.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,6 @@
121121
lexers['terminal'] = TerminalLexer()
122122
lexers['env'] = BashLexer()
123123

124-
config_block = {
125-
'apache': 'Apache',
126-
'markdown': 'Markdown',
127-
'nginx': 'Nginx',
128-
'rst': 'reStructuredText',
129-
'varnish2': 'Varnish 2',
130-
'varnish3': 'Varnish 3',
131-
'varnish4': 'Varnish 4',
132-
'env': '.env'
133-
}
134-
135124
# don't enable Sphinx Domains
136125
primary_domain = None
137126

_build/redirection_map

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,4 +518,17 @@
518518
/components/index https://symfony.com/components
519519
/logging/monolog_regex_based_excludes /logging/monolog_exclude_http_codes
520520
/security/named_encoders /security/named_hashers
521-
/security/experimental_authenticators /security/authenticator_manager
521+
/security/experimental_authenticators /security
522+
/security/user_provider /security/user_providers
523+
/security/reset_password /security/passwords#reset-password
524+
/security/auth_providers /security#security-authenticators
525+
/security/form_login /security#form-login
526+
/security/form_login_setup /security#form-login
527+
/security/json_login_setup /security#json-login
528+
/security/named_hashers /security/passwords#named-password-hashers
529+
/security/password_migration /security/passwords#security-password-migration
530+
/security/acl https://github.com/symfony/acl-bundle/blob/main/src/Resources/doc/index.rst
531+
/security/securing_services /security#securing-other-services
532+
/security/authenticator_manager /security
533+
/security/multiple_guard_authenticators /security/entry_point
534+
/security/guard_authentication /security/custom_authenticator

_images/security/anonymous_wdt.png

9.54 KB
Loading

_images/security/security_events.svg

Lines changed: 338 additions & 0 deletions
Loading
2.51 KB
Binary file not shown.

doctrine/registration_form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ form you must:
1414
#. :doc:`Create a form </forms>` to ask for the registration information (you can
1515
generate this with the ``make:registration-form`` command provided by the `MakerBundle`_);
1616
#. Create :doc:`a controller </controller>` to :ref:`process the form <processing-forms>`;
17-
#. :ref:`Protect some parts of your application <security-authorization>` so
17+
#. :ref:`Protect some parts of your application <security-access-control>` so
1818
only registered users can access to them.
1919

2020
.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html

event_dispatcher.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ or can get everything which partial matches the event name:
335335

336336
The ability to match partial event names was introduced in Symfony 5.3.
337337

338-
The :doc:`new authenticator-based Security </security/authenticator_manager>`
339-
system adds an event dispatcher per firewall. Use the ``--dispatcher`` option to
340-
get the registered listeners for a particular event dispatcher:
338+
The :doc:`security </security>` system uses an event dispatcher per
339+
firewall. Use the ``--dispatcher`` option to get the registered listeners
340+
for a particular event dispatcher:
341341

342342
.. code-block:: terminal
343343

0 commit comments

Comments
 (0)