點(diǎn)擊上方“IT那活兒”公眾號(hào),關(guān)注后了解更多內(nèi)容,不管IT什么活兒,干就完了!!!
我們平常會(huì)基于大數(shù)據(jù)組件來(lái)實(shí)現(xiàn)客戶業(yè)務(wù)場(chǎng)景,而所使用大數(shù)據(jù)組件時(shí)(hadoop/flink/kafka等),會(huì)被安全廠商掃描出安全訪問(wèn)漏洞,業(yè)界推薦用kerberos來(lái)解決此類安全訪問(wèn)問(wèn)題。
Kerberos是一種網(wǎng)絡(luò)認(rèn)證協(xié)議,在互不信任的網(wǎng)絡(luò)中,Kerberos提供了一種可靠的中心化認(rèn)證協(xié)議,以便網(wǎng)絡(luò)中的各個(gè)機(jī)器之間能夠相互訪問(wèn)。
服務(wù)端 | 192.168.199.102 | bigdata-03 | krb5-server krb5-workstation krb5-libs krb5-devel |
客戶端 | 192.168.199.104 | bigdata-05 | krb5-workstation krb5-devel |
服務(wù)端與客戶端主機(jī)網(wǎng)絡(luò)互通,并且配置對(duì)應(yīng)相互hostname映射關(guān)系。
rpm -qa|grep krb 查看當(dāng)前服務(wù)器安裝的包,安裝如下對(duì)應(yīng)的的安裝包:
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
HADOOP.COM = {
#master_key_type = aes256-cts
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
}
# Configuration snippets may be placed in this directory as well
includedir /etc/krb5.conf.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
dns_lookup_realm = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
default_realm = HADOOP.COM #默認(rèn)領(lǐng)域,跟kdc.conf里面realms保持一致
#default_ccache_name = KEYRING:persistent:%{uid}
[realms]
HADOOP.COM = {
kdc = bigdata-03 #主節(jié)點(diǎn)hostname
admin_server = bigdata-03 #主節(jié)點(diǎn)hostname
}
[domain_realm]
.hadoop.com = HADOOP.COM #DNS域名,跟kdc.conf里面realms保持一致
hadoop.com = HADOOP.COM #DNS域名,跟kdc.conf里面realms保持一致
org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]
*/admin@HADOOP.COM *
[root@bigdata-03 ~]# kdb5_util create -s -r HADOOP.COM
Loading random data
Initializing database /var/kerberos/krb5kdc/principal for realm HADOOP.COM,
master key name K/M@HADOOP.COM
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
kdb5_util: Cannot open DB2 database /var/kerberos/krb5kdc/principal: File exists while creating database /var/kerberos/krb5kdc/principal
[root@bigdata-03 ~]# rm -f /var/kerberos/krb5kdc/principal*
ls -a /var/kerberos/krb5kdc/
kadmin.local
listprincs
kadmin.local -q "addprinc admin/admin@HADOOP.COM"
addprinc admin/admin@HADOOP.COM
標(biāo)準(zhǔn):account/instance@realm
例子:admin/admin@HADOOP.COM
realm 表示域名 如 HADOOP.COM
org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]
libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://m.specialneedsforspecialkids.com/yun/129204.html
大數(shù)據(jù)開(kāi)發(fā)系列五:kafka& zookeeper 配置kerberos認(rèn)證 img{ display:block; margin:0 auto !important; width:100%; } body{ ...
摘要:一大數(shù)據(jù)平臺(tái)介紹大數(shù)據(jù)平臺(tái)架構(gòu)演變?nèi)鐖D所示魅族大數(shù)據(jù)平臺(tái)架構(gòu)演變歷程年底,我們開(kāi)始實(shí)踐大數(shù)據(jù),并部署了測(cè)試集群。因此,大數(shù)據(jù)運(yùn)維的目標(biāo)是以解決運(yùn)維復(fù)雜度的自動(dòng)化為首要目標(biāo)。大數(shù)據(jù)運(yùn)維存在的問(wèn)題大數(shù)據(jù)運(yùn)維存在的問(wèn)題包括部署及運(yùn)維復(fù)雜。 一、大數(shù)據(jù)平臺(tái)介紹 1.1大數(shù)據(jù)平臺(tái)架構(gòu)演變 ?showImg(https://segmentfault.com/img/bVWDPj?w=1024&h=...
閱讀 1353·2023-01-11 13:20
閱讀 1700·2023-01-11 13:20
閱讀 1211·2023-01-11 13:20
閱讀 1904·2023-01-11 13:20
閱讀 4162·2023-01-11 13:20
閱讀 2751·2023-01-11 13:20
閱讀 1397·2023-01-11 13:20
閱讀 3664·2023-01-11 13:20