Support auth plugin
Summary
- [x] #3480
- [x] #3482
/assignme
jwt might be a promising authentication option, like: https://trino.io/docs/current/security/jwt.html
@BohuTANG
after discussing with @flaneur2020, I think we may change password_type back to auth_type. and use the same field to hold enum { JTW, Sha256Password, DoubleSha1Password, ...}, which directly corresponds to the "With" part in SQL.
otherwise, we need another field to hold enum {JWT, Password, }, which is a waste and has no benefit.
and it is a little more convenient to use one field/var to dispatch auth logic and to be passed a argument
better way for rust is to use enum?
enum { Password(type PasswordType,password vec) Ldap(config string) }
Ok, enum looks make sense.
ok, I will do it
@youngsofun can take this issue assigned to yourself by /assignme :)
/assignme
plan with 3 pr:
- [ ] refactor auth with enum (user table, create/alter users parser and tests)
- [ ] continue to refactor auth framework and support simple JWT and HTTP basic(use existing password)
- [ ] store password as hashed value as it should be
- [ ] create root user
All work has been done. Let's close.