Windows Authentication for SQL Server using JBDC on a Mac

后端 未结 6 956
小蘑菇
小蘑菇 2021-02-01 07:21

Is it possible to connect to SQL Server using Windows authentication/integrated security from a Mac? I am using the type 4 JDBC driver provided by Microsoft. The front end (a fo

6条回答
  •  不要未来只要你来
    2021-02-01 07:40

    Using Kerberos Integrated Authentication to Connect to SQL Server

    Beginning in Microsoft JDBC Driver 4.0 for SQL Server, an application can use the authenticationScheme connection property to indicate that it wants to connect to a database using type 4 Kerberos integrated authentication.


    The jTDS JDBC driver for SQL Server supports Windows authentication simply using the domain property as described in the FAQ.

    domain

    Specifies the Windows domain to authenticate in. If present and the user name and password are provided, jTDS uses Windows (NTLM) authentication instead of the usual SQL Server authentication (i.e. the user and password provided are the domain user and password). This allows non-Windows clients to log in to servers which are only configured to accept Windows authentication.

    If the domain parameter is present but no user name and password are provided, jTDS uses its native Single-Sign-On library and logs in with the logged Windows user's credentials (for this to work one would obviously need to be on Windows, logged into a domain, and also have the SSO library installed -- consult README.SSO in the distribution on how to do this).

提交回复
热议问题