Trino开启ldap认证

櫰木2年前技术文章1210

1、背景

由于对于安全监管的要求,需要对trino服务开启安全认证体系。

2、基于私有证书的https

keytool -genkeypair -validity 36500 -ext SAN=IP:172.16.104.226,DNS:hd1.dtstack.com -alias trino -keypass admin@123 -storepass admin@123 -keyalg RSA -dname CN=hd1.dtstack.com,OU=,O=,L=,ST=,C= -keystore trino.jks

keytool -export -rfc -keystore trino.jks --alias trino -file trino.pem

生成证书,复制到/opt/applications/trino/current/etc

3、修改配置文件


config.properties

vim config.properties 
#添加以下内容
vim config.properties
http-server.https.enabled=true
http-server.https.port=8443
http-server.https.keystore.path=/opt/trino/etc/trino.jks
http-server.https.keystore.key=admin@123
internal-communication.shared-secret=abc123
internal-communication.https.required=true

http-server.https.secure-random-algorithm=SHA1PRNG
http-server.authentication.allow-insecure-over-http=true
#ad
http-server.authentication.type=PASSWORD

password-authenticator.properties

password-authenticator.name=ldap
ldap.url=ldap://172.16.105.69:389
#多ou,使用:作为分隔符
ldap.user-base-dn=CN=Users,DC=fzcdh,DC=com:OU=owner1,DC=fzcdh,DC=com
ldap.user-bind-pattern=${USER}@fzcdh.com
ldap.allow-insecure=true

1.png


4、客户端验证

trino-cli --server https://hd1.dtstack.com:8443 --keystore-path /opt/trino/etc/trino.jks --keystore-password admin@123 --catalog hive   --user test --password

2.png

相关文章

Yarn界面详解

Yarn界面详解

1.Active Nodes:表示Yarn集群管理的节点的个数,其实就是NodeManager的个数,集群有2个NodeManager从配置中可以看到每一个NodeManager管理的内存大小是163...

Elasticsearch查询优化

1 使用更快的硬件查询性能大部分场景下更多的在于IO能力,很多时候查询速度受限于磁盘IO能力,使用SSD会比旋转类存储介质好得多。如果查询类型属于计算比较多的,则可以考虑使用更快的CPU。2 为文件系...

DG概念与机制

1. 相关概念1.1 什么是DG  DG全称Data Guard,官方给出的定义是“Oracle Data Guard ensures high availability, data protecti...

K3S部署和使用

K3S部署和使用

k3s介绍k3s是一个高可用的、经过CNCF认证的Kubernetes发行版,专为无人值守、资源受限、偏远地区或物联网设备内部的生产工作负载而设计。k3s安装参考文件使用配置文件安装k3s为了保证k3...

MySQL运维实战之ProxySQL(9.1)ProxySQL介绍

MySQL运维实战之ProxySQL(9.1)ProxySQL介绍

mysql通过复制技术实现了数据库高层面的可用,但是对于应用来说,当后端MySQL发生高可用切换时,应该怎么处理?我们考虑几种方案:1、使用域名绑定。应用通过dns连接后端实例,当后端发生切换后,将d...

MySQL keepalived配置(一)

一、MySQL数据初始化1.1、创建ha元数据结构:create database myha;  use myha;CREATE TABLE `ha_conf` ( `id` int(11) NOT...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。