Trino开启ldap认证

櫰木2年前技术文章1062

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

相关文章

nginx服务企业应用

1、软件的分类1.1 常用来提供静态服务的软件Apache :这是中小型Web服务的主流,Web服务器中的老大哥,Nginx :大型网站Web服务的主流,曾经Web服务器中的初生牛犊,现已长大。Ngi...

在K8S上使用Clickhouse

介绍clickhouse是一款开源的分析型数据库,性能强大。本文介绍如何在K8S环境中部署和使用clickhouse。我们使用开源的clickhouse operator: https://githu...

Prometheus+Consul服务自动发现监控

Prometheus+Consul服务自动发现监控

为什么使用consulprometheus作为新一代的监控利器,有很多优点,部署起来也十分方便。部署prometheus后自然会需要使用prometheus去监控物理机或者虚拟机的资源,这里就需要使用...

大数据集群二次开发及调优使用指导(三)-Hive

大数据集群二次开发及调优使用指导(三)-Hive

1.   业务调优:Hive业务的业务主要以批量处理作业为主,批处理主要特点是耗时时间长,消耗的资源比较多,主要的调优和设计推荐如下:1.   &nb...

HBase导出表和备份表操作

HBase导出表和备份表操作

HBase提供了几种导出数据的方式,包括使用HBase自带的工具和使用HBase的API。本文主要是讲的使用HBase自带的工具进行导出首先我们创建一个表 插入一些数据hbase shelllistc...

使用CoreDNS搭建DNS服务器

使用CoreDNS搭建DNS服务器

简介CoreDNS是一个DNS服务器/转发器,用Go编写,可以链接插件。每个插件执行一个 (DNS) 功能。CoreDNS是云原生计算基金会毕业的项目。CoreDNS是一个快速灵活的DNS服务器。这里...

发表评论    

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