Use Integrated Authentication over Kerberos when connecting to MSSQL on Linux

Troubleshooting Databases

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

このページの内容はサポート対象外のプラットフォームに関連しています。したがって、アトラシアン サポートではこのページの記載内容のサポートの提供は保証されません。この資料は情報提供のみを目的として提供されています。内容はお客様自身の責任でご利用ください。

This page will help guide you with setting up Kerberos authentication to an external MSSQL server from Linux. More information about using an external MSSQL database can be found at Connecting Stash to SQL Server.

Create a Kerberos configuration file

Create a krb5.conf file with the appropriate configuration for your instance. A sample from Microsoft is provided below.

krb5.conf
[libdefaults]
default_realm = YYYY.CORP.CONTOSO.COM
dns_lookup_realm = false
dns_lookup_kdc = true
ticket_lifetime = 24h
forwardable = yes

[domain_realm]
.yyyy.corp.contoso.com = YYYY.CORP.CONTOSO.COM
.zzzz.corp.contoso.com = ZZZZ.CORP.CONTOSO.COM

[realms]
        YYYY.CORP.CONTOSO.COM = {
  kdc = krbtgt/YYYY.CORP. CONTOSO.COM @ YYYY.CORP. CONTOSO.COM
  default_domain = YYYY.CORP. CONTOSO.COM
}

        ZZZZ.CORP. CONTOSO.COM = {
  kdc = krbtgt/ZZZZ.CORP. CONTOSO.COM @ ZZZZ.CORP. CONTOSO.COM
  default_domain = ZZZZ.CORP. CONTOSO.COM
}

See Using Kerberos Integrated Authentication to Connect to SQL Server from Microsoft for more information.

Configure JAVA to use the Kerberos configuration

Modify <Stash Installation>/bin/setenv.sh and add the following to JVM_REQUIRED_ARGS:

-Djava.security.krb5.conf=<PATH_TO>/krb5.conf

Update the JDBC URL to use Kerberos and Integrated Authentication

Update $STASH_HOME/shared/stash-config.properties to change the JDBC URL so that it uses Kerberos and Integrated Authentication by changing the jdbc.url:

jdbc.url=jdbc:jtds:sqlserver://<MSSQL_HOST:1433;databaseName=<DB_NAME>;domain=<DOMAIN>;integratedSecurity=true;authenticationScheme=JavaKerberos

Stash will need to be restarted after making these changes.

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.