零售KDC管理的域为TESTA.COM 华为集群管理的域为hadoop.com

(目前测试了hdfs cli,下午在UAT集群测试下distcp)

一、            零售KDC升级支持AES加密算法

1、         修改/usr/local/var/krb5kdc/kdc.conf文件中的realms部分

master_key_type = des3-cbc-sha1

supported_enctypes = des3-cbc-sha1:normal arcfour-hmac-md5:normal camellia256-cts-cmac:normal camellia128-cts-cmac:normal des-cbc-crc:normal des-cbc-md5:normal des-cbc-md4:normal

=》

#master_key_type = des3-cbc-sha1

supported_enctypes = aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha1-96:normal des3-cbc-sha1:normal arcfour-hmac-md5:normal camellia256-cts-cmac:normal camellia128-cts-cmac:normal des-cbc-crc:normal des-cbc-md5:normal des-cbc-md4:normal

2、修改/etc/krb5.conf文件

(1)           修改libdefaults部分

permitted_enctypes = des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4

default_tgs_enctypes = des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4

default_tkt_enctypes = des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4

=》

permitted_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4

default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4

default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4

3、         重启kdckrb和kadmind服务

ps aux |grep krb5kdc|awk '{print $2}' |xargs kill -9

ps aux |grep kadmind|awk '{print $2}' |xargs kill -9

/usr/local/sbin/kadmind

/usr/local/sbin/krb5kdc

4、         删除hadoop/admin@TESTA.COM和krbtgt/TESTA.COM@TESTA.COM

kadmin.local -q "delprinc hadoop/admin@TESTA.COM"

kadmin.local -q "delprinc krbtgt/TESTA.COM@TESTA.COM"

5、         重新添加hadoop/admin@TESTA.COM和krbtgt/TESTA.COM@TESTA.COM

kadmin.local -q "addprinc hadoop/admin@TESTA.COM"

kadmin.local -q "addprinc krbtgt/TESTA.COM@TESTA.COM"

测试:创建任意账户,Kinit是否正常,并且查看支持的算法

二、零售集群配置互信

1、修改/etc/krb5.conf文件

(1)           在realms部分中添加对hadoop.com的识别

HADOOP.COM = {

kdc = 29.2.244.66:21732

admin_server = 29.2.244.66:21730

}

(2)在domain_realm部分中添加对hadoop.com的识别

.hadoop.com = HADOOP.COM

hadoop.com = HADOOP.COM

(3)添加capaths

[capaths]

TESTA.COM = {

HADOOP.COM = .

}

2、创建krbtgt账户

kadmin.local -q 'addprinc +requires_preauth -e "aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha1-96:normal" krbtgt/TESTA.COM@HADOOP.COM'

kadmin.local -q 'addprinc +requires_preauth -e "aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha1-96:normal" krbtgt/HADOOP.COM@TESTA.COM'

注:华为集群端需要运行一模一样的命令,并且密码也需要一致

3、增加core-site.xml中的配置

<property>

<name>hadoop.rpc.protection</name>

<value>privacy,authentication</value>

</property>

4、由于访问华为集群的账户是使用aes算法,需要更新jdk8的jce_policy

(1)

官网下载jce_policy-8.zip

(2)

将压缩包里的local_policy.jar和US_export_policy.jar复制到$JAVA_HOME/jre/lib/security/下

三、华为集群配置互信,需要武工进行配合

四、测试

1、创建测试账户

kadmin.local -q "addprinc +requires_preauth -randkey huawei"

kadmin.local -q "xst -norandkey -k /tmp/huawei.keytab huawei"

kinit -kt /tmp/huawei.keytab Huawei

2、测试

KDC添加加密的更多相关文章

  1. net-snmp源码VS2013编译添加加密支持(OpenSSL)

    net-snmp源码VS2013编译添加加密支持(OpenSSL) snmp v3 协议使用了基于用户的安全模型,具有认证和加密两个模块. 认证使用的算法是一般的消息摘要算法,例如MD5/SHA等.这 ...

  2. net-snmp源码VS2013编译添加加密支持(OpenSSL)(在VS里配置编译OpenSSL)

    net-snmp源码VS2013编译添加加密支持(OpenSSL) snmp v3 协议使用了基于用户的安全模型,具有认证和加密两个模块. 认证使用的算法是一般的消息摘要算法,例如MD5/SHA等.这 ...

  3. 对 sql server 数据库的备份进行加密

    原文:对 sql server 数据库的备份进行加密 嗯,最近在研究数据库备份相关的东西,考虑到应该为数据库备份加个密,就准备从网上搜索一下看看有什么好办法,没想到还挺乱... 首先,我从网上搜到的, ...

  4. (4.22)Microsoft 管理控制台启用 SSL 加密的 SQL Server 实例

    如何通过使用 Microsoft 管理控制台启用 SSL 加密的 SQL Server 实例 关键词:MSSQL加密,sql server加密,sql server客户端与服务器传输内容加密 转自:h ...

  5. TMG 2010 为HTTPS协议添加非标准端口(443)

    1.添加加密端口时,编辑脚本addsslports.vbs  addsslports.vbs 脚本内容如下: Dim root Dim tpRanges Dim newRange Set root = ...

  6. Spring Cloud配置中心内容加密

    从配置获取的配置默认是明文的,有些像数据源这样的配置需要加密的话,需要对配置中心进行加密处理. 下面使用对称性加密来加密配置,需要配置一个密钥,当然也可以使用RSA非对称性加密,但对称加密比较方便也够 ...

  7. sqlite3加密

    最近因为工作原因,需要使用sqlite数据库.sqlite数据库小并且使用方便,感觉挺不错的.但有一个不足就是没有对数据库进行加密,不过好的是sqlite预留有加密的接口,我们可以直接调用即可.我也是 ...

  8. keyring源码加密解密函数分析

    Encrypt the page data contents. Page type can't be FIL_PAGE_ENCRYPTED, FIL_PAGE_COMPRESSED_AND_ENCRY ...

  9. Sharding-JDBC使用jasypt3.0及以上版本加密数据库连接密码

    本文中介绍的是基于Sharding-JDBC 4.0和jasypt 3.0及其以上版本对数据库连接密码进行加密操作 引入依赖 项目的pom.xml中引入maven依赖 <dependency&g ...

随机推荐

  1. POJ 1789 Prim

    给定N个字符串,某个字符串转为另一个字符串的花费为他们每一位不相同的字符数. 求最小花费Q. Input 多组输入,以0结束. 保证N不超过2000. Output 每组输出"The hig ...

  2. C# DataTable根据字段排序

    DataTable dt = new DataTable(); dt.Columns.Add("Name"); dt.Columns.Add("Age");// ...

  3. linux 安装redis 完整步骤

    最近在linux服务器上需要安装redis,来存放数据,增加用户访问数据的速度,由于是第一次安装,于是在百度上搜了一篇文章,按照这篇博客,顺利安装好了,因此将博主的文章拷过来记录一下,方便以后使用,也 ...

  4. C++遍历文件夹

    struct _finddata_t { unsigned attrib; //文件属性 time_t time_create; //文件创建时间 time_t time_access; //文件上一 ...

  5. http GET 和 POST 请求的优缺点和误区

    (1)post更安全(不会作为url的一部分,不会被缓存.保存在服务器日志.以及浏览器浏览记录中) (2)post发送的数据更大(get有url长度限制) (3)post能发送更多的数据类型(get只 ...

  6. SparkSQL读取HBase数据

    这里的SparkSQL是指整合了Hive的spark-sql cli(关于SparkSQL和Hive的整合,见文章后面的参考阅读). 本质上就是通过Hive访问HBase表,具体就是通过hive-hb ...

  7. LeetCode:180.连续出现的数字

    题目链接:https://leetcode-cn.com/problems/consecutive-numbers/ 题目 编写一个 SQL 查询,查找所有至少连续出现三次的数字. +----+--- ...

  8. C#/.net中出现 "GDI+中发生一般性错误"解决方案

    有时我们在读取本地图片,调用 Image.Save() 方法,将其另保存为其他格式时,经常会碰到一个错误:“GDI+中发生一般性错误”:一般出现这种错误有 3 种可能: 1.保存路径不存在或者错误: ...

  9. case when语法

    Case具有两种格式.简单Case函数和Case搜索函数. --简单Case函数: CASE sex WHEN '1' THEN '男' WHEN '2' THEN '女' ELSE '其他' END ...

  10. 6.B+Tree 检索原理

    B+树的创建(索引的创建) 1.比如为phoneNum创建了一个索引,phoneNum这列保存了很多的手机号码 2.索引创建的过程中,会为这些数据进行适当的编码(根据这个数据所在的物理地址),如 36 ...