Results 1 to 2 of 2

Thread: UsernamePasswordAuthenticationFilter Security Concerns

  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Default UsernamePasswordAuthenticationFilter Security Concerns

    I'm using UsernamePasswordAuthenticationFilter which, by default, gets username and password from HTTP query params.

    I've read a few articles stating that passing query params over HTTPS is not entirely secure because they remain in browser history and many web servers log the full URL including query params in the clear.

    I haven't found any information on alternative, more secure methods. I am considering extending UsernamePasswordAuthenticationFilter.attemptAuthen tication and getting the params out of the request body. I believe this approach would work, but I'm surprised that there isn't a more secure solution "out of the box."

    1) Are my security concerns valid about HTTP params over HTTPS?
    2) If so, is there a better approach than what I've suggested?

  2. #2
    Join Date
    Nov 2006
    Location
    London, UK and Tallinn, Estonia
    Posts
    55

    Default

    Your concerns are valid, however you can set the postOnly property on the filter to prevent credentials being processed if passed as urls parameters, obviously you would have to ensure that you are using POST in your login form as well. I actually think there are wider concerns about relying simply on a username/password combination which I've outlined in this blog post. I think strong authentication is the way to go, and it's a lot chapter these days.
    Toby Hobson
    toby.hobson@cloudseal.com
    Single Sign on for Java - www.cloudseal.com
    Follow me on Twitter: tobyhobson

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •