未指定的 GSS 故障:... kvno [Number] 在 keytab 中找到,但没有使用 enctype rc4-hmac

Unspecified GSS failure: ... kvno [Number] found in keytab but not with enctype rc4-hmac

我正在尝试 运行 验证来自客户端的授权令牌的代码。 我在一个函数中写了这段代码:

 host = 'site_address'
state = None
service_name = f'HTTP@{host}'
try:
    rc, state = kerberos.authGSSServerInit(service_name)
    if rc != kerberos.AUTH_GSS_COMPLETE:
        return None
    rc = kerberos.authGSSServerStep(state, token)   <<<<< !!! ERROR !!!
    if rc == kerberos.AUTH_GSS_COMPLETE:
        self.kerberos_token = kerberos.authGSSServerResponse(state)
        self.kerberos_user = kerberos.authGSSServerUserName(state)
        return rc
    elif rc == kerberos.AUTH_GSS_CONTINUE:
        return kerberos.AUTH_GSS_CONTINUE
    else:
        return None
except kerberos.GSSError as error:
    LOGGER.error('Failed to perform the token verification due to %s', error)
    return None
finally:
    if state:
        kerberos.authGSSServerClean(state)

但代码在 rc = kerberos.authGSSServerStep(state, token) 处失败(代码中标记的行)并出现此错误:

GSSError: (('Unspecified GSS failure.  Minor code may provide more information', 851968), ('Request ticket server HTTP/<site_address>@<realm_name> kvno 4 found in keytab but not with enctype rc4-hmac', 100005))

也向屏幕抛出了这个错误:

[3302] 1547638447.877515: Failed to decrypt AP-REQ ticket: -1765328340/Request ticket server HTTP/base.testing.gc@TESTING.GC kvno 4 found in keytab but not with enctype rc4-hmac

我的问题是:为什么我会收到这条消息?我在 Active Directory 中配置的用户标记为启用 This account supports Kerberos AES 256 bit encryption 并且使用 /crypto AES256-SHA1 enctype 创建的 keytab 文件。

为什么我的服务器(docker 在 ubuntu 机器上 - Ubuntu 18.04)正在尝试使用 rc4-hmac 加密类型对此进行解密?我该如何解决?

编辑 也许我的问题应该是:谁告诉我 enctype 我应该读 keytab?

对我来说,这是浏览器的 trust configuration - 应该将站点添加到浏览器的受信任站点(Internet 选项 -> 安全 -> 本地 Internet -> 站点 -> 添加具有确切名称的站点端口http/https 和**地址*)。

由于某些奇怪的原因,enctype 的指令在令牌的 header 中...或者对此加密有某种回退。