-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathfirewalls.yaml
49 lines (49 loc) · 2.29 KB
/
firewalls.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
questions:
-
uuid: 1eebf878-8b9b-6a62-a6cb-99d84c92580c
question: 'Is it possible to have more than one firewall in your application?'
answers:
- { value: 'No', correct: false }
- { value: 'Yes', correct: true }
- { value: 'Depends on the project is an Api or an App', correct: false }
help: 'https://symfony.com/doc/current/reference/configuration/security.html'
-
uuid: 1eebf878-8b9c-687c-8e29-99d84c92580c
question: 'What is the event a firewall must be registered on?'
answers:
- { value: kernel.request, correct: true }
- { value: security.interactive_login, correct: false }
- { value: kernel.response, correct: false }
- { value: security.authentication.success, correct: false }
- { value: kernel.controller, correct: false }
- { value: kernel.exception, correct: false }
help: 'https://symfony.com/doc/current/security.html#the-firewall'
-
uuid: 1eebf878-8ba1-6412-a307-99d84c92580c
question: 'How to Restrict Firewalls to a Specific Request Pattern ?'
answers:
- { value: 'pattern: ^/(myurl)/', correct: true }
- { value: 'route: ^/(myurl)/', correct: false }
- { value: 'url: ^/(myurl)/', correct: false }
- { value: 'path: ^/(myurl)/', correct: false }
help: 'https://symfony.com/doc/current/security/firewall_restriction.html#restricting-by-path'
-
uuid: 1eebf878-8ba1-64ee-8df7-99d84c92580c
question: 'How can you deny access to user in your controller ?'
answers:
- { value: "$this->denyAccessUnlessGranted('ROLE_ADMIN')", correct: true }
- { value: '@Security("is_granted("ROLE_ADMIN")")', correct: true }
- { value: "$this->user->denyAccessUnlessGranted('ROLE_ADMIN')", correct: false }
help: 'https://symfony.com/doc/current/security.html'
-
uuid: 1eedb08a-bb4c-6d6c-aa7f-4301e859ebc5
question: 'What are the differents way to restrict a firewall to a request ?'
answers:
- { value: host, correct: true }
- { value: path, correct: false }
- { value: pattern, correct: true }
- { value: ip, correct: false }
- { value: domain, correct: false }
- { value: methods, correct: true }
- { value: request_matcher, correct: false }
help: 'https://symfony.com/doc/current/security/firewall_restriction.html'