惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
Vercel News
Vercel News
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Jina AI
Jina AI
B
Blog
Recorded Future
Recorded Future
MyScale Blog
MyScale Blog
I
InfoQ
aimingoo的专栏
aimingoo的专栏
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 三生石上(FineUI控件)
博客园 - Franky
Schneier on Security
Schneier on Security
V
V2EX
TaoSecurity Blog
TaoSecurity Blog
H
Hacker News: Front Page
Cloudbric
Cloudbric
D
DataBreaches.Net
B
Blog RSS Feed
P
Palo Alto Networks Blog
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
I
Intezer
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyberwarzone
Cyberwarzone
F
Fortinet All Blogs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
K
Kaspersky official blog
Forbes - Security
Forbes - Security

博客园 - 后厂村思维导图馆

一道小学一年级数学题,国产大模型全军覆没 Java日志框架的依赖设置备查(SLF4J, Log4j, Logback) 简单了解一下国产操作系统 我整理了近五年的开发者报告,看看国内外有什么差异? 简单了解一下国产GPU Docsify on VPS,搭建最简个人博客 简单了解一下国产CPU 向量数据库Pinecone,治疗ChatGPT幻觉的药方? 今天看到博客园的捐款求助,园龄17年6个月的我有些感慨 如何假装你懂机器学习? 如何假装你懂Meta Segment Anything? 如何假装你懂GPU? 如何假装你懂图片生成AI(Midjourney、文心一格)? 如何假装你懂ChatGPT? APP开发,微信第三方登录的介绍 Java Lambda基础——Function, Consumer, Predicate, Supplier, 及FunctionalInterface接口 程序员生存指南——镜像加速 HBase + Kerberos 配置示例(二) HBase + Kerberos 配置示例(一) Hadoop-2.6.0 + Zookeeper-3.4.6 + HBase-0.98.9-hadoop2环境搭建示例
Kerberos ticket lifetime及其它
后厂村思维导图馆 · 2015-06-29 · via 博客园 - 后厂村思维导图馆

前言

之前的博文中涉及到了Kerberos的内容,这里对Kerberos ticket lifetime相关的内容做一个补充。

ticket lifetime

Kerberos ticket具有lifetime,超过此时间则ticket就会过期,需要重新申请或renew。ticket lifetime取决于以下5项设置中的最小值:

  • Kerberos server上/var/kerberos/krb5kdc/kdc.conf中max_life
  • 内置principal krbtgt的maximum ticket life,可在kadmin命令行下用getprinc命令查看
  • 你的principal的maximum ticket life,可在kadmin命令行下用getprinc命令查看
  • Kerberos client上/etc/krb5.conf的ticket_lifetime
  • kinit -l 参数后面指定的时间

ticket renew lifetime

ticket过期后,如果想延长,一种方法是重新申请(需要输入密码),另一种是renew(不需要输入密码),每renew一次,就延长一个lifetime。不过renew操作本身也有lifetime,即在ticket renew lifetime,在此lifetime之内,才能进行renew操作。与上面的很相似,ticket renew lifetime取决于以下5项设置中的最小值:

  • Kerberos server上/var/kerberos/krb5kdc/kdc.conf中max_renewable_life
  • 内置principal krbtgt的maximum renewable life,可在kadmin命令行下用getprinc命令查看
  • 你的principal的maximum renewable life,可在kadmin命令行下用getprinc命令查看
  • Kerberos client上/etc/krb5.conf的renew_lifetime
  • kinit -r 参数后面指定的时间

HBase与ticket lifetime

HBase需要长时间运行,它对ticket过期问题的处理见org.apache.hadoop.hbase.ipc.RpcClient,方法handleSaslConnectionFailure(),方法注释中提到HBase是尝试自动relogin,从代码上看应该是直接获取一个新的ticket,而不是进行renew。

The other problem is to do with ticket expiry. To handle that, a relogin is attempted.
The retry logic is governed by the shouldAuthenticateOverKrb method. In case when the user doesn't have valid credentials, we don't need to retry (from cache or ticket). In such cases, it is prudent to throw a runtime exception when we receive a SaslException from the underlying authentication implementation, so there is no retry from other high level (for eg, HCM or HBaseAdmin).

另外:

[org.apache.hadoop.security.UserGroupInformation] Not attempting to re-login since the last re-login was attempted less than 600 seconds before.

这个错误实际是由于UserGroupInformation中的一个hard code值引起的,MIN_TIME_BEFORE_RELOGIN=10*60*1000L,是hadoop自己做出的限制,即不允许过于频繁地relogin,需要将ticket_lifetime设置为大于10分钟即可。

keytab与ticket lifetime

keytab文件实际只是一个密码文件,显然,修改lifetime相关设置跟密码是没有关系的,不需要去重新生成现有的keytab文件。

一些命令

  • kadmin: modprinc -maxrenewlife 11days +allow_renewable {principal}
  • kadmin: modprinc -maxlife 6minutes {principal}
  • kadmin: getprinc {principal} //retrieve the detail info of principal
  • kinit -R //renew current ticket
  • kinit {principal} -kt {keytab file} //init a principal via keytab file


送书了,送书了,关注公众号“后厂村思维导图馆”,就送出O'Reilly《Spark快速大数据分析》纸质书(亦有一批PDF分享)! —— 2018年12月