chapter twenty four

24 Security and Encryption

 

As the focus on Security has grown within the IT industry, the security features supported within SQL Server have also grown, well beyond the basics of authentication, authorization, permissions and securables.

SQL Server network encryption between the instance and the client has been available since SQL Server 2000, while newer features such as encrypting data at rest and column encryption were introduced in SQL Server 2008 and SQL Server 2016, respectively.

With modern versions of SQL Server, you can encrypt:

  • Backups
  • Network traffic between the instance and the client
  • Entire databases
  • Specific columns

SQL Server also supports enforcing Extended Protection and hiding your SQL Server instances, each of which help to reduce your attack surface.

If your organization is required to comply with security standards such as CIS Benchmarks or DISA STIGs, dbatools can help; we built many of the commands as we went through our own audits—and as we wrote this book! In this chapter, we will take a a closer look at these commands which can help to secure your SQL Server estate.

24.1 Encrypting network connections

24.1.1 Certificate

24.1.2 Force Encryption

24.2 Extended Protection for Authentication

24.3 Hide Instance

24.4 Transparent Data Encryption (TDE)

24.4.1 Encrypting databases

24.4.2 Decrypting databases

24.5 Database Backups Encryption

24.5.1 Prerequisites

24.5.2 Backup the database with certificate

24.5.3 Check encryption information from the backup

24.6 Multi-Layered Security

24.7 Hands-on Lab