I have a Java web app which provides a search service, and in some cases needs to check security for results. If it matters, it's implemented in Spring MVC and running under jetty.
I have a customer who would like the web app's authentication to:
- Be done via Active Directory Federation Services (ADFS) instead of the existing build-in mechanism (to avoid a seperate login).
- Be able to impersonate the remote user on the search server, such that security checks can be performed executing a separate application on the search server (which doesn't itself know anything about ADFS, but is able to perform the relevant checks when run as the user in question).
It this possible, and if so, how?
(Apologies if the Windows world terminology is a bit off - it's not something I know much about, but hopefully at least the intention is clear)
A few notes on pieces of the puzzle I've already looked at:
- Impersonating a user from a Java Servlet, is a question I had a number of years ago covering roughly the same ground, but without the ADFS requirement - I'm not sure how ADFS impacts things, but Waffle (the solution for that question) doesn't seem to provide any support for it.
- I've seen Java application with SSO (SAML) and ADFS and How do I talk to ADFS from Java?, which seem to provide a way forward for the ADFS authentication, but I'm unsure if that is compatible with subsequent impersonation.
I've seen http://blogs.objectsharp.com/post/2010/09/10/Converting-Claims-to-Windows-Tokens-and-User-Impersonation.aspx and https://msdn.microsoft.com/en-au/library/ee517278.aspx but I'm unsure:
- If I'll have access to the necessary claims to do this if I follow the SAML or OAuth path above
- Whether it's possible to implement that from within Java
I think the second (impersonation) part is roughly the same as Impersonating ASP.NET claims identity to windows identity, except that I want to do it from within Java rather than .Net.