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

Crowd User Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. Read the bundle's 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).
  2. Skim the user provider class (the thing implementing Symfony's UserProviderInterface) — that is where loadUserByUsername maps a Crowd response into a user object and groups.
  3. Check 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.

Implementation Patterns

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.

Gotchas and Tips

  • Framework mismatch is the real cost. Everything in this bundle assumes Symfony's security contracts, event system, and DI container. Budget time to port, not to integrate. The Crowd REST calls are the reusable part; the Symfony glue is not.
  • Maintenance risk. 3 stars and 0 dependents means no community buffer. Pin the commit, vendor or fork it if you adopt it, and expect to own the code. Audit for abandoned dependencies (older Guzzle versions are a common culprit).
  • Crowd returns HTTP 400/401, not friendly exceptions. Invalid credentials and "user does not exist" come back as specific error bodies (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.
  • Application credentials vs. user credentials. The bundle authenticates as a Crowd application (name + password) to call the API, and separately validates the user's password. Mixing these up is the most common setup failure. Confirm the app name exists in Crowd and has permission to the directories you expect.
  • Trailing slash / base URL quirks. The base URL must point at the Crowd context root (e.g. https://crowd.example.com/crowd). A missing or extra slash silently produces 404s that look like auth failures.
  • Groups need to be requested. Some Crowd configurations only return direct groups; nested groups require the /group/nested endpoint or an expand parameter. If roles come back empty, this is usually why.
  • SSL and proxies. Crowd is almost always behind an internal CA. Do not disable TLS verification to "make it work" — add the CA bundle to the HTTP client config instead. The same applies to corporate proxies.
  • No request timeouts by default. Set explicit connect/read timeouts (2–5s) on the HTTP client. A hung Crowd instance should degrade, not hang your login page.
  • Secrets handling. The application password belongs in .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.
  • Extension points: the cleanest customization is to decorate the Crowd client (add retries, caching, logging) and to override the user provider rather than editing vendor code. If the bundle exposes no interface to swap the client, that is a strong signal to fork.
  • Degradation strategy: decide up front what happens when Crowd is down — fail closed (nobody logs in), fail open (cached sessions survive), or fall back to break-glass local admin accounts. Document it; you will need it at 3am.
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.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment