Posted on 20/01/2016 12:19:11
Ok, so basically what you suggested was something like this, right?
string username = user.username;
string token = HttpContext.Current.Request.QueryString["token"]; // password is "hidden" here.
string password = recoverPassword(token); // Recover hidden password from token.
security.ExtranetLogin(user.UserName, password);
// Bingo, now we are loggedin.
If your answer is yes - that's right. Than here is why this would fail.
1) As I mentioned before, it's a 3rd party service that will have to "use url" and than route it for it's users towards our site.
2) Those are real user accounts for day-to-day users. And those users would use website, and possibly update their passwords, than this would require updating (notifying) 3rd party service about the password change, and that's not really possible.
3) I can include a static URl parameter in URL, but I can't realy make that 3rd party to do some password hiding/hashing for me.
At the same time I totally understand what risks associated with it. Simply allowing someone loggin just by providing correct URL. User access is not something that should be granted simply by providing correct static URL.
Well, yes but if that what customer is asking, Not sure how to go arround this than.
But if we imagine that this actually is implemented, and IF someone WOULD be able to login as that user - what would be the worst thing that could happen?
IMHO It's not like this user (when loggedin) could get this user password (cause it's safe encrypted in DB and never exposed, and not hidden in some string pattern that is probably possible to guess/predict (maybe)) or somehow steal any other user sensetive data. Unless there is something very serious about this, why you would not do that under any circumstances. I would very much like to hear them out.
The passwords of other users are not accessible. No access to Backend. Worst thing Hacker could do would be to - attempt placing "false order". That could be easilly get tracked, and removed. It's B2B solution. What else can hacker create, if he (let us imagine) loggsin to as a user, that only has front-page access.
If you are worried for the implementation I provided for this exmple (see my first post) I simplyfied it for the sake of example. In reality there would be a special code that would define what user I need to pull from the DB, and it's not DW AccessUserID - it's something else, but the idea is the same...
And Lastly, Speaking of possibilities and security in DW in general.
(my personal oppinion) I think that allowing AccessUserPassword to be Unhashed/Unencrypted represents probably the biggest risk there can be.
Can't imagine what is worser than keeping password (ALL user passwords) in cleartext in DB. http://screencast.com/t/KGKy9Na7dlvb
What I am trying to say here is: If this is allowed, than why can't we allow users to login through url, or just somehow authenticate in API without known password.
/Dmitrij