kerberos

Hadoop上Kerberos认证过期问题解决

别说谁变了你拦得住时间么 提交于 2020-02-27 23:06:22
前段时间写了一个数据导入工具,数据导入的路径为Hadoop-->公司自研的时序数据库。运行一段时间后发现出现Kerberos认证过期的问题。日志如下: 一开始很奇怪,因为额外开了一个线程,每隔8小时更新Kerberos认证,照理说不该出现这个问题。看直接报错,显示是找不到Kerberos票据,更是一头雾水。 直到看到红框框住的这句话,知道问题所在了。代码中有个逻辑为忽略大小为0的文件,是这样写的: val hadoopConf:Configuration = new Configuration() hadoopConf.addResource( new Path("core-site.xml")) hadoopConf.addResource( new Path("hdfs-site.xml")) hadoopConf.addResource( new Path("hive-site.xml")) hadoopConf.addResource( new Path("yarn-site.xml")) val path = new Path("hdfs://hacluster/user/oper/private/123") val hdfs = FileSystem.get(hadoopConf) val status = hdfs.listStatus(path) status

Flink整合Oozie Shell Action 提交任务带Kerberos认证

旧时模样 提交于 2020-02-26 13:57:57
最近这段时间一直在忙新集群迁移,上了最新的cdh6.3.0 于是Flink 提交遇到了许多的问题,还好有cloudera License 有了原厂的帮助和社区的伙伴,问题解决起来快了不少。 集群具体情况是 CDH6.3.0+Flink1.8.1,整个数据平台全部组件都上了kerberos和ldap因为要过认证,所以任务提交方法我们选择统一Oozie提交任务,并且因为kerberos认证,还需要Flink perjob 需要单独的keytab,才能细粒度的控制权限,因为我们现在部门之间计算资源的划分是通过yarn资源队列,但是现在Flink支持的不是很好,目前只能在配置文件中配置一个keytab,job启动都去这个拉这个keytab复制到自己的contain里面,但是Flink第一提交方式还是希望能够通过oozie提交job,由于oozie没有天生支持Flink提交,所以只能选择oozie shell action 的方式提交job。 在Flink搭建好以后开始提交任务,用oozie shell提交: #!/bin/bash flink run -m yarn-cluster flinktest.jar 马上 Duang ! flink command not find 改成命令绝对路径以后,还是 Duang! org.apache.flink.client.deployment

彻底理解windows 2

我的梦境 提交于 2020-02-19 18:43:46
NTLM v2协议 NTLM v1与NTLM v2最显著的区别就是challenge与加密算法不同,共同点就是加密的原料都是NTLM Hash。 不同之处: Challenge:NTLM v1的challenge有8位,NTLM v2的challenge为16位。 Net-NTLM Hash:NTLM v1的主要加密算法是DES,NTLM v2的主要加密算法是HMAC-MD5. Pass The Hash (哈希传递) 在内网渗透中,我们经常会需要抓取管理员的密码、NTLM Hash,尤其是域环境下。 ·什么是哈希传递? 哈希传递是能够在不需要账户明文密码的情况下完成认证的一个技术。 ·哈希传递的作用? 解决了我们渗透中获取不到明文密码、破解不了NTLM Hash而又想扩大战果的问题。 Pass The Hash 必要条件 ·哈希传递需要被认证的主机能够访问到服务器 ·哈希传递需要被传递认证的用户名 ·哈希传递需要被传递认证用户的NTLM Hash Pass The Hash 工具 三、Active Directory(活动目录)概念 ·Active Directory存储了有关网络对象的信息,并且让管理员和用户能够轻松地查找和使用这些信息。Active Directory使用了一种结构化地数据存储方式,并以此作为基础对目录信息进行合乎逻辑的分层组织。 ·网络对象分为:用户、用户组

Kerberos域安全系列(27)-DCShadow测试技术分析

半世苍凉 提交于 2020-02-16 20:37:13
2018年1月24日,Benjamin Delpy(神器Mimikatz的作者)和Vincent Le Toux在BlueHat IL会议期间公布了针对域活动目录的一种新型攻击技术“DCShadow”。最新版的Mimikatz已经集成了这个功能。 在具备域管理员权限条件下,攻击者可以创建伪造域控制器,将预先设定的对象或对象属性复制到正在运行的域服务器中。 在具备域管理员权限,还需要这种方法吗?答案是需要的。有时候,即使你拥有域管理员权限,但是当你进行横向移动的时候,会被防护机制发现,所以还是需要DCShadow的。 DCSync从域服务器复制出东西,DCShadow是将数据复制至服务器。 从DCShadow目前展示的功能来看,主要只能用于红蓝对抗的隐藏后门。但是DCShadow第一次澄清和实现了伪造一个DC的最小需求合集,这个贡献非常大。以前很多攻击方法都卡在不能伪造域服务器,例如MS15-011和MS15-014等,有了DCShadow的基础,相信将来会有很多新的攻击方法。 根据Lun Delsalle的描述,DCShadow的攻击过程包括3个主要步骤: 在目标域的AD活动目录注册一个伪造的DC中; 使伪造的DC被其他的DC认可,能够参与域复制; 强制触发域复制,将指定的新对象或修改后的对象属性同步复制到其他DC中; 注册伪造的DC 一台机器要想注册成为域中的一台DC服务器

Using Kerberos authentication with Paramiko

本秂侑毒 提交于 2020-02-04 07:18:04
问题 I'm struggling to figure out how to use kerberos authentication with python and paramiko. I've found the documentation for paramiko but don't know how to implement it and there seems to be a lack of tutorials specifically for kerberos and paramiko since its so new. When I ssh outside of python for normal usage, I insert a smart card and type the following from the command line in OSX Mavericks... $ kshell $ pkinit ...which then prompts me for my pin number associated with the card. From there

0465-如何使用SQuirreL访问Kerberos环境下的Hive

房东的猫 提交于 2020-01-28 08:53:59
温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。 Fayson的github: https://github.com/fayson/cdhproject 提示:代码块部分可以左右滑动查看噢 1 文章编写目的 在前面Fayson的文章《 0459-如何使用SQuirreL通过JDBC连接CDH的Hive(方式一) 》和《 0463-如何使用SQuirreL通过JDBC连接CDH的Hive(方式二) 》介绍了SQuirreL的安装以及使用原生和Cloudera提供的JDBC 驱动访问Hive。本篇文章Fayson主要介绍如何使用Cloudera提供的Hive JDBC驱动访问Kerberos环境下的Hive,为什么不讲原生的JDBC驱动,因为Fayson也没有调通。 测试环境 1.RedHat7.2 2.CM和CDH版本为5.15.0 3.Window Server 2012R2 4.SQuirreL版本为3.9.0 2 安装Kerberos客户端 1.在Kerberos官网下载,地址如下 https : / / web . mit . edu / kerberos / dist / index . html 安装过程这里就不在详细说明了。 2.将CDH集群的/etc/krb5.conf文件,在Window客户端如下目录创建krb5.ini文件

curl with --negotiate / Kerberos doesn't seem to work

为君一笑 提交于 2020-01-25 07:58:06
问题 I'm trying to use curl with Kerberos (against TM1). The answers in When using --negotiate with curl, is a keytab file required? seem very helpful, however, it still doesn't work for me. No success with curl 7.29.0 and GSS-Negotiate I followed the instructions from Avinash Reddy $curl --version curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.44 zlib/1.2.7 libidn/1.28 libssh2/1.8.0 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp

How to disable kerberos replay cache in Java?

試著忘記壹切 提交于 2020-01-25 07:46:10
问题 I found that define the environment variable KRB5RCACHETYPE=none can disable kerberos replay cache in c/c++ applications, Java has it's own implementation of kerberos authentication, does anyone know how to disable replay cache in Java? 回答1: I would disable replay detection: http://docs.oracle.com/javase/1.5.0/docs/api/org/ietf/jgss/GSSContext.html#requestReplayDet%28boolean%29 来源: https://stackoverflow.com/questions/14433628/how-to-disable-kerberos-replay-cache-in-java

Has anyone configured Kerberos SSO on Web Logic 12.1.2 with JDK 1.7 on Win 2012 R2 successfully or on Web Logic 12.2.1 with JDK 1.8 on Win 2012 R2

妖精的绣舞 提交于 2020-01-25 06:27:49
问题 This is a related problem described here in the link Has anyone configured Kerberos SSO on Web Logic 12.1.2 with JDK 1.7 on Win 2012 successfully?. Is this problem resolved? I am facing the exact same problem on the Weblogic server version 12.1.3.0 running on Windows Server 2012 R2 on jdk 7u79. When I remove aes256-cts-hmac-sha1-96 from the krb5.ini file and generate a keytab file using ktab or ktpass utility, I get the error message in weblogic server saying : com.bea.security.utils.kerberos

Spark 1.6.Token can be issued only with kerberos or web authentication

我是研究僧i 提交于 2020-01-24 09:35:07
问题 I call kinit keytab right before spark-submit in my shell driver script. The thing is, its working by itself, but when I call the shell driver scrip it through Oozie, I got this error: Stdoutput py4j.protocol.Py4JJavaError: An error occurred while calling o49.saveAsTextFile. Stdoutput : org.apache.hadoop.ipc.RemoteException(java.io.IOException): Delegation Token can be issued only with kerberos or web authentication The issue is probably here file.coalesce(1,True).saveAsTextFile(FQDNofHadoop