Download the PHP package egulias/security-debug-command-bundle without Composer
On this page you can find all versions of the php package egulias/security-debug-command-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download egulias/security-debug-command-bundle
More information about egulias/security-debug-command-bundle
Files in egulias/security-debug-command-bundle
Package security-debug-command-bundle
Short Description Symfony 2 console commands to debug security
License MIT
Homepage https://github.com/egulias/SecurityDebugCommandBundle.git
Informations about the package security-debug-command-bundle
Security debug console command for Symfony2
This bundle provides commands under the security
namespace (security:debug:*
) to help debugging your application
security in a simple way, by inspecting Voters, Listeners and (yet to come) ACL.
IMPORTANT
This bundle fakes credentials and tokens to be able to inspect permissions. This implies a possible security hole in your application, please be aware of this. I'm not responsible for any issue derived for a misuse or an insecure use of it
Caution
The DataCollector feature re issues the request and some events to be able to inspect the results. If any of your custom voters, listeners, firewal listeners has side effects they will be issued twice
Usage
As for any command you should use: app/console
from your project root.
Current available commands are:
app/console security:debug:firewalls
to view listeners for a firewall.app/console security:debug:voters
to display voters, voters vote and result.app/console security:debug:acl_voters
to display voters, voters vote and result when ACL is present.app/console security:debug:acl_object
to display ACL results for each mask provided.
Available Commands
-
app/console security:debug:firewalls uri firewall username roles
uri
The exact URI you have in the firewallfirewall
Firewall nameusername
User to testroles
Multiple space separated roles for the user
-
app/console security:debug:voters
(this can be faked too, but for the moment a real user is needed)firewall
Secured area of the appusername
Username to authenticatepassword
Username Password
-
app/console security:debug:acl_voters username object-fqcn id permission-name
username
For which user you need the informationobject-fqcn
The object class for which you are asking (using/
instead of\
)id
Object ID in the DBpermission-name
The permission map name, e.g. OWNER
app/console security:debug:acl_object username object-fqcn mask-binary
username
For which user you need the informationobject-fqcn
The object class for which you are asking (using/
instead of\
)id
Object ID in the DBmask-binary
The binary of the mask, e.g. 128 (OWNER)
Sample output
app/console security:debug:firewalls
hereapp/console security:debug:voters
hereapp/console security:debug:acl_voters
hereapp/console security:debug:acl_object
here
Installation and configuration
Get the bundle
Add to your composer.json
Use composer to download the new requirement
Add SecurityDebugCommandBundle to your application kernel
Configure the user class
In your app/config/config.yml
you should add the FQCN that you use: