asp.net mvc - Login password encryption with active directory -


my mvc5 application usage active directory , unable use default .net provided password encryption ad doesn't support it.

my controller is:

[httppost] [validateantiforgerytoken] public actionresult login(account user) {     if (modelstate.isvalid)     {         if (membership.validateuser(user.username, user.password))         {             var principal = user.getuserprincipal(user.username, user.password, user.domainname);             if (principal != null)             {                 formsauthentication.setauthcookie(user.username, user.rememberme);                 var returnurl = getredirectfromloginurl();                 if (url.islocalurl(returnurl))                     return redirect(returnurl);                 else                     return redirecttoaction("index", "home");             }             else                 modelstate.addmodelerror("", "user principal not created.");         }         else         {             modelstate.addmodelerror("", "login data incorrect!");         }     }     else         modelstate.addmodelerror("", "login data incorrect!");      return view("login", user); } 

the login works fine have security issue. can see username, password, domain, etc. in clear text when capture data using ie9 developer tools (screen below):

__requestverificationtoken=s-dkcsoudftysobh4fj...&username=test&password=testpassword&domainname=domainname 

network capture shows password in clear text

web.config has code:

<membership defaultprovider="admembership">   <providers>     <clear/>     <add name="admembership" type="system.web.security.activedirectorymembershipprovider" connectionstringname="adconn" attributemapusername="samaccountname" />   </providers> </membership> 

please how encrypt or hide password.

looks default behaviour in ie developer tools. tried login in google, microsoft sites , shows password in plain text.

i dont know if security issue in ie or not how behaving.

steps view passwrod:

  1. open gmail or live.com in ie9 (i tried in ie9)
  2. f12 (open developer tools) -> go network tab
  3. click start capturing button
  4. enter username/password (you can enter test)
  5. click stop capturing , go detailed view
  6. in grid click on post row , go "request body" tab
  7. see code password plain text @ last of _requestverificationtoken......

if finds better solution, please let me know.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -