{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block page_title 'Security' %} {% block toolbar %} {% if collector.token %} {% set is_authenticated = collector.enabled and collector.authenticated %} {% set color_code = is_authenticated ? '' : 'yellow' %} {% else %} {% set color_code = collector.enabled ? 'red' : '' %} {% endif %} {% set icon %} {{ include('@Security/Collector/icon.svg') }} {{ collector.user|default('n/a') }} {% endset %} {% set text %} {% if collector.enabled %} {% if collector.token %}
Logged in as {{ collector.user }}
Authenticated {{ is_authenticated ? 'Yes' : 'No' }}
Token class {{ collector.tokenClass|abbr_class }}
{% else %}
Authenticated No
{% endif %} {% if collector.firewall %}
Firewall name {{ collector.firewall.name }}
{% endif %} {% if collector.token and collector.logoutUrl %}
Actions Logout
{% endif %} {% else %}
The security is disabled.
{% endif %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }} {% endblock %} {% block menu %} {{ include('@Security/Collector/icon.svg') }} Security {% endblock %} {% block panel %}

Security Token

{% if collector.enabled %} {% if collector.token %}
{{ collector.user == 'anon.' ? 'Anonymous' : collector.user }} Username
{{ include('@WebProfiler/Icon/' ~ (collector.authenticated ? 'yes' : 'no') ~ '.svg') }} Authenticated
{% if collector.supportsRoleHierarchy %} {% endif %} {% if collector.token %} {% endif %}
Property Value
Roles {{ collector.roles is empty ? 'none' : profiler_dump(collector.roles, maxDepth=1) }} {% if not collector.authenticated and collector.roles is empty %}

User is not authenticated probably because they have no roles.

{% endif %}
Inherited Roles {{ collector.inheritedRoles is empty ? 'none' : profiler_dump(collector.inheritedRoles, maxDepth=1) }}
Token {{ profiler_dump(collector.token) }}
{% elseif collector.enabled %}

There is no security token.

{% endif %}

Security Firewall

{% if collector.firewall %}
{{ collector.firewall.name }} Name
{{ include('@WebProfiler/Icon/' ~ (collector.firewall.security_enabled ? 'yes' : 'no') ~ '.svg') }} Security enabled
{{ include('@WebProfiler/Icon/' ~ (collector.firewall.stateless ? 'yes' : 'no') ~ '.svg') }} Stateless
{{ include('@WebProfiler/Icon/' ~ (collector.firewall.allows_anonymous ? 'yes' : 'no') ~ '.svg') }} Allows anonymous
{% if collector.firewall.security_enabled %}
Key Value
provider {{ collector.firewall.provider ?: '(none)' }}
context {{ collector.firewall.context ?: '(none)' }}
entry_point {{ collector.firewall.entry_point ?: '(none)' }}
user_checker {{ collector.firewall.user_checker ?: '(none)' }}
access_denied_handler {{ collector.firewall.access_denied_handler ?: '(none)' }}
access_denied_url {{ collector.firewall.access_denied_url ?: '(none)' }}
listeners {{ collector.firewall.listeners is empty ? '(none)' : profiler_dump(collector.firewall.listeners, maxDepth=1) }}
{% endif %} {% elseif collector.enabled %}

This request was not covered by any firewall.

{% endif %} {% else %}

The security component is disabled.

{% endif %} {% if collector.voters|default([]) is not empty %}

Security Voters ({{ collector.voters|length }})

{{ collector.voterStrategy|default('unknown') }} Strategy
{% for voter in collector.voters %} {% endfor %}
# Voter class
{{ loop.index }} {{ profiler_dump(voter) }}
{% endif %} {% if collector.accessDecisionLog|default([]) is not empty %}

Access decision log

{% for decision in collector.accessDecisionLog %} {% endfor %}
# Result Attributes Object
{{ loop.index }} {{ decision.result ? 'GRANTED' : 'DENIED' }} {% if decision.attributes|length == 1 %} {{ decision.attributes|first }} {% else %} {{ profiler_dump(decision.attributes) }} {% endif %} {{ profiler_dump(decision.seek('object')) }}
{% endif %} {% endblock %}