SlideShare a Scribd company logo
1 of 16
SQL Server Security Basics –
Part 1
    http://www.LearnNowOnline.com




         Learn More @ http://www.learnnowonline.com
         Copyright © by Application Developers Training Company
Objectives
• Understand potential data threats and how
  SQL Server’s design protects against them
• Learn about SQL Server and Windows
  integrated authentication
• See how SQL Server provides an authorization
  system to control access to data and objects



             Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Agenda
• Security Overview
• Authentication
• Authorization




           Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Security Overview
• Relational data is a tempting target for
  attackers
• SQL Server 2008 provides plenty of features to
  secure your data and server
  • Need to understand the threats
  • Match countermeasures to the threats




             Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
The Threats
• Identifying threats is a critical first step
   • Type of data will probably influence security measures
• Sometimes the best way to protect data is to never
  put it in a database
• Typical threats
   • Theft of data
   • Data vandalism
   • Protecting data integrity
   • Illegal storage
• Understand threats to protect against them
                  Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Security Design Philosophy
• Trustworthy Computing memo, 2002
• Four pillars of security design
   • Secure by design
   • Secure by default
   • Secure in deployment
   • Secure through communications
• “It’s just secure”
   • Implications throughout the product
   • SQL Server is reasonably secure out of the box
   • Your job is to keep it secure

                 Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
The Two Stages of Security
• Similar to Windows security
  • Authentication: who are you?
  • Authorization: now that we know who you are,
    what can you do?




             Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Key SQL Server Security Terms
•   Authentication                       •    Permission
•   Authorization                        •    Principal
•   Group                                •    Privilege
•   Impersonation                        •    Role
•   Login                                •    User




              Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Agenda
• Security Overview
• Authentication
• Authorization




            Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Authentication
• Process of verifying that a principal is who or what it
  claims to be
   • SQL Server has to uniquely identify principals in order to
     authorize
• Two paths to authentication
   • Windows authentication
   • SQL Server authentication
• Authentication modes
   • Mixed Mode Authentication
   • Windows Only Authentication Mode


                  Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Windows Integrated Authentication
• SQL Server assumes a trust relationship with Windows
  Server
  • Windows does the heavy lifting for authentication
  • The SQL Server checks permissions on the principal
• Advantages
  • Single user login
  • Auditing features
  • Simplified login management
  • Password policies
• Changes only take effect when user connects
                 Learn More @ http://www.learnnowonline.com
                 Copyright © by Application Developers Training Company
Configuring SQL Server Security
Settings
• Select either when install or later
• Settings apply to all databases and server
  objects in an instance of SQL Server
• Changing modes after installation may or may
  not cause problems
  • Windows to Mixed
  • Mixed to Windows



             Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
SQL Server Authentication
• Client applications must provide login
  credentials as part of connection string
• Logins stored in SQL Server
• Windows authentication stronger
  • But must use SQL Server authentication with old
    versions of Windows, non-Windows systems




              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Windows and SQL Server Logins
• SQL Server logins are not stored in Windows
  • Disabled if you select Windows authentication
• Mixed mode is much more flexible
  • But less secure




              Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Beware of the sa Login
•   System administrator login
•   Mapped to sysadmin fixed server role
•   Conveys full system administrator privileges
•   Cannot modify or delete
•   Must use a strong password!
•   Use only as access of last resort
•   NEVER use sa for database access through
    client applications
               Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
End of Part 1

    http://www.LearnNowOnline.com




         Learn More @ http://www.learnnowonline.com
         Copyright © by Application Developers Training Company

More Related Content

More from LearnNowOnline

More from LearnNowOnline (20)

SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data Protection
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
 
A tour of SQL Server
A tour of SQL ServerA tour of SQL Server
A tour of SQL Server
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
Generics
GenericsGenerics
Generics
 
Object oriented techniques
Object oriented techniquesObject oriented techniques
Object oriented techniques
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document Management
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPath
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collections
 
Web API HTTP Pipeline
Web API HTTP PipelineWeb API HTTP Pipeline
Web API HTTP Pipeline
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
SQL Server: Security
SQL Server: SecuritySQL Server: Security
SQL Server: Security
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programming
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVC
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction Design
 
The Entity Data Model
The Entity Data ModelThe Entity Data Model
The Entity Data Model
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

SQL Server Security Basics

  • 1. SQL Server Security Basics – Part 1 http://www.LearnNowOnline.com Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 2. Objectives • Understand potential data threats and how SQL Server’s design protects against them • Learn about SQL Server and Windows integrated authentication • See how SQL Server provides an authorization system to control access to data and objects Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 3. Agenda • Security Overview • Authentication • Authorization Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 4. Security Overview • Relational data is a tempting target for attackers • SQL Server 2008 provides plenty of features to secure your data and server • Need to understand the threats • Match countermeasures to the threats Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 5. The Threats • Identifying threats is a critical first step • Type of data will probably influence security measures • Sometimes the best way to protect data is to never put it in a database • Typical threats • Theft of data • Data vandalism • Protecting data integrity • Illegal storage • Understand threats to protect against them Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 6. Security Design Philosophy • Trustworthy Computing memo, 2002 • Four pillars of security design • Secure by design • Secure by default • Secure in deployment • Secure through communications • “It’s just secure” • Implications throughout the product • SQL Server is reasonably secure out of the box • Your job is to keep it secure Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 7. The Two Stages of Security • Similar to Windows security • Authentication: who are you? • Authorization: now that we know who you are, what can you do? Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 8. Key SQL Server Security Terms • Authentication • Permission • Authorization • Principal • Group • Privilege • Impersonation • Role • Login • User Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 9. Agenda • Security Overview • Authentication • Authorization Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 10. Authentication • Process of verifying that a principal is who or what it claims to be • SQL Server has to uniquely identify principals in order to authorize • Two paths to authentication • Windows authentication • SQL Server authentication • Authentication modes • Mixed Mode Authentication • Windows Only Authentication Mode Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 11. Windows Integrated Authentication • SQL Server assumes a trust relationship with Windows Server • Windows does the heavy lifting for authentication • The SQL Server checks permissions on the principal • Advantages • Single user login • Auditing features • Simplified login management • Password policies • Changes only take effect when user connects Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 12. Configuring SQL Server Security Settings • Select either when install or later • Settings apply to all databases and server objects in an instance of SQL Server • Changing modes after installation may or may not cause problems • Windows to Mixed • Mixed to Windows Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 13. SQL Server Authentication • Client applications must provide login credentials as part of connection string • Logins stored in SQL Server • Windows authentication stronger • But must use SQL Server authentication with old versions of Windows, non-Windows systems Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 14. Windows and SQL Server Logins • SQL Server logins are not stored in Windows • Disabled if you select Windows authentication • Mixed mode is much more flexible • But less secure Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 15. Beware of the sa Login • System administrator login • Mapped to sysadmin fixed server role • Conveys full system administrator privileges • Cannot modify or delete • Must use a strong password! • Use only as access of last resort • NEVER use sa for database access through client applications Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 16. End of Part 1 http://www.LearnNowOnline.com Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company

Editor's Notes

  1. DEMO – Adding a Windows Login, Window Logins via Transact-SQL
  2. DEMO – rest of section and SQL Server Logins via Transact-SQL