英文:
Read-only user for Grafana when connecting to QuestDB
问题
我有一个连接到QuestDB的Grafana仪表板,用于可视化来自加密货币的低延迟数据。
我想将用户设置为只读,但似乎QuestDB仅对查询兼容PostgreSQL,而用户管理语句如CREATE USER或GRANT不起作用。
我知道我可以将我的pgwire用户在QuestDB中设置为只读,但这意味着我不能从Web界面执行CREATE TABLE语句。
有没有关于如何为我的仪表板设置只读用户的建议?
英文:
I have a Grafana dashboard connected to QuestDB to visualise low-latency data from cryptocurrency.
I would like to set the user as read-only, but it seems QuestDB is postgresql compatible only for queries, and user management statements like CREATE USER or GRANT don't work.
I know I can set my pgwire user in QuestDB as read-only, but that means I cannot execute CREATE TABLE statements from the web interface.
Any suggestions to have a read-only user for my dashboards?
答案1
得分: 1
自 QuestDB 6.7 版本发布以来,可以通过配置启用第二用户以实现只读访问。
默认设置将此用户禁用,但您可以在 server.conf 中更改设置(或在启动 QuestDB 时通过 ENV 变量更改)。以下是相关的配置变量。
pg.readonly.user.enabled=true
# 默认用户名为"user"
pg.readonly.user=my_ro_user
# 默认密码为"quest"
pg.readonly.password=pwd
启用第二用户后,主用户(默认名为'Admin')仍然可用,可由 Web 控制台使用,因此您仍然可以从 Web 控制台运行 DDL 语句,但可以通过 Grafana 使用只读用户以提高安全性。
英文:
Since QuestDB release 6.7, a second user can be enabled via config for read-only access.
The default settings make this user disabled, but you can change the settings at server.conf (or via ENV variables when starting up QuestDB). These are the relevant config variables.
pg.readonly.user.enabled=true
# default username is "user"
pg.readonly.user=my_ro_user
# default password is "quest"
pg.readonly.password=pwd
Once you enable the second user, the main one (named by default 'Admin') will still be available and it is the one used by the web console, so you can still run your DDL statements from web console, but use the read-only user from Grafana for improved security.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论