Este conteúdo não está disponível no idioma selecionado.

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";
    };
  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
    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
    
  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

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

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo