Presto 开启用户认证

  • 切换到 Presto 配置文件目录

    1. cd /usr/local/presto-server/etc
  • 配置密码验证器,在协调器节点上创建password-authenticator.properties

    1. password-authenticator.name=file
    2. file.password-file=password.db

以下配置属性可用:

file.password-file 密码文件的路径。
file.refresh-period 多久重新加载一次密码文件。 默认为 5 秒。
file.auth-token-cache.max-size 缓存的已验证密码的最大数量。 默认为 1000。
  • 创建密码文件

    1. touch password.db
  • 添加或更新用户 test 的密码

    1. htpasswd -B -C 10 password.db test

参考文档

Metabase 添加 Presto 数据库

  • 管理员-> 数据库-> 添加数据库

image.pngimage.png

  • 配置 Presto

image.png

注意⚠️:

  • 数据库类型选择 Presto
  • Catalog 必填
  • 由于 Presto 没有设置 SSL 认证,只需填写用户名,不需要填写密码(实测也可以填写密码),并且 Metabase 侧也不勾选使用 SSL

参考文档