此内容没有您所选择的语言版本。

8.4. Kerberos Support: JDBC Client Configuration


Procedure 8.3. Setup Kerberos for JDBC Client

  1. Set JAAS configuration

    In the client VM the JAAS configuration for kerberos authentication needs to be written. Here is sample configuration file (client.conf):
    			Client {
        com.sun.security.auth.module.Krb5LoginModule required
        useTicketCache=true
        storeKey=true
        useKeyTab=true 
        keyTab="/path/to/krb5.keytab" 
        doNotPrompt=false 
        debug=false
        principal="user@EXAMPLE.COM";
    };
    Copy to Clipboard Toggle word wrap
  2. Set JVM configuration

    Add the following JVM options to your client's startup script. Change realm and kdc settings according to your environment:
    -Djava.security.krb5.realm=EXAMPLE.COM
    -Djava.security.krb5.kdc=kerberos.example.com
    -Djavax.security.auth.useSubjectCredsOnly=false
    -Dsun.security.krb5.debug=false
    -Djava.security.auth.login.config=/path/to/client.conf
    Copy to Clipboard Toggle word wrap
    Or if you want to control the kdc and realm system wide, use below instead.
    -Djava.security.krb5.conf=/path/to/krb5.conf (on Linux /etc/krb5.conf)
    -Djava.security.auth.login.config=/path/to/client.conf
    -Djavax.security.auth.useSubjectCredsOnly=false
    -Dsun.security.krb5.debug=false
    
    Copy to Clipboard Toggle word wrap
  3. Set URL connection properties

    Add the following URL connection properties to the JBoss Data Virtualization JDBC connection string:
    authenticationType=KRB5;jaasName=Client;kerberosServicePrincipleName=dv/my.host.com@EXAMPLE.COM
    Copy to Clipboard Toggle word wrap

Note

There is no need to provide the username and password. When the application makes a JDBC connection, it will authenticate locally and use the same user credentials to negotiate a service token with the server and grant the connection. For more information on connection properties and how to configure data sources, see the JBoss Data Virtualization Platform Development Guide.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat