作者:楼高
在企业级大数据安全方案中,本节主要介绍服务安全题目,引入kerberos认证机制,现在直接对接kerberos使用较多,这里我们使用FreeIPA来集成kerberos
FreeIPA官网下载地址:https://www.freeipa.org/page/Downloads
Hadoop服务的安全题目由来已久,因此在筹划之初并未考虑安全题目。这导致用户在提交任务的时间可以随意伪造身份,或是恶意程序伪装成服务进程对集群造成破坏。随着时间的推移,行业内的安全意识越来越高,Hadoop生态顺应潮水也逐渐补充完善了自己的安全模型。
我们的筹划思路是引入Kerberos认证机制,通过集成Kerberos协议,就可以或许使用Kerberos用户代替服务器本地的Linux用户,从而让大数据平台中的Hadoop相关服务全部使用Kerberos用户通过它的认证中央举行认证,以大幅进步平台的安全性。
1.FreeIPA介绍
Kerberos协议只是一种协议尺度的框架,而MIT
Kerberos则是实现了该协议的认证服务,是Kerberos的物理载体。将它与Hadoop服务举行集成便可以或许很好地解决安全性不足的题目。除了需要安装MIT
Kerberos之外,我们还需要安装LDAP。在生产情况中Knox使用附带的LDAP服务显然是不合适的,因此需要一种更为正式的安装方式。
Kerberos和LDAP服务这类基础设施服务虽好,但是手动安装起来非常繁琐,接下来用一种全新的方法,通过使用FreeAPI来安装上述的基础设施组件。
FreeIPA是一个集成的安全信息管明白决方案。它整合了Kerberos、LDAP、NTP、Bind、Apache、Tomcat等核心软件包,从而形成了一个以LDAP为数据存储后端,Kerberos为验证前端,Bind为主机辨认,同时还提供同一的下令行管理工具和WEB管理界面的集成信息管理系统。FreeIPA建立在闻名的开源组件和尺度协议之上,具有易于管理、安装和设置任务主动化的特点
2.安装分析
FreeIPA服务分为IPA-Server和IPA-Client两个部门,需要单独准备一台服务器安装IPA-
Server,这台服务器不能属于任何由Ambari管理的集群节点,这是因为在安装IPA-
Server的过程中,安装程序会将其所在的服务器地址注册到DNS服务中,而Ambari的集群节点也会举行雷同的注册动作。如果一台服务器同时安装了IPA-
Server并注册成为Ambari节点,就会造成名称的冲突,导致在注册DNS的过程中失败。IPA-Client和IPA-
Server恰恰相反,Ambari管理的所有集群节点服务器上都必须安装。
3.安装IPA-Server
FreeIPA下载地址:https://www.freeipa.org/page/Downloads
操作系统里面已经集成了FreeIPA安装包,可通过yum安装
3.1扩充密钥长度
Kerberos需要使用256位的AES加密算法,而JRE中默认的密码长度比力短,并不足以支撑。以是我们需要升级集群中所有服务器JRE安全策略,使其可以或许接触密钥长度的限定。修改的方式是下载并替换JRE中的Unlimited
JCEPolicy文件。下载Cryptography Extension (JCE) Unlimited Strength Jurisdiction
Policy File,解压下载后的zip包,将得到的jar包放到所有服务器上的$JAVA_HOME/jre/lib/security/目次下
下载地址如下:
https://www.oracle.com/java/technologies/javase-jce8-downloads.html

3.2修改服务器主机名
服务器的主机名需要与FreeIPA的完全限定域名(FQDN)匹配才气正常工作
- #命令行执行以下命令
- hostnamectl set-hostname jz004.hdp.hadoop
- #配置/etc/hosts,添加以下配置
- 172.26.232.150 ipa.hdp.hadoop
复制代码 3.3设置随机数天生器
- yum -y install rng-tools
- #启动服务
- systemctl start rngd
- #配置开机自启
- systemctl enable rngd
- #查看状态
- systemctl status rngd
- #升级the NSS libraries.
- yum install -y yum update nss
- * -y
复制代码 3.4安装ipa-server软件包
密钥扩充完毕之后就可以开始安装IPA-Server了,IPA-Server的整个安装过程中分为三个部门,分别是安装IPA系统工具、安装IPA-
Server和设置IPA-Server
运行yum install下令安装IPA系统工具
- yum install -y ntp ipa-server ipa-server-dns bind-dyndb-ldap
复制代码 3.5设置ipa-server
IPA系统工具安装完之后就可以或许实行ipa-server相关的shell下令了,通过实行ipa-server-install --allow-zone-
overlap下令安装IPA服务
除了身份验证,FreeIPA还可以或许管理主机的DNS记录。这可以使设置和管理主机更容易。

接下来,需要输入服务器的主机名、域名和Kerberos域名。Kerberos是一种身份验证协议,FreeIPA利用这些协议来验证主机的身份。剧烈建议使用域名作为Kerberos域。使用不同的命名方案将导致FreeIPA的Active
Directory集成出现题目,并大概导致其他题目。
警告:不要将根域(example.com)用作IPA域名。这大概会导致DNS题目

- Server host name [ipa.example.org]: ipa.example.org
- Please confirm the domain name [example.org]: ipa.example.org
- Please provide a realm name [EXAMPLE.ORG]: IPA.EXAMPLE.ORG
- The log file for this installation can be found in/var/log/ipaserver-install.log
- ==============================================================================
- 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)
- * Createand configure an instance of Directory Server
- * Createand configure a Kerberos Key Distribution Center (KDC)
- *Configure Apache (httpd)
- *Configure the KDC to enable PKINIT
- To accept the default shown in brackets, press theEnter key.
- WARNING: conflicting time&date synchronizationservice 'chronyd' will be disabled
- in favor of ntpd
- Do you want to configureintegrated DNS (BIND)? [no]: yes
- Enter the fully qualified domain name of thecomputer
- on which you’re setting up server software. Usingthe form
- <hostname>.<domainname>
- Example: master.example.com.
- Server host name[wang-1.tmp.gce.cloudera.com]:回车
- Warning: skipping DNS resolution of hostwang-1.tmp.gce.cloudera.com
- The domain name has been determined based on thehost name.
- Please confirm the domainname [tmp.gce.cloudera.com]:回车
- The kerberos protocol requires a Realm name to bedefined.
- This is typically the domain name converted touppercase.
- Please provide a realm name[TMP.GCE.CLOUDERA.COM]:自己定义一个域名,否则默认使用括号中的域名
- Certain directory server operations require anadministrative user.
- This user is referred to as the Directory Managerand has full access
- to the Directory for system management tasks andwill be added to the
- instance of directory server created for IPA.
- The password must be at least 8 characters long.
- Directory Manager password:自己配置密码
- Password (confirm):再输一遍
- The IPA server requires an administrative user,named 'admin'.
- This user is a regular system account used for IPAserver administration.
- IPA admin password:自己配置密码
- Password (confirm):再输一遍
- Checking DNS domain tmp.gce.cloudera.com., pleasewait ...
- Do you want to configure DNSforwarders? [yes]:yes
- Following DNS servers are configured in/etc/resolv.conf: 127.0.0.1, 8.8.8.8
- Do you want to configurethese servers as DNS forwarders? [yes]:yes
- All DNS servers from /etc/resolv.conf were added.You can enter additional addresses now:
- Enter an IP address for a DNSforwarder, or press Enter to skip:
- Checking DNS forwarders, please wait ...
- Do you want to search formissing reverse zones? [yes]:yes
- Do you want to create reversezone for IP 172.31.115.124 [yes]:yes
- Please specify the reversezone name [115.31.172.in-addr.arpa.]:(直接回车)
- Using reverse zone(s) 115.31.172.in-addr.arpa.
- The IPA Master Server will be configured with:
- Hostname: wang-1.tmp.gce.cloudera.com
- IP address(es): 172.31.115.124
- Domain name: tmp.gce.cloudera.com
- Realm name: TMP.GCE.CLOUDERA.COM
- BIND DNS server will be configured to serve IPAdomain with:
- Forwarders: 127.0.0.1, 8.8.8.8
- Forward policy: only
- Reverse zone(s): 115.31.172.in-addr.arpa.
- Continue to configure thesystem with these values? [no]: yes
复制代码 接下来,为LDAP管理器创建密码。这是FreeIPA功能所必需的LDAP。然后是IPA管理员密码,将在以管理员用户身份登录FreeIPA时使用。剧烈建议使用安全随机天生的密码,因为整个系统的安全性取决于它们。
确认设置。在此之后,安装程序将运行。
- Continue to configure the system with these values?[no]: yes
复制代码 3.6 题目记录
(1)如果安装过程报错:
- ipa-server-install command failed, exception: RuntimeError: CA did not start in 300.0s
复制代码 实行下令更新nss,update nss packages
3.7 WEB UI访问
设置完成后访问https://ipa.cdh.hadoop/

密码即为刚才在交互式安装设置的密码

3.8实行安装下令
实行下令 ipa-client-install,安装步调和ipa-server类似
3.9安装完成后检察页面,新增节点已在页面显示

更多技术信息请检察云掣官网https://yunche.pro/?t=yrgw
接下来我将给各位同砚划分一张学习筹划表!
学习筹划
那么题目又来了,作为萌新小白,我应该先学什么,再学什么?
既然你都问的这么直白了,我就告诉你,零基础应该从什么开始学起:
阶段一:低级网络安全工程师
接下来我将给大家安排一个为期1个月的网络安全低级筹划,当你学完后,你基本可以从事一份网络安全相关的工作,比如渗透测试、Web渗透、安全服务、安全分析等岗位;此中,如果你等保模块学的好,还可以从事等保工程师。
综合薪资区间6k~15k
1、网络安全理论知识(2天)
①了解行业相关背景,前景,确定发展方向。
②学习网络安全相关法律法规。
③网络安全运营的概念。
④等保简介、等保规定、流程和规范。(非常告急)
2、渗透测试基础(1周)
①渗透测试的流程、分类、尺度
②信息收集技术:主动/被动信息搜集、Nmap工具、Google Hacking
③漏洞扫描、漏洞利用、原理,利用方法、工具(MSF)、绕过IDS和反病毒侦察
④主机攻防演练:MS17-010、MS08-067、MS10-046、MS12-20等
3、操作系统基础(1周)
①Windows系统常见功能和下令
②Kali Linux系统常见功能和下令
③操作系统安全(系统入侵排查/系统加固基础)
4、盘算机网络基础(1周)
①盘算机网络基础、协议和架构
②网络通信原理、OSI模型、数据转发流程
③常见协议剖析(HTTP、TCP/IP、ARP等)
④网络攻击技术与网络安全防御技术
⑤Web漏洞原理与防御:主动/被动攻击、DDOS攻击、CVE漏洞复现
5、数据库基础操作(2天)
①数据库基础
②SQL语言基础
③数据库安全加固
6、Web渗透(1周)
①HTML、CSS和JavaScript简介
②OWASP Top10
③Web漏洞扫描工具
④Web渗透工具:Nmap、BurpSuite、SQLMap、其他(菜刀、漏扫等)
那么,到此为止,已经耗时1个月左右。你已经成功成为了一名“脚本小子”。那么你还想接着往下探索吗?
阶段二:中级or高级网络安全工程师(看自己能力)
综合薪资区间15k~30k
7、脚本编程学习(4周)
在网络安全领域。是否具备编程能力是“脚本小子”和真正网络安全工程师的本质区别。在实际的渗透测试过程中,面对复杂多变的网络情况,当常用工具不能满足实际需求的时间,往往需要对现有工具举行扩展,大概编写符合我们要求的工具、主动化脚本,这个时间就需要具备肯定的编程能力。在分秒必争的CTF比赛中,想要高效地使用自制的脚本工具来实现各种目的,更是需要拥有编程能力。
零基础入门的同砚,我建议选择脚本语言Python/PHP/Go/Java中的一种,对常用库举行编程学习
搭建开辟情况和选择IDE,PHP情况保举Wamp和XAMPP,IDE剧烈保举Sublime;
Python编程学习,学习内容包罗:语法、正则、文件、 网络、多线程等常用库,保举《Python核心编程》,没须要看完
用Python编写漏洞的exp,然后写一个简单的网络爬虫
PHP基本语法学习并书写一个简单的博客系统
认识MVC架构,并试着学习一个PHP框架大概Python框架 (可选)
了解Bootstrap的结构大概CSS。
阶段三:顶级网络安全工程师
如果你对网络安全入门感兴趣,那么你需要的话可以点击这里 |