Commit Graph

9 Commits

Author SHA1 Message Date
1d482db4dd *: Support for tidb_sm3_password authentication (#36193)
close pingcap/tidb#36192
2022-09-08 12:00:57 +08:00
a89ef1f276 *: support ACCOUNT (UN)LOCK when creating/altering user (#37052)
close pingcap/tidb#35961, close pingcap/tidb#37051
2022-08-25 16:12:22 +08:00
911e7cc360 *: enable revive (#35970)
ref pingcap/tidb#35345
2022-07-15 16:03:06 +08:00
6eeabd4f54 parser/auth: Optimize caching sha2 speed (#35999)
close pingcap/tidb#35998
2022-07-08 11:35:03 +08:00
c95be4aaa6 [parser] auth: caching_sha2_password salt fix (#1249)
- a NUL or '$' could get replaced with another NUL or '$'
- Replacement characters didn't get their first bit set to 0 (`&^ 128`)
- The test case used the index number instead of the value of the rune.
2021-10-09 14:53:23 +08:00
4415136781 [parser] auth: check for NUL in caching_sha2_password salt (#1246) 2021-10-09 14:53:23 +08:00
768ee171c1 [parser] auth: Fix salt generation of caching_sha2_password (#1242)
This code intended to set the first bit of every byte of the salt
to 0 as the salt should not contain multi-byte UTF-8.

However it failed to do this. This changes the `^` with a `^&` to fix
that.

In addition to that this also avoids the '$' inside salts as that is
already used as delimiter in the authentication string.

Co-authored-by: tiancaiamao <tiancaiamao@gmail.com>
2021-10-09 14:53:23 +08:00
12d0a279c4 [parser] parser,ast: Support for authentication plugins (#1236) 2021-10-09 14:53:23 +08:00
8d23ad21c9 [parser] auth: add the caching sha2 algorithm for authentication (#1232)
This allows validating passwords against the `authentication_string`
data that MySQL stores for caching_sha2 passwords.

Related:
- https://github.com/pingcap/tidb/issues/9411
2021-10-09 14:53:23 +08:00