Is Crowd the black sheep of the Plugin SDK family?

I ask because it seems like all of the basic things someone would want to do relating to UI in a Crowd plugin do not work. For example:

-I18n does not work, specified resources do not get picked up (https://jira.atlassian.com/browse/CWD-2167)

-Velocity xwork results do not work, ClassNotFoundException on Velocity Context

-Freemarker xwork results get a NPE when you try to use webwork Freemarker tags because Crowd used JSP to implement the tag templates and there is a bug in the FreemarkerResult class

-Custom xwork result-types don't work because Crowd's loading code does not use the class loader for the plugin

-There is no way to extend BaseAction from a plugin (not absolutely required, but nice to fit into the rest of the Crowd framework)

-The atlas-cli "pi" command does not work, throws exceptions, making every cycle of development demand a Crowd restart

None of these individually are huge bugs (I don't believe), but summed together they make for a really miserable experience trying to create a plugin for Crowd. I know personally I've spent at least a day digging around inside all the source code to find a work around for a problem, then find that the workaround fails because of another bug.

I also went and looked at the scheduled Jira bugfixes on the roadmap for Crowd and was disappointed to see that there was nothing plugin related scheduled to be fixed. Maybe this is because hardly anyone creates plugins for Crowd so it isn't a priority, but perhaps based on my experience it is because the plugin infrastructure has so many problems that the plugins don't get created.

6 answers

Hey David, I've done the same thing and pulled my hair out.

My guess is that a lot of this won't be addressed and instead the embedded versions in their products will get better and more functional and totally replace crowd down the the track. If that's the case maybe why there isn't as much focus on it.

Would love to hear from some Atlassian's about it though

Our use case is we have multiple products that talk to Crowd to do authentication so I'm not sure that embedding it would really solve anything for us.

I'm guessing the absence of a reply from Atlassian is telling..

1 vote
Shihab Hamid Atlassian Team Jan 31, 2012
Hey,
Is Crowd the black sheep of the Plugin SDK family?
Crowd does not support the same set of Atlassian Plugin SDK tools/plugin-points as other Atlassian applications.
Some of the issues you have listed above are actual bugs, some in Crowd, some in the Atlassian Plugin SDK, etc. We encourage you to raise these issues so that we're aware of them and can prioritise them for upcoming releases.
The recommended way for developers to utilise Crowd is through the remote APIs. The REST API gives remote applications the ability to read and write user, group and membership information from a unified view of directories. We also maintain a SOAP API for backwards compatibility. We are continuing to work on Crowd's API (REST) and LDAP support.
If you are writing UI-heavy pieces, eg. a user profile management screen, a centralised login screen, or an application portal, we recommend that you use the remote APIs to communicate to Crowd, but implement the UI in your application - if you use other Atlassian Apps, we recommend building UI plugins there and leveraging the rich and feature packed plugin points for building out complex UI. If you still really do want or need to extend the UI within Crowd, we recommend you look at the Servlet plugin point.
Cheers,
-Shihab

Hi Shihab-

Thanks for responding. Crowd's support for xwork is pretty close to being fully functioning, with the few bugs I ran into solved I think it could readily be supported.

In our case we wanted to have better control over the default groups that users received based on their registered email address, so we needed a UI and Crowd seemed like the obvious choice since that is where the user created listener lives that would implement this. I suppose in retrospect we could have made it remote and put the UI into Confluence or Jira, but this seemed like extra work for no discernable gain.

The main problems I found with the Servlet hook (and I did try this first) is you get zero UI integration, and AFAICT you can't put the servlet behind an auth-required section.

Anyway thanks for the response, and I hope I can encourage your team to fix up these couple bugs so Crowd developers can use xwork and integrate with the UI.

Thanks,

David

The answer from Shihab is unsatisfied:

If you are writing UI-heavy pieces, eg. a user profile management screen, a centralised login screen, or an application portal, we recommend that you use the remote APIs to communicate to Crowd, but implement the UI in your application - if you use other Atlassian Apps, we recommend building UI plugins there and leveraging the rich and feature packed plugin points for building out complex UI. If you still really do want or need to extend the UI within Crowd, we recommend you look at the Servlet plugin point.

We use Crowd for centralized user managent, and connect all of our applications to Crowd. So which of our applications is "your application"? Jira? Or Confluence? Or Bamboo? Or Fisheye? ... No user would ever try to change his passwords in Jira if he knows the users are managed in Crowd!

And if we would use the servlet plugin point for our extensions, we would have to do a lot of things Atlassian already did - but does not allow to use it.

So from my point of view, Crowd has to provide features to extend the UI. Here are examples for features we already provided for Crowd (most with UI changes):

  • Import LDAP user (to be able to assign them to groups before the first login)
  • Automatically assign users to groups in dependence of LDAP attributes
  • Automatically synchronize user details with LDAP attributes
  • Automatically disable users if they are disabled in LDAP
  • Self-service features for project managers to manage users in project groups
  • Send mail to all users in groups
  • Planned: disable users at a specific date

So please provide an official way to extend Crowd - including it's UI, e.g. by XWork actions working with Velocity or something similar.

Thanks,

Uwe

Hi Uwe;

you're still able to extend the Crowd UI through the servlet plugin module, and you can perform Velocity rendering with the Atlassian Template Renderer library although, as you say, there's some duplication of effort here.

For deeper integration with plugins, I've opened CWD-3237 for your improvement request. Although it's not on our short-term roadmap, it's certainly something we'll consider.

Hello,

thanks for creating the issue. One can see that it is problematic to write Crowd UI extensions as this issue already refers to several other problems.

Within Crowd 2.5.1, we could extend its UI by plugins with Velocity templates only if

  • we store atlassian-velocity-1.2.jar, velocity-1.6.4-atlassian-4.jar and velocity-tools-1.3.jar into crowd-webapp/WEB-INF/lib (without these jars, some Velocity classes are missing)
  • we implement version-1 plugins (with version-2 plugins, the velocity templates stored in the classpath of the plugin are not found; this works well in Jira)
  • we extend crowd-webapp/WEB-INF/classes/web.xml by our interceptors (we could manage to store interceptors in a version-2 plugin descriptor, but the interceptors are never executed).

We would prefer to write normal version-2 plugins to extend Crowd by the features listed above, but this was impossible. It is so easy in Jira...

Related to Shihab's statement "Crowd does not support XWork Action plugins": can we continue with our hack until Atlassian implements a better way? Or will Atlassian remove further features from Crowd making it impossible to add features without starting with servlets?

And can we expect improvements for the Crowd development documenation? E.g. https://developer.atlassian.com/display/CROWDDEV/Web+Section+Plugin+Modules seems to be for Jira.

Uwe

> Or will Atlassian remove further features from Crowd making it impossible to add
> features without starting with servlets?

There are no plans to remove features. Please add any feedback to issues so we can track interest and see what the best direction for third-parties to improve Crowd would be.

Sorry,

we extend crowd-webapp/WEB-INF/classes/web.xml by our interceptors (we could manage to store interceptors in a version-2 plugin descriptor, but the interceptors are never executed).

this is not correct. Correct is that we changed crowd-webapp/WEB-INF/classes/xwork.xml

5 years later....

...nothing changed.

Thanks for sharing your experience (+1) - I've been just about to start a Crowd plugin myself and sure appreciate this upfront warning regarding serious obstacles ahead ;) I'm wondering about Atlassian's Crowd strategy/roadmap as well and share Colin's impression of the standalone version being deprioritized at least in favor of the embedded version. It's a bit odd that the Crowd promotion towards being the unified security layer across Atlassian tools actually seems to imply a demotion of the standalone version like so (though maybe/hopefully that's simply a transitional problem, e.g. CWD-2105 within the 2.5 roadmap looks promising for a change).

The answer from Shihab is unsatisfied:

If you are writing UI-heavy pieces, eg. a user profile management screen, a centralised login screen, or an application portal, we recommend that you use the remote APIs to communicate to Crowd, but implement the UI in your application - if you use other Atlassian Apps, we recommend building UI plugins there and leveraging the rich and feature packed plugin points for building out complex UI. If you still really do want or need to extend the UI within Crowd, we recommend you look at the Servlet plugin point.

We use Crowd for centralized user managent, and connect all of our applications to Crowd. So which of our applications is "your application"? Jira? Or Confluence? Or Bamboo? Or Fisheye? ... No user would ever try to change his passwords in Jira if he knows the users are managed in Crowd!

And if we would use the servlet plugin point for our extensions, we would have to do a lot of things Atlassian already did - but does not allow to use it.

So from my point of view, Crowd has to provide features to extend the UI. Here are examples for features we already provided for Crowd (most with UI changes):

  • Import LDAP user (to be able to assign them to groups before the first login)
  • Automatically assign users to groups in dependence of LDAP attributes
  • Automatically synchronize user details with LDAP attributes
  • Automatically disable users if they are disabled in LDAP
  • Self-service features for project managers to manage users in project groups
  • Send mail to all users in groups
  • Planned: disable users at a specific date

So please provide an official way to extend Crowd - including it's UI, e.g. by XWork actions working with Velocity or something similar.

Thanks,

Uwe

I would like to second Uwe's remarks. I am trying to write event listeners to enforce group membership based on business rules. It is unthinkable that I should have to use REST calls from within a Crowd event handler. I am truly exasperated that JIRA seems to have better SDK support of Crowd functionality that Crowd does. Perhaps it is there, but it is certainly not documented. It is tremendously frustrating to find that what little documentation there is for Crowd plugin development seems to be borrowed from the JIRA docs and often still refers to JIRA in the text. And I have totally given up on getting any UI functionality working in Crowd.

+1000 Even after the UI update in v2.8 we continue to wait for any sliver of improvement to the Crowd plugin dev experience.

+1 we still waiting but already on v2.9

4 years later...

...nothing changed

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

32 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you