Alexander Suter
Because they are two completely different departments in the company.
- Application A is an application for quality management.
- Application B is an invoicing application.
These applications also have a different set of users, roles, visibility rules etc. and don't really share anything other than one role tree.
This is further to ensure that the users and roles are kept isolated to their specific application since an intersection like this is rather rare, even at this rather big company.
Another reason is that the branding was (or might still, didn't check that in quite some time) be dependent on the context itself.
For this concrete example here: the customer has a rather creative organisation. The customer’s LDAP structure does not model these organizational relationships in a way we can directly reuse - otherwise the whole CRUD process wouldn't even exist and I could just use the groups from LDAP to bind the roles to; it would be the cleanest way without any doubt.
The shared roles are basically a tree of purchaser roles which are structured by department - that's probably also making clear why they have a function in both applications. Adding unwanted complexity, these teams are named by a combination of last names and referred to it like that at this customer, which adds quite a lot of complexity since they also can change when the members change.
When I rethink this, I probably might just change the CRUD process to not write into the SecurityContext directly but rather store it into a database and then build the role structure and set the members from a generic process which works in both application if there's so easy way available to access the SecurityContext from another application.
I further understand your point though, this example might be "special" to begin with. When you have one specific workflow portal for a customer, I think your point is more than valid. But when you don't want certain people to even have access to an application they shouldn't be able to access, I'd argue that a shared SecurityContext doesn't always make sense.
Thanks for your input!