Trino开启ldap认证

櫰木2年前技术文章1198

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

相关文章

Redis 慢查询相关配置

Redis 慢查询相关配置

一、查询生命周期一条查询的生命周期:发送命令命令排队执行命令返回结果Redis 慢日志只统计 “执行命令” 步骤 3 的耗时,所以没有慢查询并不代表客户端没有超时问题。二、慢日志配置参数慢日志相关的参...

Python functools 模块

1、reduce 方法reduce 方法,顾名思义就是减少,map reduce 应用:大数据语法: reduce(function, sequence[, initial]) -> value...

数据库性能大揭秘:玩转MySQL监控指标状态变量

前言在本文中,我们将深入探讨MySQL数据库的性能监控世界。通过了解并应用一系列常用的监控指标,我们能够更精准地把握数据库的运行状况。这些指标,通常以状态变量(status variables)的形式...

Python 实现 Prometheus 自定义指标暴露

Python 实现 Prometheus 自定义指标暴露

虽然 Prometheus 已经拥有可直接使用的 exporter 可供使用,以满足收集不同的监控指标的需要。然而,如果我们需要收集一些自定义指标项,还是需要我们编写程序去暴露相关接口(/metric...

Redis 命令行 redis-cli 介绍

前言redis-cli 是 Redis 自带的命令行工具,是运维和开发人员常用的工具,本篇文章将介绍它的使用技巧和一些有趣的功能。1. 连接 Redis 服务redis-cli 默认连接的是 127....

rancher上kube-prometheus部署报错处理

rancher上kube-prometheus部署报错处理

问题描述rancher 上安装kube-prometheus,版本:8.3.9  ,Chart 仓库:bitnami 服务 pod: prometheus-kube-prometheus-promet...

发表评论    

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