8000 [DX][Security] Introduce a class representing a/the current firewall · Issue #15294 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[DX][Security] Introduce a class representing a/the current firewall #15294
Closed
@ghost

Description

This issue came up: #11134 (comment), #14435 (comment), scheb/two-factor-bundle#13 (comment)

As of Symfony 2.6 we have Symfony\Component\Security\Http\Firewall which is actually a listener and Symfony\Bundle\SecurityBundle\Security\FirewallContext. But we don't have a class / inteface representing a Firewall.

We're currently introducing a two-factor auth scheme for parts of our application which is covered by a special firewall. Therefor we need to access the current firewall and the "regular" firewall and get information from it.

There might be more use cases where one wants to retrieve informations about the current or another firewall, so a class to represent firewalls and a method to retrieve those classes would be helpful:

interface Firewall
{
  function getKey();
  function getContext();
  function getRequestMatcher():
  function getProvider();
  /**
   * This function can be used to lookup firewall configuration
   * values that are not exposed with more specific methods.
   * @return array map of the firewall configuration
   */
  function getConfig();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)EnhancementSecurity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0