Wednesday, 1 April 2020

Connecting Through SQL Server Windows Authentication and SQL Server Authentication


Connecting Through SQL Server Windows Authentication
Windows Authentication is the default authentication mode and is much more secure than SQL Server Authentication. Windows Authentication uses Kerberos security protocol, provides password policy enforcement with regard to complexity validation for strong passwords, provides support for account lockout, and supports password expiration. A connection made using Windows Authentication is sometimes called a trusted connection, because SQL Server trusts the credentials provided by Windows. By using Windows Authentication, Windows groups can be created at the domain level, and a login can be created on SQL Server for the entire group. Managing access from at the domain level can simplify account administration.

Connecting Through SQL Server Authentication
When using SQL Server Authentication, logins are created in SQL Server that is not based on Windows user accounts. Both the user name and the password are created by using SQL Server and stored in SQL Server. Users connecting using SQL Server Authentication must provide their credentials (login and password) every time that they connect. When using SQL Server Authentication, you must set strong passwords for all SQL Server accounts. Three optional password policies are available for SQL Server logins:-
  • User must change password at next login: - Requires the user to change the password the next time that the user connects. The ability to change the password is provided by SQL Server Management Studio. Third-party software developers should provide this feature if this option is used.
  • Enforce password expiration:-The maximum password age policy of the computer is enforced for SQL Server logins.
  • Enforce password policy:-The Windows password policies of the computer are enforced for SQL Server logins. This includes password length and complexity. This functionality depends on the NetValidatePasswordPolicy API, which is only available in Windows Server 2003 and later versions.
Disadvantages of SQL Server Authentication
  • If a user is a Windows domain user who has a login and password for Windows, he must still provide another (SQL Server) login and password to connect. Keeping track of multiple names and passwords is difficult for many users. Having to provide SQL Server credentials every time that one connects to the database can be annoying.
  • SQL Server Authentication cannot use Kerberos security protocol.
  • Windows offers additional password policies that are not available for SQL Server logins.
  • The encrypted SQL Server Authentication login password must be passed over the network at the time of the connection. Some applications that connect automatically will store the password at the client. These are additional attack points.
Advantages of SQL Server Authentication
  • Allows SQL Server to support older applications and applications provided by third parties that require SQL Server Authentication.
  • Allows SQL Server to support environments with mixed operating systems, where all users are not authenticated by a Windows domain.
  • Allows users to connect from unknown or untrusted domains. For instance, an application where established customers connect with assigned SQL Server logins to receive the status of their orders.
  • Allows SQL Server to support Web-based applications where users create their own identities.
  • Allows software developers to distribute their applications by using a complex permission hierarchy based on known, preset SQL Server logins.
https://www.youtube.com/channel/UCKLRUr6U5OFeu7FLOpQ-FSw/videos

1 comments: