网络安全框架协议(主要实现网络安全验证实现多租户用户的资源隔离)
以LDAP为数据存储后端,Kerberos为验证前端,Bind为主机识别,同时还提供统一的命令行管理工具和WEB管理界面的集成信息管理系统:特点 易于管理,安装和配置任务自动化

一:安装配置步骤

扩充密钥长度:说明(Kerberos需要使用256为的AES加密算法,而JRE默认中的密钥长度比较短,并且不足以支撑。所以我们需要升级集群中所有服务器节点JRE的安全策略,使其能够解除密钥长度的限制。修改的方式是下载并替换JRE中的Unlimited JCEPolicy文件)
#下载地址 https://www.globo.tech/learning-center/install-freeipa-centos-7/
#将下载解压后的“local_policy.jar”和“US_export_policy.jar”两个jar文件,将它们复制到每台服务器JDK路径下的“jre/lib/security”目录下 并分发到集群节点机器

sh /home/go2rsync.sh US_export_policy.jar
sh /home/go2rsync.sh local_policy.jar

二: 安装IPA-Server

安装FreeIPA服务器(卸载 ipa-server-install --uninstall)
在要安装的服务器上的/etc/hosts暂时先把该服务器的ip去掉
安装之前先安装所需的依赖包

yum -y install bind-dyndb-ldap ipa-server-dns sssd-client sssd-common sssd-common-pac sssd-ldap sssd-proxy python-sssdconfig authconfig authconfig-gtk

三:配置IPA-Server

ipa-server-install --setup-dns

具体细节如下#出现以下问题,参考如下(没列出来的inter回车即可)
[root@hadoop01 ~]# ipa-server-install --setup-dns

==============================================================================
This program will set up the IPA Server.

This includes:

  • Configure a stand-alone CA (dogtag) for certificate management
  • Configure the Network Time Daemon (ntpd)
  • Create and configure an instance of Directory Server
  • Create and configure a Kerberos Key Distribution Center (KDC)
  • Configure Apache (httpd)
  • Configure DNS (bind)
  • Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Enter the fully qualified domain name of the computer
on which you’re setting up server software. Using the form
.
Example: master.example.com.

Server host name [hadoop01]: hadoop01.gyb.bigdata.demo.com #指定名称,默认是当前的主机的FQDN

Warning: skipping DNS resolution of host hadoop01.gyb.bigdata.demo.com
The domain name has been determined based on the host name.

Please confirm the domain name [gyb.bigdata.demo.com]: gyb.bigdata.demo.com #指定域名,默认是将FQDN的主机名去掉后的字符串当作域名

The kerberos protocol requires a Realm name to be defined.
This is typically the domain name converted to uppercase.

Please provide a realm name [GYB.BIGDATA.DEMO.COM]: GYB.BIGDATA.DEMO.COM #指定realm,就是将域名的字母大写
Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the
instance of directory server created for IPA.
The password must be at least 8 characters long.

Directory Manager password: #这里需要设置LDAP的管理员密码,密码长度至少为8个字符串
Password (confirm): #上边的密码再输入一次

The IPA server requires an administrative user, named ‘admin’.
This user is a regular system account used for IPA server administration.

IPA admin password: #这里需要重复上述的密码,如果你两次输入的密码不一致,会持续让你重置密码的哟!

Password (confirm): #上边的密码再输入一次
Checking DNS domain gyb.bigdata.demo.com., please wait …
 Please provide the IP address to be used for this host name: 192.168.100.29 ##指定当前主机的IP地址即可(当前操作安装server服务器的ip)
 Enter an additional IP address, or press Enter to skip:
 Do you want to configure DNS forwarders? [yes]: yes
 Following DNS servers are configured in /etc/resolv.conf: 202.101.172.35
 Do you want to configure these servers as DNS forwarders? [yes]: yes #这里默认即可,默认为yes,咱们直接回车,下面很多选项都均可用默认回车,如果有需要修改的我会提示大家的
 All DNS servers from /etc/resolv.conf were added. You can enter additional addresses now: #直接inter键
 Enter an IP address for a DNS forwarder, or press Enter to skip:
 Checking DNS forwarders, please wait …
 Do you want to search for missing reverse zones? [yes]: yes
 Do you want to create reverse zone for IP 192.168.100.29 [yes]: yes
 Please specify the reverse zone name [100.168.192.in-addr.arpa.]:
 Using reverse zone(s) 100.168.192.in-addr.arpa.The IPA Master Server will be configured with:
 Hostname: hadoop01.gyb.bigdata.demo.com
 IP address(es): 192.168.100.29
 Domain name: gyb.bigdata.demo.com
 Realm name: GYB.BIGDATA.DEMO.COMBIND DNS server will be configured to serve IPA domain with:
 Forwarders: 202.101.172.35
 Forward policy: only
 Reverse zone(s): 100.168.192.in-addr.arpa.Continue to configure the system with these values? [no]: yes #输入yes继续配置系统
The following operations may take some minutes to complete.
 Please wait until the prompt is returned.Adding [192.168.100.29 hadoop01.gyb.bigdata.demo.com] to your /etc/hosts file
 Configuring NTP daemon (ntpd)
 [1/4]: stopping ntpd
 [2/4]: writing configuration
 [3/4]: configuring ntpd to start on boot
 [4/4]: starting ntpd
 Done configuring NTP daemon (ntpd).
 Configuring directory server (dirsrv). Estimated time: 30 seconds
 [1/45]: creating directory server instance
 [2/45]: enabling ldapi
 [3/45]: configure autobind for root
 [4/45]: stopping directory server
 [5/45]: updating configuration in dse.ldif
 [6/45]: starting directory server
 [7/45]: adding default schema
 [8/45]: enabling memberof plugin
 [9/45]: enabling winsync plugin
 [10/45]: configure password logging
 [11/45]: configuring replication version plugin
 [12/45]: enabling IPA enrollment plugin
 [13/45]: configuring uniqueness plugin
 [14/45]: configuring uuid plugin
 [15/45]: configuring modrdn plugin
 [16/45]: configuring DNS plugin
 [17/45]: enabling entryUSN plugin
 [18/45]: configuring lockout plugin
 [19/45]: configuring topology plugin
 [20/45]: creating indices
 [21/45]: enabling referential integrity plugin
 [22/45]: configuring certmap.conf
 [23/45]: configure new location for managed entries
 [24/45]: configure dirsrv ccache
 [25/45]: enabling SASL mapping fallback
 [26/45]: restarting directory server
 [27/45]: adding sasl mappings to the directory
 [28/45]: adding default layout
 [29/45]: adding delegation layout
 [30/45]: creating container for managed entries
 [31/45]: configuring user private groups
 [32/45]: configuring netgroups from hostgroups
 [33/45]: creating default Sudo bind user
 [34/45]: creating default Auto Member layout
 [35/45]: adding range check plugin
 [36/45]: creating default HBAC rule allow_all
 [37/45]: adding entries for topology management
 [38/45]: initializing group membership
 [39/45]: adding master entry
 [40/45]: initializing domain level
 [41/45]: configuring Posix uid/gid generation
 [42/45]: adding replication acis
 [43/45]: activating sidgen plugin
 [44/45]: activating extdom plugin
 [45/45]: configuring directory to start on boot
 Done configuring directory server (dirsrv).
 Configuring Kerberos KDC (krb5kdc)
 [1/10]: adding kerberos container to the directory
 [2/10]: configuring KDC
 [3/10]: initialize kerberos container
 [4/10]: adding default ACIs
 [5/10]: creating a keytab for the directory
 [6/10]: creating a keytab for the machine
 [7/10]: adding the password extension to the directory
 [8/10]: creating anonymous principal
 [9/10]: starting the KDC
 [10/10]: configuring KDC to start on boot
 Done configuring Kerberos KDC (krb5kdc).
 Configuring kadmin
 [1/2]: starting kadmin
 [2/2]: configuring kadmin to start on boot
 Done configuring kadmin.
 Configuring ipa-custodia
 [1/5]: Making sure custodia container exists
 [2/5]: Generating ipa-custodia config file
 [3/5]: Generating ipa-custodia keys
 [4/5]: starting ipa-custodia
 [5/5]: configuring ipa-custodia to start on boot
 Done configuring ipa-custodia.
 Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes
 [1/30]: configuring certificate server instance
 [2/30]: secure AJP connector
 [3/30]: reindex attributes
 [4/30]: exporting Dogtag certificate store pin
 [5/30]: stopping certificate server instance to update CS.cfg
 [6/30]: backing up CS.cfg
 [7/30]: disabling nonces
 [8/30]: set up CRL publishing
 [9/30]: enable PKIX certificate path discovery and validation
 [10/30]: starting certificate server instance
 [11/30]: configure certmonger for renewals
 [12/30]: requesting RA certificate from CA
 [13/30]: setting audit signing renewal to 2 years
 [14/30]: restarting certificate server
 [15/30]: publishing the CA certificate
 [16/30]: adding RA agent as a trusted user
 [17/30]: authorizing RA to modify profiles
 [18/30]: authorizing RA to manage lightweight CAs
 [19/30]: Ensure lightweight CAs container exists
 [20/30]: configure certificate renewals
 [21/30]: configure Server-Cert certificate renewal
 [22/30]: Configure HTTP to proxy connections
 [23/30]: restarting certificate server
 [24/30]: updating IPA configuration
 [25/30]: enabling CA instance
 [26/30]: migrating certificate profiles to LDAP
 [27/30]: importing IPA certificate profiles
 [28/30]: adding default CA ACL
 [29/30]: adding ‘ipa’ CA entry
 [30/30]: configuring certmonger renewal for lightweight CAs
 Done configuring certificate server (pki-tomcatd).
 Configuring directory server (dirsrv)
 [1/3]: configuring TLS for DS instance
 [2/3]: adding CA certificate entry
 [3/3]: restarting directory server
 Done configuring directory server (dirsrv).
 Configuring ipa-otpd
 [1/2]: starting ipa-otpd
 [2/2]: configuring ipa-otpd to start on boot
 Done configuring ipa-otpd.
 Configuring the web interface (httpd)
 [1/22]: stopping httpd
 [2/22]: setting mod_nss port to 443
 [3/22]: setting mod_nss cipher suite
 [4/22]: setting mod_nss protocol list to TLSv1.2
 [5/22]: setting mod_nss password file
 [6/22]: enabling mod_nss renegotiate
 [7/22]: disabling mod_nss OCSP
 [8/22]: adding URL rewriting rules
 [9/22]: configuring httpd
 [10/22]: setting up httpd keytab
 [11/22]: configuring Gssproxy
 [12/22]: setting up ssl
 [13/22]: configure certmonger for renewals
 [14/22]: importing CA certificates from LDAP
 [15/22]: publish CA cert
 [16/22]: clean up any existing httpd ccaches
 [17/22]: configuring SELinux for httpd
 [18/22]: create KDC proxy config
 [19/22]: enable KDC proxy
 [20/22]: starting httpd
 [21/22]: configuring httpd to start on boot
 [22/22]: enabling oddjobd
 Done configuring the web interface (httpd).
 Configuring Kerberos KDC (krb5kdc)
 [1/1]: installing X509 Certificate for PKINIT
 Done configuring Kerberos KDC (krb5kdc).
 Applying LDAP updates
 Upgrading IPA:. Estimated time: 1 minute 30 seconds
 [1/10]: stopping directory server
 [2/10]: saving configuration
 [3/10]: disabling listeners
 [4/10]: enabling DS global lock
 [5/10]: disabling Schema Compat
 [6/10]: starting directory server
 [7/10]: upgrading server
 [8/10]: stopping directory server
 [9/10]: restoring configuration
 [10/10]: starting directory server
 Done.
 Restarting the KDC
 Configuring DNS (named)
 [1/12]: generating rndc key file
 [2/12]: adding DNS container
 [3/12]: setting up our zone
 [4/12]: setting up reverse zone
 [5/12]: setting up our own record
 [6/12]: setting up records for other masters
 [7/12]: adding NS record to the zones
 [8/12]: setting up kerberos principal
 [9/12]: setting up named.conf
 [10/12]: setting up server configuration
 [11/12]: configuring named to start on boot
 [12/12]: changing resolv.conf to point to ourselves
 Done configuring DNS (named).
 Restarting the web server to pick up resolv.conf changes
 Configuring DNS key synchronization service (ipa-dnskeysyncd)
 [1/7]: checking status
 [2/7]: setting up bind-dyndb-ldap working directory
 [3/7]: setting up kerberos principal
 [4/7]: setting up SoftHSM
 [5/7]: adding DNSSEC containers
 [6/7]: creating replica keys
 [7/7]: configuring ipa-dnskeysyncd to start on boot
 Done configuring DNS key synchronization service (ipa-dnskeysyncd).
 Restarting ipa-dnskeysyncd
 Restarting named
 Updating DNS system records
 Configuring client side components
 Using existing certificate ‘/etc/ipa/ca.crt’.
 Client hostname: hadoop01.gyb.bigdata.demo.com
 Realm: GYB.BIGDATA.DEMO.COM
 DNS Domain: gyb.bigdata.demo.com
 IPA Server: hadoop01.gyb.bigdata.demo.com
 BaseDN: dc=gyb,dc=bigdata,dc=demo,dc=comSkipping synchronizing time with NTP server.
 New SSSD config will be created
 Configured sudoers in /etc/nsswitch.conf
 Configured /etc/sssd/sssd.conf
 trying https://hadoop01.gyb.bigdata.demo.com/ipa/json
 [try 1]: Forwarding ‘schema’ to json server ‘https://hadoop01.gyb.bigdata.demo.com/ipa/json’
 trying https://hadoop01.gyb.bigdata.demo.com/ipa/session/json
 [try 1]: Forwarding ‘ping’ to json server ‘https://hadoop01.gyb.bigdata.demo.com/ipa/session/json’
 [try 1]: Forwarding ‘ca_is_enabled’ to json server ‘https://hadoop01.gyb.bigdata.demo.com/ipa/session/json’
 Systemwide CA database updated.
 Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
 Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
 Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
 [try 1]: Forwarding ‘host_mod’ to json server ‘https://hadoop01.gyb.bigdata.demo.com/ipa/session/json’
 SSSD enabled
 Configured /etc/openldap/ldap.conf
 Configured /etc/ssh/ssh_config
 Configured /etc/ssh/sshd_config
 Configuring gyb.bigdata.demo.com as NIS domain.
 Client configuration complete.
 The ipa-client-install command was successful==============================================================================
 Setup completeNext steps:
 1. You must make sure these network ports are open:
 TCP Ports:
 * 80, 443: HTTP/HTTPS
 * 389, 636: LDAP/LDAPS
 * 88, 464: kerberos
 * 53: bind
 UDP Ports:
 * 88, 464: kerberos
 * 53: bind
 * 123: ntp
2. You can now obtain a kerberos ticket using the command: 'kinit admin'
   This ticket will allow you to use the IPA tools (e.g., ipa user-add)
   and the web user interface.

Be sure to back up the CA certificates stored in /root/cacert.p12
These files are required to create replicas. The password for these
files is the Directory Manager password
出现上图的Setup complete表示安装成功

四:页面登录

https://hadoop01.gyb.bigdata.demo.com/ipa/ui/ 说明:本地的
C:\Windows\System32\drivers\etc\hosts中要加上服务器的ip 域名映射
kerberos ldap的区别 kerberos和ldap_kerberos ldap的区别点击2次取消到登录界面kerberos ldap的区别 kerberos和ldap_大数据_02

用户名为:admin

密码为:第三步配置ipa-server时设置的密码

最终登录后的界面为

kerberos ldap的区别 kerberos和ldap_kerberos_03