EMR-LDAP配置
阅读原文时间:2023年07月13日阅读:1

usersync是负责在配置policy的时候可选用户有ldap里的用户,admin是负责登录webui的

https://cwiki.apache.org/confluence/display/RANGER/Configure+Ranger+UserSync+for+LDAP

配置:

SYNC_LDAP_URL = ldap://master-ldap.opayride.com:389

SYNC_LDAP_BIND_DN = cn=admin,dc=opayride,dc=com

SYNC_LDAP_BIND_PASSWORD =

SYNC_LDAP_SEARCH_BASE = cn=Users,dc=opayride,dc=com

LDAP对接ranger admin:

cd /usr/lib/ranger-admin-current
vim install.properties
修改authentication_method=LDAP,其中几处关键配置如下:

xa_ldap_url=ldap://master-ldap.opayride.com:389
xa_ldap_userDNpattern=uid={0},cn=Users,dc=opayride,dc=com
xa_ldap_base_dn=cn=Users,dc=opayride,dc=com
xa_ldap_bind_dn=cn=admin,dc=opayride,dc=com
xa_ldap_bind_password=[password]

需要在/usr/lib/ranger-admin-current 路径下执setup.sh ,完成后进到EMR控制台Ranger组件服务当中,重启Ranger Admin使得配置效。

有问题查:

1/ 看运行sh setup.sh的日志

2/ /etc/ecm/ranger-admin-conf/ranger-admin-site.xml看这里面有没有写入ldap的信息

LDAP对接HUE:

desktop.ldap.ldap_url ldap://master-ldap.opayride.com:389
desktop.ldap.bind_dn cn=admin,dc=opayride,dc=com
desktop.ldap.bind_password 
desktop.ldap.ldap_username_pattern cn=,cn=Users,dc=opayride,dc=com
desktop.ldap.base_dn cn=Users,dc=opayride,dc=com
desktop.ldap.search_bind_authentication false
desktop.ldap.use_start_tls false
desktop.ldap.create_users_on_login true

修改如下配置项:
backend desktop.auth.backend.LdapBackend
原值: desktop.auth.backend.AllowFirstUserDjangoBackend

确定后,查看操作历史,等待配置完成,完成之后在控制台重启Hue
之后进⼊Hue登录界⾯进⾏登录,需要注意的是,对接LDAP之后,原有的管理员账号admin已经不能登
录,新的管理员户为对接LDAP之后第一个登录的帐户