rezzza/security-bundle
RezzzaSecurityBundle is a Symfony bundle that packages reusable security utilities and integration for authentication and authorization, helping developers add access control and security-related services to Symfony applications.
This is a Symfony bundle (not Laravel — it targets Symfony 2/3 era kernels), so "day-to-day" means wiring it into AppKernel and config.yml, not a service provider.
Minimal steps:
composer require rezzza/security-bundle — pin carefully, the last tagged release is from September 2017 and predates Symfony 4 Flex. Expect to run it on Symfony 2.8/3.x, or to fork/vendor it for anything newer.app/AppKernel.php:
new Rezzza\SecurityBundle\RezzzaSecurityBundle(),
DependencyInjection/Configuration.php, since docs are thin):
rezzza_security:
secret: "%secret%"
signed_request:
enabled: true
obfuscate:
# paths/params the profiler should mask
Where to look first: DependencyInjection/Configuration.php (authoritative config schema), then EventListener/ and Security/ for the signed-request flow, then the README. The README is the only real documentation and it's short.
First use case to try: pick the obfuscation half before the signing half. Masking sensitive request data in the profiler is low-risk, instantly visible, and validates that the bundle is actually loaded before you start enforcing signatures on real traffic.
1. Profiler obfuscation (best first win). Configure the paths/parameter names that should be scrubbed (passwords, tokens, auth headers, card numbers) so Web Profiler's Request panel and the Doctrine/HTTP collectors don't leak them. Day-to-day value: you can leave debug mode on in staging without credentials showing up in shared profiler URLs.
2. Signed requests for server-to-server / webhook endpoints.
The typical flow is: the calling service signs a request (HMAC over the request with a shared secret), and the bundle's listener validates the signature before your controller runs. Pattern it as an outer guard on a firewall or a dedicated API firewall path:
security:
firewalls:
partner_api:
pattern: ^/api/partner
stateless: true
# signed-request listener enforces signature here
Keep the signed-request check in front of authentication, not instead of it — it answers "is this request from someone holding the secret," not "who is this user."
3. Allow-list public endpoints. Anything unauthenticated (health checks, public docs) needs to be excluded, otherwise the listener rejects it. Keep the exclusion list next to the firewall config so route changes stay auditable.
4. Test against the signer, not a mocked listener. When the bundle exposes a signer service, resolve it in functional tests and sign the outgoing request the same way production clients do. This catches canonicalization drift between client and server, which is the #1 source of "works in prod, fails in test" signature bugs.
5. Complement, don't replace, transport security. Signed requests give you integrity and a shared-secret check; they do not encrypt the payload. Keep this behind TLS and use it for integrity/replay resistance, not secrecy.
6. Wrap it in your own thin layer.
Given the maintenance state, isolate bundle usage behind one service of yours (e.g. RequestSignatureVerifier) rather than calling bundle services from controllers. If/when you replace the bundle, you swap one class.
composer.json overrides and manual service registration; on Symfony 5+ expect to fork it. Don't promise this to a team on Symfony 6 without a spike.http_build_query ordering), it fails intermittently depending on parameter order.Configuration.php — a silently ignored typo in a YAML block is a very common "why isn't it working" cause. Run config:dump-reference if the bundle supports it.How can I help you explore Laravel packages today?