nordeus/crowd-user-bundle
Symfony bundle for integrating Atlassian Crowd user authentication. It provides a Crowd-backed user provider and services for validating credentials against Crowd directories, helping Symfony applications centralize login and user management.
The first thing to understand is that this is a Symfony bundle, not a Laravel package. There is no service provider, no facade, and nothing auto-discovered by composer require. If you are working in a Laravel codebase, treat it as a reference implementation and a source of a Crowd REST client rather than something you composer require and use directly.
Minimal steps to evaluate it:
README.md, then the DependencyInjection/Configuration.php — that file is the authoritative list of every config key (Crowd base URL, application name, application password, and usually an HTTP client / cache option).UserProviderInterface) — that is where loadUserByUsername maps a Crowd response into a user object and groups.composer.json for the underlying Crowd client dependency and the supported Symfony/PHP versions. This bundle is small (3 stars, 0 dependents) and likely targets an older Symfony line; confirm it is even installable against your PHP version before planning around it.The first real use case is: a user submits username + password, you POST those credentials to the Crowd REST endpoint (/rest/usermanagement/1/authentication?username=...) along with the application name/password, and on success you fetch /rest/usermanagement/1/user plus /rest/usermanagement/1/user/group/nested to build an identity.
In a fresh Laravel app the fastest path is usually to copy the bundle's HTTP calls into a small CrowdClient class behind an interface, register it in a service provider, and skip the Symfony security plumbing entirely.
Symfony-native pattern (if you actually run Symfony): wire a crowd user provider into the firewall, point form login at it, and let the bundle handle credential checking. Map Crowd groups to Symfony roles in a custom getRoles() on your User class. This is the intended path and the least code.
Laravel adaptation — custom guard: implement Illuminate\Contracts\Auth\UserProvider (or just a CrowdGuard), where retrieveByCredentials() calls Crowd authentication and validateCredentials() returns the Crowd result. Register it via Auth::extend('crowd', ...). This keeps Auth::attempt() working and lets you swap it for local auth later.
Laravel adaptation — socialite-style flow: if your Crowd instance is behind the same SSO as everything else, you may only need a "verify the user exists and pull their groups" call after an upstream proxy authenticates them. In that case you only need the read endpoints, not the authentication endpoint.
Hybrid sync pattern (most robust day-to-day): authenticate against Crowd on login, then upsert the user and their groups into a local users table. Authorization checks hit the local DB, not Crowd. This removes an external dependency from every request and gives you a place to store app-specific data. Refresh the cached profile on a schedule or on each login.
Role mapping: keep a config array mapping Crowd group names to Laravel abilities/gates (['crowd-admins' => 'admin', 'crowd-engineering' => 'engineer']). Do the mapping in one class so it is testable and does not leak into controllers.
Caching: Crowd is an external service and is often slow. Wrap getUser and getGroups in a short-TTL cache (60–300s) keyed by username. Never cache the authentication (password) call.
Testing: inject an HTTP client interface and fake it in tests. Do not point your test suite at a live Crowd server — you will get flaky builds and locked-out service accounts.
INVALID_USER_AUTHENTICATION, USER_NOT_FOUND, APPLICATION_ACCESS_DENIED). Parse the body, don't just check the status code, otherwise you will conflate "wrong password" with "app misconfigured" and produce terrible error messages.https://crowd.example.com/crowd). A missing or extra slash silently produces 404s that look like auth failures./group/nested endpoint or an expand parameter. If roles come back empty, this is usually why..env / a secret manager, never in committed config. Ensure the bundle does not log request bodies — user passwords travel in query/body and can leak into logs.How can I help you explore Laravel packages today?