Kerberos协议:

Kerberos协议主要用于计算机网络的身份鉴别(Authentication), 其特点是用户只需输入一次身份验证信息就可以凭借此验证获得的票据(ticket-granting ticket)访问多个服务,即SSO(Single Sign On)。由于在每个Client和Service之间建立了共享密钥,使得该协议具有相当的安全性。

 

Kerberos协议分为两个部分:

1 . Client向KDC发送自己的身份信息,KDC从Ticket Granting Service得到TGT(ticket-granting ticket), 并用协议开始前Client与KDC之间的密钥将TGT加密回复给Client。

此时只有真正的Client才能利用它与KDC之间的密钥将加密后的TGT解密,从而获得TGT。

(此过程避免了Client直接向KDC发送密码,以求通过验证的不安全方式)

2. Client利用之前获得的TGT向KDC请求其他Service的Ticket,从而通过其他Service的身份鉴别。

摘自:http://idior.cnblogs.com/archive/2006/03/20/354027.html

如果你在node上使用beeline进行连接,则需要先kinit操作,然后执行即可。

如果要使用java application通过jdbc来操作,首先需要ktutil来生成keytab密钥文件,然后利用这个密钥文件去请求ticket才能够进行下面的连接。

具体可以参照网络资料。http://www-304.ibm.com/support/knowledgecenter/SSPT3X_3.0.0/com.ibm.swg.im.infosphere.biginsights.admin.doc/doc/kerberos_hive.html

keytab的生成与使用:

https://kb.iu.edu/d/aumh

ktutil
ktutil: addent -password -p username@ADS.IU.EDU -k 1 -e rc4-hmac
Password for username@ADS.IU.EDU: [enter your password]
ktutil: addent -password -p username@ADS.IU.EDU -k 1 -e aes256-cts
Password for username@ADS.IU.EDU: [enter your password]
ktutil: wkt username.keytab
ktutil: quit

hiveserver2 with kerberos authentication的更多相关文章

  1. FIM 2010: Kerberos Authentication Setup

    The goal of this article is to provide some background information regarding the Kerberos related co ...

  2. kafka Enabling Kerberos Authentication

    CDK 2.0 and higher Powered By Apache Kafka supports Kerberos authentication, but it is supported onl ...

  3. kafka Authentication using SASL/Kerberos

    Authentication using SASL/Kerberos Prerequisites KerberosIf your organization is already using a Ker ...

  4. Authentication using SASL/Kerberos

    Prerequisites KerberosIf your organization is already using a Kerberos server (for example, by using ...

  5. 《转》谈谈基于Kerberos的Windows Network Authentication

    http://www.cnblogs.com/artech/archive/2007/07/05/807492.html 基本原理引入Key Distribution: KServer-Client从 ...

  6. Kerberos是怎么工作的?

    Kerberos是一种计算机网络授权协议,用来在非安全网络中,对个人通信以安全的手段进行身份认证. 采用客户端/服务器结构,并且能够进行相互认证,即客户端和服务器端均可对对方进行身份认证. 关键要素 ...

  7. How-to: Enable User Authentication and Authorization in Apache HBase

    With the default Apache HBase configuration, everyone is allowed to read from and write to all table ...

  8. Kerberos认证原理简介

    1.1 What is Kerberos 1.1.1 简单介绍 Kerberos是一个用于鉴定身份(authentication)的协议, 它采取对称密钥加密(symmetric-key crypto ...

  9. Http authentication(BASIC, DIGEST)

    Http authentication....BASIC: In the context of an HTTP transaction, basic access authentication is ...

随机推荐

  1. LODOP打印插件

    HTML代码(请先下载对应LODOP插件安装)  -    打印onclike事件CreatePrintPage()打印函数,LODOP.PREVIEW()打印预览. <div class=&q ...

  2. C#中弹出文件选择窗体和判断是否下载提示窗体的源码

    1.创建一个window窗体

  3. gene框架文档 - 概述

    欢迎使用Gene框架 最新版本:V1.2.2 开源地址:https://github.com/sasou/php-gene 作者:sasou 文档地址:http://php-gene.com/doc ...

  4. unity3d常用属性汇总

    unity常用的是C#语言.而C#语言有Attribute属性.特别强大.所以unity开发的时候.可以在变量加Attribute属性来达到开发人员想要的效果 RequireComponent:约束组 ...

  5. java判定字符串中仅有数字和- 正则表达式匹配 *** 最爱那水货

    1.当有其他字符出现时,返回的数组长度>1 String s = "3---6\\5656";        Pattern pattern = Pattern.compil ...

  6. ztree addNode editName removeNode

    1.ztree api中完全拥有以上操作的相关解释,及简单Demo. 2.主要是要学会将单独的效果组合起来使用. 2.1  如: 添加完新的Node节点之后,怎么立即进入新节点的编辑状态来修改名称(或 ...

  7. question about import google file

    1. question descibe; once, one css file(app.css) of my web project has sentence like this: @import u ...

  8. 非线性数据拟合-nls

    code{white-space: pre;} pre:not([class]) { background-color: white; }if (window.hljs && docu ...

  9. mysql命令行备份数据库

    MySQL数据库使用命令行备份|MySQL数据库备份命令 例如: 数据库地址:127.0.0.1 数据库用户名:root 数据库密码:pass 数据库名称:myweb 备份数据库到D盘跟目录 mysq ...

  10. 基于UML项目的分析与设计

    1,概述 项目中需求和设计的文档是必然的,UML工具可以帮助指导我们从不同的角度去看待一个新的系统,并把这个系统分解剖析出来.本篇文章主要讲述的是如何将UML应用到项目的开发工作中,关于如何学习UML ...