Home > SQL Server News > Optional features are turned off by default
SQL Server News:
EMAIL THIS

Optional features are turned off by default

By Bob Beauchemin, Niels Berglund and Dan Sullivan
28 Feb 2005 | Addison-Wesley

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

A First Look at SQL Server 2005 for Developers The following excerpt, courtesy of Addison-Wesley, is from Chapter 6 of the book "A First Look at SQL Server 2005 for Developers" written by Bob Beauchemin, Niels Berglund and Dan Sullivan. Click for the complete book excerpt series or purchase the book.



Optional features are turned off by default

The SQL Server product has always been known for being feature-rich. A multitude of new features are added with each release, too many for many DBAs to keep track of. Although it's a treat to see new features (that's what this book is about, after all), in previous releases they usually arrive with the product, installed and enabled by default. And enabled features that you don't know exist can hurt you, by increasing the "surface area" exposed to attackers. These "bad guys" probe for any weakness in existing and new features, which in past releases included goodies such as command- line program invocation (xp_cmdshell), sending mail messages (xp_sendmail), and invocation of COM classes (sp_OACreate). Most of these features will run as the user that runs the SQL Server service process. Most times, for ease of installation, this is set to LocalSystem, a Windows superuser account. And if you are running in mixed security mode and you've set your "sa" password to null (that is, no password), you're wide open, although it must be pointed out that neither mixed security nor a blank password is the default, and a blank password is strongly discouraged throughout the product and all utilities.

In the SQL Server 2005 release, care has been taken to reduce the "attack surface area," especially with regard to SQL Server passwords and auto-enablement of new features. You'll read later in this chapter about improvements when using SQL Server logins and passwords. With regard to feature enabling, two good examples of the new policy are ENDPOINTs used for HTTP (discussed in Chapter 10) and SQLCLR features (discussed in Chapters 2–5).

HTTP ENDPOINTs (endpoints that allow SQL Server to expose stored procedures as Web services) are not enabled by default. Someone with an extended privilege must explicitly invoke CREATE ENDPOINT; there are no "default endpoints" set up on install. ENDPOINT definition prohibits using any security style but Windows integrated choices (Windows integrated security never sends passwords over the network, even in encrypted form) unless you are using the secure socket layer (SSL). SSL, though not as robust as Windows integrated (NTLM or Kerberos) authentication, does at least encrypt all network traffic for the connection. It's the same encryption you use to send credit card numbers over the Internet when you purchase products on the Web. When an ENDPOINT is defined, it's not ON by default; you must create it as ENABLED or explicitly enable it with an ALTER ENDPOINT command. No Web Services or batch access (available separately) is enabled by default within an ENDPOINT, either.

SQLCLR (the ability to run .NET code in SQL Server 2005) is enabled or disabled through a server configuration option. You can turn it on with the following code:

sp_configure 'clr enabled', 1

Although it has been enabled by default through much of the beta process, it will most likely be disabled by default when SQL Server 2005 ships.

Security and Metadata

One of the ways to gain information about a SQL Server database is to rummage through the system metadata views. In previous versions of SQL Server, you could retrieve metadata information on other users' database objects that you did not own or have access to. SQL Server 2005 remedies this situation.

One of the new permissions added to SQL Server 2005 is the VIEW DEFINITION permission. Not only are the new system metadata views (that start with the identifier sys.) read-only, but you can use the VIEW DEFINITION privilege to permit or prohibit access to metadata. This privilege is exposed on individual database objects; it's also very useful at the schema level. If you do not have VIEW DEFINITION permission, system views and stored procedures will not list object information (for example, through sp_helptext) or metadata.

Error messages have been changed as well, so as not to provide information that would indicate the existence of objects you don't have access to. For example, attempting to drop a procedure that you don't "know about" produces the following error message: "Cannot drop the procedure 'foo,' because it does not exist or you do not have permission." This makes SQL Server metadata less subject to random browsing.

Click for the next excerpt in this series: A quick review of SQL Server security concepts with enhancements


Click for the book excerpt series or visit here to obtain the complete book.


Tags: SQL Server Security.NET Development for SQL ServerMicrosoft SQL Server 2005VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SQL Server Security
Password cracking tools for SQL Server
Meet compliance requirements with improved database security practices
Hardening the network and OS for SQL Server security
Securing the server and database in SQL Server
SQL Server security made simple and sensible
Blog: Protect your databases from the internal threat
Setting up SQL Server Service Broker for secure communication
The keys to database backup protection for SQL Server
Understanding transparent data encryption in SQL Server 2008
The fine line between not encrypting your databases and breach notification

.NET Development for SQL Server
Creating Windows PowerShell scripts to manage SQL Server 2008 instances
Manipulate column names in a SQL Server table
Code to restore SQL Server databases in VB.NET
Custom VB.Net scripting in SQL Server Integration Services
Retrieve images from SQL Server and store in VB.Net
Connect to SQL Server database with Visual Basics
Top 10 SQL Server development questions
Developing CLR database objects: 10 tips, 10 minutes
CLR architecture
CLR stored procedures
.NET Development for SQL Server Research

Microsoft SQL Server 2005
End of life comes for SQL Server 2005 SP2, 2008
SQL Server Reporting Services Fast Guide
SQL Server Service Broker Tutorial and Reference Guide
Tips for tuning SQL Server 2005 to improve reporting performance
SQL Server consolidation: Why it's an optimization technique
Parent-child dimensions in SQL Server 2005 with Analysis Services MDX
Enforcing data integrity in a SQL Server database
SSIS error message due to installation problem on SQL Server 2005
Should you upgrade to SQL Server 2005 or SQL Server 2008?
Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
Microsoft SQL Server 2005 Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
data corruption  (SearchSQLServer.com)
data hiding  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



SQL Administration: SQL Security, SQL Backup, SQL Server Performance
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts