I'm working on an application that had basic requirements for authentication in the first version (i.e. think single administrator login), and now I have a requirement to extend this to allow for different users, roles, and permissions.
It has been suggested that I attempt to integrate with an existing product we have that does this sort of thing as a separate server for basic authentication, or also extending to second factor authentication. The application I'm working on is a small, downloadable application that is supposed to be easy to set up and have running. The other product is large and 'enterprisy', requiring manual setup, which I could try to do automatically for what I need (maybe).
The big problem is that when described as a feature set of what we'd like to do in my product, it maps up perfectly with what the other product does, but it's not in a form that I can use it. Management wants integration with the other product, because it seems intuitive that we could leverage that, but the other product isn't in a form that I could use. i.e. thinking of it in terms of MVC, I don't think there's a way to separate the view from the model.
The other thing I'm concerned about, which has happened in the past, is that if I'm asked to integrate with this that I'm going to be the one doing all the integration work, and if something cannot be done from the other product, then I'm just out of luck. Integration with my product is secondary to anything the other team would want, and my team isn't a 'customer', so there's little motivation to get them to fix or add stuff for us.
So, in summary, my question is: I don't want to reinvent the wheel, but should I attempt to force a square peg into a round hole by trying to use a product that does what I need, but not in a form that's easy to reuse?
edit: I'm using Java, so Spring Security is an option.