JAAS keytab配置的相对路径 [英] Relative path for JAAS keytab configuration

查看:441
本文介绍了JAAS keytab配置的相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个系统,其中.NET客户端使用Kerberos针对Java服务器进行身份验证.一切正常,但我正在尝试改善服务器配置.目前,在 C:\ 的根目录中需要一个 keytab 文件,因为我的 jaas.conf 如下所示:

I have a system wherein .NET clients authenticate against a Java server with Kerberos. Everything works, but I'm trying to improve the server configuration. Currently a keytab file is required in the root of C:\ because my jaas.conf looks like this:

Server {
    com.sun.security.auth.module.Krb5LoginModule required
    useKeyTab=true
    storeKey=true
    isInitiator=false
    keyTab="///C:/keytab"
    principal="XXX";
};

我试图将keyTab属性设置为相对路径,但是没有运气.我尝试过的:

I am trying to make the keyTab property a relative path, but am having no luck. What I've tried:

  • keyTab="///keytab"
  • keyTab="///./keytab"
  • keyTab="classpath:keytab"
  • keyTab="///keytab"
  • keyTab="///./keytab"
  • keyTab="classpath:keytab"

所有这些都会导致异常,因此很显然找不到 keytab 文件.

All of these result in an exception, so clearly the keytab file cannot be found.

我已经搜索并

I've searched and read the docs and banged my head on a wall over this. Can anyone reveal the magical incantation I need to make this happen?

推荐答案

请使用keyTab="keytab" 与示例类似: http://docs.oracle.com /javase/6/docs/technotes/guides/security/jgss/lab/part1.html

Please use keyTab="keytab" Similar to the example: http://docs.oracle.com/javase/6/docs/technotes/guides/security/jgss/lab/part1.html

这篇关于JAAS keytab配置的相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆