7 messaggi dal 12 ottobre 2012
Ciao,

In un progetto Asp Net, con pattern MVC la password dell'utente ADMIN dove è meglio conservarla ?

Nel db o all'interno del programma stesso, magari in un controller ?

Esiste un metodo ottimale per gestire tale profilo ?

Ciao
710 messaggi dal 13 novembre 2008
Contributi
Ciao,
in generale in qualsiasi tipo di progetto occorre prestare enorme attenzione alla gestione delle identità, a maggior ragione con l'introduzione del GDPR; come sviluppatore sei responsabile della gestione a codice dei dati degli utenti.
Escludi qualsiasi forma di conservazione nel codice, assolutamente non sicura, se hai dubbi adotta tecniche consolidate, ad esempio Identity, che fornisce uno schema del genere:

user--> dati:username, password-->Identity-->hash password-->database

qui un articolo relativo al PasswordHasher in Core, ma i concetti sono applicabili in generale

https://andrewlock.net/exploring-the-asp-net-core-identity-passwordhasher/

particolarmenti importanti, qualsiasi metodo si utilizzi, questi punti descritti dall'autore:

'A hash is a one way function, so given the password you can work out the hash, but given the hash you can't get the original password back. For security reasons, the characteristics of the hash function are important; in particular, the hash function should be relatively costly to compute, so that if your database of password hashes were to be compromised, it would take a long time to crack them.'

'Important You should never store a user's password directly in a database (or anywhere else). Also, you should never store the password in an encrypted format, in which you can recover the password. Instead, passwords should only ever be stored as a hash of the original, using a strong cryptographic hash function designed for this purpose.'

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.