gitlab 将管理员权限移交给ldap账户_CDPDC中Atlas集成FreeIPA的LDAP认证

文档编写目的 Cloudera从CM6.3版本开始,引入了Red Hat IdM来做整个集群的认证,Red Hat IdM对应的软件为FreeIPA,在本文中描述如何使用FreeIPA来做CDP-DC集群的认证。关于FreeIPA服务器搭建参考<使用FreeIPA对Linux用户权限统一管理>。之前的文章包括<使用FreeIPA为CDP DC7.1集群部署安全>,<CDP-DC中为CM集成FreeIPA提供的LDAP认证>,<在CDP-DC中Ranger集成FreeIPA的LDAP用户>,<CDP-DC中Hue集成FreeIPA的LDAP认证>,。 本篇文章主要介绍如何为 CDP-DC 平台上的 Atlas 集成 FreeIPA 提供的 LDAP 用户 。 内容概述1) 测试环境描述2) FreeIPA的LDAP介绍3) Atlas集成LDAP4) Atlas集成验证5) 总结 测试环境1) RedHat7.72) CM和Cloudera Runtime版本为7.1.13) FreeIPA版本为4.6.6 前置条件1) FreeIPA已安装且正常使用2) CDP-DC集群已搭建完毕且正常使用,已经启用FreeIPA提供的Kerberos认证. 测试环境描述 FreeIPA集群已安装完毕。 查看配置文件 从IPA 3.0开始,我们已经为/etc/openldap/ldap.conf配置了一些默认值:
[ec2-user@ip-10-0-0-170 ~]$ cat /etc/openldap/ldap.conf# File modified by ipa-client-install# We do not want to break your existing configuration, hence:#   URI, BASE, TLS_CACERT and SASL_MECH#   have been added if they were not set.#   In case any of them were set, a comment has been inserted and#   "# CONF_NAME modified by IPA" added to the line above.# To use IPA server with openLDAP tools, please comment out your# existing configuration for these options and uncomment the# corresponding lines generated by IPA.## LDAP Defaults## See ldap.conf(5) for details# This file should be world readable but not world writable.#BASE    dc=example,dc=com#URI    ldap://ldap.example.com ldap://ldap-master.example.com:666#SIZELIMIT    12#TIMELIMIT    15#DEREF        neverTLS_CACERTDIR    /etc/openldap/certs# Turning this off breaks GSSAPI used with krb5 when rdns = falseSASL_NOCANON    onURI ldaps://ip-10-0-0-170.ap-southeast-1.compute.internalBASE dc=ap-southeast-1,dc=compute,dc=internalTLS_CACERT /etc/ipa/ca.crtSASL_MECH GSSAPI[ec2-user@ip-10-0-0-170 ~]$
b6e89e4f9f088667c7f80810b2dffb63.png 设置这些默认值意味着您无需将太多选项传递给 ldapsearch 之类的工具。 搜索更加容易:
$ ldapsearch -x uid=admin
而不是:
$ ldapsearch -x -h ipa.example.com  -b dc=example,dc=com uid=admin
[ec2-user@ip-10-0-0-170 ~]$ ldapsearch -x uid=admin# extended LDIF## LDAPv3# base  (default) with scope subtree# filter: uid=admin# requesting: ALL## admin, users, compat, ap-southeast-1.compute.internaldn: uid=admin,cn=users,cn=compat,dc=ap-southeast-1,dc=compute,dc=internalobjectClass: posixAccountobjectClass: ipaOverrideTargetobjectClass: topgecos: Administratorcn: AdministratoruidNumber: 1376400000gidNumber: 1376400000loginShell: /bin/bashhomeDirectory: /home/adminipaAnchorUUID:: OklQQTphcC1zb3V0aGVhc3QtMS5jb21wdXRlLmludGVybmFsOmJmYTI4NGI4LWE5MzktMTFlYS1iZmEzLTA2YTdiNzk2MzQwYQ==uid: admin# admin, users, accounts, ap-southeast-1.compute.internaldn: uid=admin,cn=users,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internalobjectClass: topobjectClass: personobjectClass: posixaccountobjectClass: krbprincipalauxobjectClass: krbticketpolicyauxobjectClass: inetuserobjectClass: ipaobjectobjectClass: ipasshuserobjectClass: ipaSshGroupOfPubKeysuid: admincn: Administratorsn: AdministratoruidNumber: 1376400000gidNumber: 1376400000homeDirectory: /home/adminloginShell: /bin/bashgecos: Administrator# search resultsearch: 2result: 0 Success# numResponses: 3# numEntries: 2[ec2-user@ip-10-0-0-170 ~]$
3a45ec52701b5fbbd54ac4af7306cc7e.png Atlas与LDAP集成 使用管理员用户登录 Cloudera Manager ,进入“ 群集 ” -> Atlas -> “ 配置 ”界面 ac6c9e5ff65dc99b08eb2a44525feb58.png 2.通过配置下方的搜索器搜索LDAP,可以看到涉及到Atlas Server部分 d1b49d3e588348491b6772b85f9ca32f.png 3. 配置外部身份验证,具体配置参数如下:
参数名描述
Atlas.ldap.urlldaps://ip-10-0-0-170.ap-southeast-1.compute.internal:636配置FreeIPA的LDAP URL
Atlas.ldap.bind.dnuid=admin,cn=users,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internal配置用于搜索LDAP的管理员账号
Atlas.ldap.bind.passwordcloudera管理员账号的密码
Atlas.ldap.user.dnpatternuid={0},cn=users,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internal
Atlas.ldap.user.searchfilteruid={0}LDAP用户搜索过滤器。仅在身份验证方法为LDAP时使用。
Atlas.ldap.group.searchbasecn= groups,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internal
Atlas.ldap.group.searchfiltermember={0}
Atlas.ldap.group.roleattributecn
Atlas.ldap.base.dncn=accounts,dc=ap-southeast-1,dc=compute,dc=internal
Atlas.ldap.referralfollow 如果将多个LDAP服务器配置为返回结果的连续引用,则设置为遵循。如果不应该引用,则设置为忽略(默认)。当将此参数设置为throw时,在抛出ReferralException之前,所有常规条目都首先在枚举中返回。
Atlas.usersync.source.impl.classorg.apache.Atlas.ldapusersync.process.LdapUserGroupBuilder分别对应Unix用户同步,文件系统同步,和LDAP用户同步。这些选择LDAP
Atlas.usersync.ldap.urlldaps://ip-10-0-0-170.ap-southeast-1.compute.internal:636
Atlas.usersync.ldap.binddnuid=admin,cn=users,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internal
Atlas.usersync.ldap.ldapbindpasswordcloudera
Atlas.usersync.ldap.deltasyncAtlas Usersync Default Group复选
Atlas.usersync.ldap.searchBasecn=accounts,dc=ap-southeast-1,dc=compute,dc=internal
Atlas.usersync.ldap.user.searchbasecn=users,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internal
Atlas.usersync.ldap.user.searchscopesub用户的搜索范围。值“ base”表示仅应考虑在Atlas.usersync.ldap.user.searchbase中指定为搜索基础的条目。“one”表示仅应考虑在Atlas.usersync.ldap.user.searchbase中指定为搜索基础的条目的直接子级。“ Sub”表示应该考虑在Atlas.usersync.ldap.user.searchbase中指定为搜索基础的条目及其所有子级的任何深度。
Atlas.usersync.ldap.user.searchfilter(|(memberOf=cn=ipausers,cn= groups,cn=accounts,dc=ap-southeast-1,dc=compute,dc=internal))
Atlas.usersync.ldap.user.nameattributeuid
Atlas.usersync.ldap.user.nameattributeignore
Atlas.usersync.group.usermapsyncenabledAtlas Usersync Default Group复选
Atlas.usersync.user.searchenabledAtlas Usersync Default Group复选
Atlas.usersync.group.searchenabledAtlas Usersync Default Group复选
Atlas.authentication.methodLDAP登录到Atlas Admin的身份验证方法。
c70ac2ab74c1a6107274de54246f2d5f.png 43e9901b412861a6bd0c9e9cec7f391d.png 4. 完成上述配置后, 保存更改,重启 Atlas 服务应用配置 fc714af8cfa03146d8a6258a09109379.png 以上完成 Atlas 与 FreeIPA 的 LDAP 的集成。 Atlas用户同步 通过Cloudera Manager-> 群集 -> Atlas->Atlas Web UI,点击Atlas Web UI,跳转到对应的页面。 44cf858ae4c92e664999b9fc197e7aba.png使用系统配置的admin用户和使用FreeIPA中的admin用户都可以登录到atlas,结果相同。 d30e52258cf58cba8d766179a53a089c.png使用FreeIPA中的其他ldap用户superuser登录atlas,正常登陆。 caf5eb07e6d10def14d9ea96b01a4dd3.png 总结 提供CM将Atlas集成FreeIPA的LDAP,这个整个管控管理系统可以使用一套用户管理体系,减少了用户同步的维护操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值