@@ -7,9 +7,27 @@ if an identity is returned, authentication succeeds. Credential
7
7
treatments depends on your RDBMS, and while simple hashing function such as
8
8
` md5 ` and ` sha1 ` are generally available, it is recommended not to use them and
9
9
rather use the RDBMS specific function such as
10
- [ ` PASSWORD(?) ` for MySQL] ( http://dev.mysql.com/doc/refman/5.7/en/password-hashing.html ) .
10
+ [ ` PASSWORD(?) ` for MySQL] ( http://dev.mysql.com/doc/refman/5.7/en/password-hashing.html ) or
11
+ [ ` crypt() ` for PostgreSQL] ( https://www.postgresql.org/docs/11/pgcrypto.html#id-1.11.7.34.6 ) .
11
12
More details are available in the next section.
12
13
14
+ ## Security considerations
15
+
16
+ Passing passwords to database in plaintext for insert or verification is
17
+ generally not recommended.
18
+ Sql statements can and usually are logged by the database, passwords in them
19
+ become visible to anyone with access to the logs or monitoring tools that
20
+ consume those logs.
21
+
22
+ Safer way is to hash passwords and verify them against stored hash on the
23
+ application side. This way password never needs to leave application and only
24
+ hashed value exchanged with database.
25
+
26
+ As such, this adapter is not recommended for new applications and existing
27
+ applications should consider migrating to using PHP provided password handling
28
+ functions ` password_hash() ` and ` password_verify() ` . See
29
+ [ CallbackCheckAdapter] ( callback-check.md ) for more info.
30
+
13
31
## Configuration Options
14
32
15
33
The available configuration options include:
0 commit comments