8000 minor #13405 Updated all security examples to use the new config XSD … · symfony/symfony-docs@edeba30 · GitHub
[go: up one dir, main page]

Skip to content

Commit edeba30

Browse files
committed
minor #13405 Updated all security examples to use the new config XSD (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Updated all security examples to use the new config XSD Fixes #13347. Commits ------- e85ffe0 Updatd all security examples to use the new config XSD
2 parents 5ec126a + e85ffe0 commit edeba30

22 files changed

+184
-58
lines changed

configuration/env_var_processors.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ Symfony provides the following env var processors:
163163
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
164164
xmlns:security="http://symfony.com/schema/dic/security"
165165
xsi:schemaLocation="http://symfony.com/schema/dic/services
166-
https://symfony.com/schema/dic/services/services-1.0.xsd">
166+
https://symfony.com/schema/dic/services/services-1.0.xsd
167+
http://symfony.com/schema/dic/security
168+
https://symfony.com/schema/dic/security/security-1.0.xsd">
167169
168170
<parameters>
169171
<parameter key="env(HEALTH_CHECK_METHOD)">Symfony\Component\HttpFoundation\Request::METHOD_HEAD</parameter>

reference/configuration/security.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ encoding algorithm. Also, each algorithm defines different config options:
157157
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
158158
xmlns:srv="http://symfony.com/schema/dic/services"
159159
xsi:schemaLocation="http://symfony.com/schema/dic/services
160-
https://symfony.com/schema/dic/services/services-1.0.xsd">
160+
https://symfony.com/schema/dic/services/services-1.0.xsd
161+
http://symfony.com/schema/dic/security
162+
https://symfony.com/schema/dic/security/security-1.0.xsd">
161163
162164
<config>
163165
<!-- ... -->
@@ -329,7 +331,9 @@ application:
329331
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
330332
xmlns:srv="http://symfony.com/schema/dic/services"
331333
xsi:schemaLocation="http://symfony.com/schema/dic/services
332-
https://symfony.com/schema/dic/services/services-1.0.xsd">
334+
https://symfony.com/schema/dic/services/services-1.0.xsd
335+
http://symfony.com/schema/dic/security
336+
https://symfony.com/schema/dic/security/security-1.0.xsd">
333337
334338
<config>
335339
<!-- ... -->
@@ -652,7 +656,9 @@ multiple firewalls, the "context" could actually be shared:
652656
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
653657
xmlns:srv="http://symfony.com/schema/dic/services"
654658
xsi:schemaLocation="http://symfony.com/schema/dic/services
655-
https://symfony.com/schema/dic/services/services-1.0.xsd">
659+
https://symfony.com/schema/dic/services/services-1.0.xsd
660+
http://symfony.com/schema/dic/security
661+
https://symfony.com/schema/dic/security/security-1.0.xsd">
656662
657663
<config>
658664
<firewall name="somename" context="my_context">

security.rst

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ command will pre-configure this for you:
137137
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
138138
xmlns:srv="http://symfony.com/schema/dic/services"
139139
xsi:schemaLocation="http://symfony.com/schema/dic/services
140-
https://symfony.com/schema/dic/services/services-1.0.xsd">
140+
https://symfony.com/schema/dic/services/services-1.0.xsd
141+
http://symfony.com/schema/dic/security
142+
https://symfony.com/schema/dic/security/security-1.0.xsd">
141143
142144
<config>
143145
<!-- ... -->
@@ -253,7 +255,9 @@ important section is ``firewalls``:
253255
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
254256
xmlns:srv="http://symfony.com/schema/dic/services"
255257
xsi:schemaLocation="http://symfony.com/schema/dic/services
256-
https://symfony.com/schema/dic/services/services-1.0.xsd">
258+
https://symfony.com/schema/dic/services/services-1.0.xsd
259+
http://symfony.com/schema/dic/security
260+
https://symfony.com/schema/dic/security/security-1.0.xsd">
257261
258262
<config>
259263
<firewall name="dev"
@@ -455,7 +459,9 @@ start with ``/admin``, you can:
455459
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
456460
xmlns:srv="http://symfony.com/schema/dic/services"
457461
xsi:schemaLocation="http://symfony.com/schema/dic/services
458-
https://symfony.com/schema/dic/services/services-1.0.xsd">
462+
https://symfony.com/schema/dic/services/services-1.0.xsd
463+
http://symfony.com/schema/dic/security
464+
https://symfony.com/schema/dic/security/security-1.0.xsd">
459465
460466
<config>
461467
<!-- ... -->
@@ -531,7 +537,9 @@ the list and stops when it finds the first match:
531537
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
532538
xmlns:srv="http://symfony.com/schema/dic/services"
533539
xsi:schemaLocation="http://symfony.com/schema/dic/services
534-
https://symfony.com/schema/dic/services/services-1.0.xsd">
540+
https://symfony.com/schema/dic/services/services-1.0.xsd
541+
http://symfony.com/schema/dic/security
542+
https://symfony.com/schema/dic/security/security-1.0.xsd">
535543
536544
<config>
537545
<!-- ... -->
@@ -681,7 +689,7 @@ like this:
681689

682690
* ``IS_ANONYMOUS``: *Only* anonymous users are matched by this attribute.
683691

684-
* ``IS_REMEMBERED``: *Only* users authenticated using the
692+
* ``IS_REMEMBERED``: *Only* users authenticated using the
685693
:doc:`remember me functionality </security/remember_me>`, (i.e. a
686694
remember-me cookie).
687695

@@ -806,7 +814,9 @@ To enable logging out, activate the ``logout`` config parameter under your fire
806814
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
807815
xmlns:srv="http://symfony.com/schema/dic/services"
808816
xsi:schemaLocation="http://symfony.com/schema/dic/services
809-
https://symfony.com/schema/dic/services/services-1.0.xsd">
817+
https://symfony.com/schema/dic/services/services-1.0.xsd
818+
http://symfony.com/schema/dic/security
819+
https://symfony.com/schema/dic/security/security-1.0.xsd">
810820
811821
<config>
812822
<!-- ... -->
@@ -923,7 +933,9 @@ rules by creating a role hierarchy:
923933
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
924934
xmlns:srv="http://symfony.com/schema/dic/services"
925935
xsi:schemaLocation="http://symfony.com/schema/dic/services
926-
https://symfony.com/schema/dic/services/services-1.0.xsd">
936+
https://symfony.com/schema/dic/services/services-1.0.xsd
937+
http://symfony.com/schema/dic/security
938+
https://symfony.com/schema/dic/security/security-1.0.xsd">
927939
928940
<config>
929941
<!-- ... -->

security/access_control.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ Take the following ``access_control`` entries as an example:
5353
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5454
xmlns:srv="http://symfony.com/schema/dic/services"
5555
xsi:schemaLocation="http://symfony.com/schema/dic/services
56-
https://symfony.com/schema/dic/services/services-1.0.xsd">
56+
https://symfony.com/schema/dic/services/services-1.0.xsd
57+
http://symfony.com/schema/dic/security
58+
https://symfony.com/schema/dic/security/security-1.0.xsd">
5759
5860
<config>
5961
<!-- ... -->
@@ -213,7 +215,9 @@ pattern so that it is only accessible by requests from the local server itself:
213215
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
214216
xmlns:srv="http://symfony.com/schema/dic/services"
215217
xsi:schemaLocation="http://symfony.com/schema/dic/services
216-
https://symfony.com/schema/dic/services/services-1.0.xsd">
218+
https://symfony.com/schema/dic/services/services-1.0.xsd
219+
http://symfony.com/schema/dic/security
220+
https://symfony.com/schema/dic/security/security-1.0.xsd">
217221
218222
<config>
219223
<!-- ... -->
@@ -300,7 +304,9 @@ key:
300304
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
301305
xmlns:srv="http://symfony.com/schema/dic/services"
302306
xsi:schemaLocation="http://symfony.com/schema/dic/services
303-
https://symfony.com/schema/dic/services/services-1.0.xsd">
307+
https://symfony.com/schema/dic/services/services-1.0.xsd
308+
http://symfony.com/schema/dic/security
309+
https://symfony.com/schema/dic/security/security-1.0.xsd">
304310
305311
<config>
306312
<!-- ... -->
@@ -376,7 +382,9 @@ access those URLs via a specific port. This could be useful for example for
376382
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
377383
xmlns:srv="http://symfony.com/schema/dic/services"
378384
xsi:schemaLocation="http://symfony.com/schema/dic/services
379-
https://symfony.com/schema/dic/services/services-1.0.xsd">
385+
https://symfony.com/schema/dic/services/services-1.0.xsd
386+
http://symfony.com/schema/dic/security
387+
https://symfony.com/schema/dic/security/security-1.0.xsd">
380388
381389
<config>
382390
<!-- ... -->
@@ -427,7 +435,9 @@ the user will be redirected to ``https``:
427435
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
428436
xmlns:srv="http://symfony.com/schema/dic/services"
429437
xsi:schemaLocation="http://symfony.com/schema/dic/services
430-
https://symfony.com/schema/dic/services/services-1.0.xsd">
438+
https://symfony.com/schema/dic/services/services-1.0.xsd
439+
http://symfony.com/schema/dic/security
440+
https://symfony.com/schema/dic/security/security-1.0.xsd">
431441
432442
<config>
433443
<!-- ... -->

security/auth_providers.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ To support HTTP Basic authentication, add the ``http_basic`` key to your firewal
5555
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5656
xmlns:srv="http://symfony.com/schema/dic/services"
5757
xsi:schemaLocation="http://symfony.com/schema/dic/services
58-
https://symfony.com/schema/dic/services/services-1.0.xsd">
58+
https://symfony.com/schema/dic/services/services-1.0.xsd
59+
http://symfony.com/schema/dic/security
60+
https://symfony.com/schema/dic/security/security-1.0.xsd">
5961
6062
<config>
6163
<!-- ... -->
@@ -121,7 +123,9 @@ Enable the x509 authentication for a particular firewall in the security configu
121123
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
122124
xmlns:srv="http://symfony.com/schema/dic/services"
123125
xsi:schemaLocation="http://symfony.com/schema/dic/services
124-
https://symfony.com/schema/dic/services/services-1.0.xsd">
126+
https://symfony.com/schema/dic/services/services-1.0.xsd
127+
http://symfony.com/schema/dic/security
128+
https://symfony.com/schema/dic/security/security-1.0.xsd">
125129
126130
<config>
127131
<!-- ... -->
@@ -197,7 +201,12 @@ corresponding firewall in your security configuration:
197201
<!-- config/packages/security.xml -->
198202
<?xml version="1.0" ?>
199203
<srv:container xmlns="http://symfony.com/schema/dic/security"
200-
xmlns:srv="http://symfony.com/schema/dic/services">
204+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
205+
xmlns:srv="http://symfony.com/schema/dic/services"
206+
xsi:schemaLocation="http://symfony.com/schema/dic/services
207+
https://symfony.com/schema/dic/services/services-1.0.xsd
208+
http://symfony.com/schema/dic/security
209+
https://symfony.com/schema/dic/security/security-1.0.xsd">
201210
202211
<config>
203212
<firewall name="main">

security/custom_authentication_provider.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,9 @@ You are finished! You can now define parts of your app as under WSSE protection.
488488
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
489489
xmlns:srv="http://symfony.com/schema/dic/services"
490490
xsi:schemaLocation="http://symfony.com/schema/dic/services
491-
https://symfony.com/schema/dic/services/services-1.0.xsd">
491+
https://symfony.com/schema/dic/services/services-1.0.xsd
492+
http://symfony.com/schema/dic/security
493+
https://symfony.com/schema/dic/security/security-1.0.xsd">
492494
493495
<config>
494496
<!-- ... -->
@@ -604,7 +606,9 @@ set to any desirable value per firewall.
604606
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
605607
xmlns:srv="http://symfony.com/schema/dic/services"
606608
xsi:schemaLocation="http://symfony.com/schema/dic/services
607-
https://symfony.com/schema/dic/services/services-1.0.xsd">
609+
https://symfony.com/schema/dic/services/services-1.0.xsd
610+
http://symfony.com/schema/dic/security
611+
https://symfony.com/schema/dic/security/security-1.0.xsd">
608612
609613
<config>
610614
<!-- ... -->

security/firewall_restriction.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ if the request path matches the configured ``pattern``.
4949
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5050
xmlns:srv="http://symfony.com/schema/dic/services"
5151
xsi:schemaLocation="http://symfony.com/schema/dic/services
52-
https://symfony.com/schema/dic/services/services-1.0.xsd">
52+
https://symfony.com/schema/dic/services/services-1.0.xsd
53+
http://symfony.com/schema/dic/security
54+
https://symfony.com/schema/dic/security/security-1.0.xsd">
5355
5456
<config>
5557
<!-- ... -->
@@ -106,7 +108,9 @@ only initialize if the host from the request matches against the configuration.
106108
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
107109
xmlns:srv="http://symfony.com/schema/dic/services"
108110
xsi:schemaLocation="http://symfony.com/schema/dic/services
109-
https://symfony.com/schema/dic/services/services-1.0.xsd">
111+
https://symfony.com/schema/dic/services/services-1.0.xsd
112+
http://symfony.com/schema/dic/security
113+
https://symfony.com/schema/dic/security/security-1.0.xsd">
110114
111115
<config>
112116
<!-- ... -->
@@ -164,7 +168,9 @@ the provided HTTP methods.
164168
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
165169
xmlns:srv="http://symfony.com/schema/dic/services"
166170
xsi:schemaLocation="http://symfony.com/schema/dic/services
167-
https://symfony.com/schema/dic/services/services-1.0.xsd">
171+
https://symfony.com/schema/dic/services/services-1.0.xsd
172+
http://symfony.com/schema/dic/security
173+
https://symfony.com/schema/dic/security/security-1.0.xsd">
168174
169175
<config>
170176
<!-- ... -->
@@ -220,7 +226,9 @@ If the above options don't fit your needs you can configure any service implemen
220226
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
221227
xmlns:srv="http://symfony.com/schema/dic/services"
222228
xsi:schemaLocation="http://symfony.com/schema/dic/services
223-
https://symfony.com/schema/dic/services/services-1.0.xsd">
229+
https://symfony.com/schema/dic/services/services-1.0.xsd
230+
http://symfony.com/schema/dic/security
231+
https://symfony.com/schema/dic/security/security-1.0.xsd">
224232
225233
<config>
226234
<!-- ... -->

security/force_https.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ access control:
3636
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3737
xmlns:srv="http://symfony.com/schema/dic/services"
3838
xsi:schemaLocation="http://symfony.com/schema/dic/services
39-
https://symfony.com/schema/dic/services/services-1.0.xsd">
39+
https://symfony.com/schema/dic/services/services-1.0.xsd
40+
http://symfony.com/schema/dic/security
41+
https://symfony.com/schema/dic/security/security-1.0.xsd">
4042
4143
<config>
4244
<!-- ... -->

0 commit comments

Comments
 (0)
0