horaedb
horaedb copied to clipboard
Tenant management and authentication
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
Besides store tenants in ceresmeta, we should also support this via config files
- https://github.com/CeresDB/ceresdb/issues/1016#issuecomment-1605831993
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.
For gRPC, we can use Bearer auth
- https://github.com/hyperium/tonic/blob/master/examples/src/authentication/client.rs