Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Keycloak Security Bundle Laravel Package

idci/keycloak-security-bundle

IDCI KeycloakSecurityBundle integrates Keycloak with Symfony security. It provides an authenticator and user provider for OpenID Connect/OAuth2 SSO, token validation, role mapping, and user provisioning, helping secure Symfony applications with Keycloak authentication and authorization.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for enterprise SSO. This bundle is an integration accelerator, not an identity provider — it sits between a Symfony app and Keycloak. The real decision it informs is "do we self-host Keycloak and wire it ourselves, or pay for Auth0/Okta/Cognito?" Adopting this package lowers the self-hosted cost side of that equation by cutting the OIDC plumbing work to days rather than weeks.
  • Unblocking enterprise deals. SSO/OIDC is a recurring gate in security questionnaires and RFPs. This package is a credible answer to "do you support SAML/OIDC SSO?" for the Symfony services in the estate, and it lets you commit to a delivery date for that checkbox.
  • IdP standardization roadmap. Choosing Keycloak as the org-wide IdP (realm-per-tenant, client roles, group mapping) is a platform decision. This bundle's role-mapping behaviour becomes part of how you model authorization, so it shapes the realm/client taxonomy you'll live with.
  • Framework-fit triage — the headline caveat. Despite the "Laravel/PHP package" framing, this is a Symfony bundle, not a Laravel package. If the roadmap is Laravel-first, this is not a candidate; the equivalent decision is laravel/socialite + a community Keycloak provider, or a thin custom OIDC client. Treat this assessment as a Symfony-services-only input.
  • In-house vs. dependency. With 0 dependents and a low-traffic single-maintainer history, this is still effectively a "vendor the code and own it" decision rather than a "depend on it and get updates" decision. v2.0.2 is a genuine sign of life — it is a current patch release, not a 2023 artifact — but one patch release does not establish a maintenance cadence or a security-patch commitment. The resourcing ask is unchanged: budget the fork.

When to Consider This Package

Adopt-consider criteria — all should hold:

  • The service is Symfony (not Laravel), and the team is comfortable with Symfony's security firewall/authenticator model.
  • Keycloak is already the chosen IdP, or is a near-locked decision — the bundle's value collapses if you're still comparing IdPs.
  • You need standard OIDC login plus realm/client role → Symfony role mapping, and you're happy with the bundle's opinion on that mapping.
  • You need server-side session logout — v2.0.2 adds handling for Keycloak-side session termination, so a back-channel/IdP-initiated logout requirement is now a reason for the package rather than a gap to write yourself.
  • You are willing to fork or vendor the bundle, accept the maintenance burden, and pin it in composer.json.
  • Legal has cleared the license. NOASSERTION means the declared license could not be machine-identified. That is a procurement blocker until a human reads the LICENSE file and confirms it's permissive (likely MIT, but unverified).

Look elsewhere when:

  • The stack is Laravel. Wrong framework entirely; do not force it.
  • You need active maintenance, security-patch SLAs, or vendor support — a fresh patch release is encouraging but does not support that expectation.
  • You need SAML (this is OAuth/OIDC), SCIM provisioning, or complex multi-IdP brokering.
  • License ambiguity cannot be resolved.
  • Your auth needs are simple enough that ~200 lines of custom authenticator code is cheaper than an unmaintained third-party dependency — often true for a single app. Note this calculus just shifted slightly: logout is now covered for free, so the custom-code alternative has to justify itself on login + token refresh + role mapping alone.

How to Pitch It (Stakeholders)

To executives: This is a small, free Symfony library that shortens Keycloak SSO integration from roughly two-to-three weeks of engineering to a few days, which directly accelerates closing enterprise deals that require SSO. The newly released v2.0.2 is a maintenance and correctness update — better docs, plus proper handling of server-side session logout, which matters for security reviews. The trade-off remains maturity: it is a low-traffic, single-maintainer project and its license isn't auto-detected. My recommendation is not "adopt" but "timeboxed spike, then decide" — two engineer-days to prove it against our Keycloak realm, with a fallback of a small in-house OIDC client (~1 week) if it doesn't hold up. Budget the fork, not the dependency.

To engineering: It handles the boring parts — Keycloak client config, the OIDC authenticator, token handling, and mapping Keycloak realm/client roles onto Symfony security roles. v2.0.2 closes the logout gap we would otherwise have hand-rolled: server-side session termination is now handled, so validate that path specifically in the spike (logout propagation, then re-login, then a stale-token replay attempt). The rest of the plan stands: evaluate on one non-critical Symfony service, confirm compatibility with our Symfony and PHP versions, check that role mapping matches our realm design, and audit token validation and refresh behaviour before it touches anything customer-facing. Pin the version, fork if we ship it.

Recommendation: Conditional go for Symfony services on Keycloak, contingent on license clearance and a successful spike; no-go for Laravel services. The v2.0.2 logout handling reduces our fork scope and strengthens the case, but does not change the underlying dependency risk.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk