MySql IT Security Document
MySql IT Security Document
MyMYSQL
Summary: This document examines data security features, including new and existing MYSQL security
features, Windows Server features, and recommended practices, organized by protection layer (client,
network, database, and host) and by feature/practice type (access control, data encryption, and
proactive monitoring).
Contents
Introduction.....................................................................................................................................................................3
Database protection........................................................................................................................................................6
Conclusion.......................................................................................................................................................................7
Overview All systems have ASSETS and security is about protecting assets. The first thing, then, is to know
your assets and their value. In this chapter, concentrate on database objects (tables, views, rows), access to
them, and the overall system that manages them. Note that not all data is sensitive, so not all requires
great effort at protection. All assets are under threat. The second thing to know is what THREATs are
putting your assets at risk. These include things such as power failure and employee fraud. Note that
threats are partly hypothetical, always changing and always imperfectly known. Security activity is directed
at protecting the system from perceived threats. If a threat is potential, you must allow for it to become an
actuality. When it becomes actual there is an IMPACT. Impact you can consider and plan for. But in the
worst case, there will be a LOSS. Security activity here is directed at minimizing the loss and recovering the
database to minimize the loss as well as further protecting from the same or similar threats.
Database system security is more than securing the database; to achieve a secure
database system, we need :
Secure database
Secure DBMS
Secure applications
application development
Secure operating system in relation to database system
Protection layers
overview
In an effort to organize security features by effective scope, we break down the
overall concept of data security into several layers. Each layer represents a logical
partition of the security landscape by type of access, accessible content, and
security concerns.
Security features and practices are grouped into the protection layers to which they
apply. Some of these are applicable to more than one layer. In this paper, we will
briefly examine each layer outlined above, and review a scenario to illustrate how
specific security features and practices can be employed to secure sensitive data.
Data application
protection
Data application protection generally focuses on permission: enabling data access
for authorized users, and disabling access for others. It’s also an area that, from a
DBA perspective, is often difficult to control as it’s up to developers to provide
secure functionality within an application. Traditionally, the logic of obfuscating
sensitive data has been developed in the application layer. This requires security to
be implemented across all modules and applications accessing the data.
Alternatively, special views must be created to avoid exposure of sensitive data.
These views can impact database performance and are susceptible to errors.
MYSQL provides features that limit access to data fields containing
sensitive information and includes an additional layer of application security to
keep valuable personal data protected even when the data is in-motion.
RLS uses filter and block predicates to determine which records are visible for a
particular transaction, protecting data from unauthorized reads or writes
(update/delete). Since predicates are evaluated at the Database Engine, no additional
logic is required in the client application.
At the database level, applications and general users should not have access to ad
hoc query capabilities, particularly when dealing with sensitive data. A good
practice is to prevent user access to data tables, and provide role-based, task-
specific functionality with views and stored procedures. Applications should
execute queries programmatically as parameterized queries to prevent potential
injection attacks. This complements the use of RLS and DDM, as the pre-defined
actions of user views and procedures reduce the likelihood of circumventing
filtering or obfuscation by the Database Engine.
MYSQL can also protect sensitive data, such as credit card numbers or national
identification numbers , whether that data is in-motion or at-rest. New with MYSQL,
Always Encrypted allows clients to encrypt sensitive data at the client application
level.
Encryption keys are externally managed and never revealed to the Database Engine
(MYSQL Database or MYSQL Server). As a result, Always Encrypted provides a separation
between those who own the data (and can
view it) and those who manage the data (but should have no access). This allows
the hospital to encrypt data at rest and reduces access to sensitive data by non-
authorized personnel, such as DBAs. This also means fewer security clearance
requirements for their DBA staff.
Data application layer protection primarily focuses on access control, only providing
access to intended parties, and protecting data from all others. With Always
Encrypted―coupled with access controls such as Dynamic Data Masking, Row-Level
Security, and parameterized queries―developers and administrators can provide
additional assurances to clients and customers that data is protected and secure.
Database protection
Database protection relies heavily on separation of roles, and the permissions that
are associated with these roles. Roles and permissions not only determine which
data is accessible, but the actions a user is allowed to take in relation to the data,
whether a user can view unencrypted sensitive data, or make modifications to the
database schema itself. Secure role management focuses on providing the
minimum level of permission required for a role to perform its tasks. Further
protection is possible by using impersonation to temporarily allow elevated
permissions on-demand.
Conclusion
MYSQL is designed to be secure by design, reducing potential security risks by
default. Security needs are constantly changing, as the landscape of data, volume,
accessibility, and potential threats evolves. MYSQL provides features that
significantly raise the bar for data security, giving developers and administrators the
means to protect data from various threats.
In this paper, MYSQL security features and best practices have been organized in a
way to assist developers and administrators to more easily understand data
security. With this framework of protection layers and feature areas, organizations
are able to deploy more secure solutions, protecting data from end to end while
instilling confidence in users, clients, and customers about the security of their
critically sensitive information.
Appendix: Security
features in detail
Data encryption