karltoffel
Jun 20th, 2012, 08:42 AM
Hi,
I want to discuss a design decision I have to make. I have a server application which is split into two parts, a domain service and a view service. The view service accesses the domain service using Spring's HTTPInvoker. I have integrated Spring security in both layers, the view service uses org.springframework.security.authentication.rcp.Re moteAuthenticationManager to perform a remote authentication. Since I want to protect service methods in the domain service I use the org.springframework.security.remoting.httpinvoker. AuthenticationSimpleHttpInvokerRequestExecutor to propagate the current authentication from the view service to the domain service. This works like a charm (after setting erase-credentials="false").
Problems arise when I use rememberme-cookies. The authentication is restored using a UserDetailsService, but since the password in the database is hashed, the authentication contains no usable credentials. But I need the raw password for AuthenticationSimpleHttpInvokerRequestExecutor to create a basic authentication.
Is this a use case where the change from a hash-based password digesting to a two way encryption-based password storage makes sense?
Or can I use some spring magic, which I just have overlooked?
Greetings,
Karl
I want to discuss a design decision I have to make. I have a server application which is split into two parts, a domain service and a view service. The view service accesses the domain service using Spring's HTTPInvoker. I have integrated Spring security in both layers, the view service uses org.springframework.security.authentication.rcp.Re moteAuthenticationManager to perform a remote authentication. Since I want to protect service methods in the domain service I use the org.springframework.security.remoting.httpinvoker. AuthenticationSimpleHttpInvokerRequestExecutor to propagate the current authentication from the view service to the domain service. This works like a charm (after setting erase-credentials="false").
Problems arise when I use rememberme-cookies. The authentication is restored using a UserDetailsService, but since the password in the database is hashed, the authentication contains no usable credentials. But I need the raw password for AuthenticationSimpleHttpInvokerRequestExecutor to create a basic authentication.
Is this a use case where the change from a hash-based password digesting to a two way encryption-based password storage makes sense?
Or can I use some spring magic, which I just have overlooked?
Greetings,
Karl