horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Tenant management and authentication

Open chunshao90 opened this issue 1 year ago • 2 comments

Describe This Problem

Tenant management and authentication.

Proposal

Simple solution

  • [ ] config files, something like
[server.auth]
enable = true
# available values: file/ceresmeta
source = "file"

[server.auth.file]
username = "admin"
password = "secret-token"

Complex

  • [ ] ceresmeta supports creating tenants and generating tokens.
  • [ ] ceresdb supports identity verification.

Additional Context

No response

chunshao90 avatar May 25 '23 03:05 chunshao90

Besides store tenants in ceresmeta, we should also support this via config files

  • https://github.com/CeresDB/ceresdb/issues/1016#issuecomment-1605831993

jiacai2050 avatar Jun 28 '23 09:06 jiacai2050

https://www.postgresql.org/docs/current/sql-createrole.html

PG will store password according to https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-PASSWORD-ENCRYPTION, and users can't get original password.

jiacai2050 avatar Jul 10 '23 13:07 jiacai2050

For gRPC, we can use Bearer auth

  • https://github.com/hyperium/tonic/blob/master/examples/src/authentication/client.rs

jiacai2050 avatar May 09 '24 07:05 jiacai2050