Hi Matthias,
Thank you for this input.
Couple of years ago when we started work on the web applications, we also experimented with Spring Security. It was our first impulse to "just integrate with Spring Security and be done with it".
We also created a prototype implementation but found some limitations:
- Authentication:
It was possible to use Spring Security as Http Request authenticator.
The only problem we had: the camunda webapp can manage multiple process engines / connect to multiple process engines in a single HTTP Session. This is used for multi tenancy [1].
It was unclear to us how we could manage multiple authentications with spring security.
- Authorization:
It was possible to use Spring Security as Http Request authorizer (ie. determine whether a given request can be performed given the current authetication or not.)
However there were two problems:
-- We wanted to have integrate authorization at a "lower level". In Camunda authorization also works on the Java API level [2].
-- While some authorization concerns can be realized by simply forbidding some requests: example: POST /task/{id}/complete, others cannot. Example: GET /task/?createdAfter=2012-12-12. The latter request must only return tasks which the currently authenticated user is authorized to "see". This cannot be implemented efficiently at any level higher than the database. Ie. you cannot simply fetch all tasks and then remove those that the current user is not authorized to see for perfromance reasons and also paging etc...
- User / Group Repository
We already had an API for user / group access (cf. "IdentityService"). So the question was: is Spring Security a provider for that or is that a provider for Spring Security. Both options lead to problems.
These are some of the reasons why er did not go with spring security but rather implemented a minimal set of components ourselves.
Having said that: if you find a way to integrate spring security, maybe not for all of the above mentioned aspects but for some, we will assist you by answering questions here in the forums.
You can also provide the resulting code as community maintained extension to others.
Regards,
Daniel