aims
1 understand the basic concepts of security controls
2 for SQL Server 2008 is
3 master SQL server security control implementation 2008 of
4 understanding of safety management oracle
Integrity of data is different from the security database
Security: Data protection in order to prevent legitimate users deliberately cause damage (to ensure that users are allowed to do what it wants to do)
integrity: data protection to prevent damage to the legitimate user inadvertently caused. (Ensure that the user right thing)
Goal 1 database security controls
to protect data by accidental or intentional loss, destruction or misuse
2 database security threat to
the security plan needs to consider: loss of availability, confidentiality, data loss, privacy loss, theft and fraud accidental damage
3 security control model
It consists of four phases
authentication (user)
operating authority (database applications and database management systems)
file operations control (operating system)
encryption is stored in the redundancy (database)
4 authorization and authentication
certification is a mechanism for identifying the user's identity. Authorization is legitimate access to the database or database object permissions to the user process. It includes a user authentication request for access to an object
DBMS usually customize access control and forced control of two solutions to store security control problems
Independent access control
Also known as self-safe mode, implemented by the SQL GRANT, PEVOKE, DENY statements
kinds of permissions: Maintenance permission to operate (statement permissions to objects rights)
categories of users: the system administrator (sa), the owner of the database objects, the average user.
Access Control
Avoid autonomous access mode data of 'inadvertent disclosure of' coercive control access
DBMS all entities into the main living room and two categories
subject: the main system activity, actual users and processes
object: passive entity, by manipulating the body, including documents, basic tables, views
For subject and object, DBMS instance for each of them to send a sensitive marker
sensitivity of the mark: DBMS assignment, subject to license level, object to the security classification.
Several sub-level top secret, secret, credible and open and so on
Mandatory access control to the following rules:
only when the level is greater than or equal to the license body secret objects, the object corresponding to the body may be read
only when the level is equal to the license body secret objects, the subject can write the corresponding object
Audit Trail
Audit trail is in essence a special kind of file or database, the system automatically records all user operations on conventional data.
Audit Trail has a supporting role for data security
Safety statistics database
Statistics based on various different criteria to provide information or statistical data aggregated
statistics database security system control user access to database statistics
information statistics database allows users to query the type of polymerization, such as the sum, average, but does not allow access to personal information
Authentication Mode
window authentication mode
SQL Server operating system to obtain user information by Windows, verify that the login name, the general recommendation
Mixed Authentication mode
Windows authorized users and authorized users can log in SQL
Login account
types:
SQL Server account to verify their identity card, built-in system to create their own accounts and yoghurt
log on to Windows network account SQL Server, the account can be a group or user account
Establish login account:
the CREATE LOGIN login_name
modify login account attributes
ALTER LOGIN login_name
delete the account:
DROP LOGIN login_name
database user
user with login account can only connect to SQL Server does not have permission to access the database
mapping: allows the user database login account called the mapping operation to become
a login account can be mapped to multiple database users, by default, only one new database user dbo, database user owner
SQL Server security mechanisms
The CREATE the USER user_name [the FOR | the FROM]
LOGIN login_name
Guest user, a special database users, anonymous access is not mapped to the login account when using the
Guest user, a special database users, anonymous access is not mapped to the login account when using
GRANT CONNECT TO guest
REVOKE CONNECT TO guest
Delete the database
DROP UESR user_name
authority management
There is no legal authority to operate the account login become a legitimate user, you need to grant operating authority for the user database and its objects
(1) object-level permissions (six kinds)
the SELECT, INSERT, UPDATE, DELETE, the REFERENCES, EXECUTE
Authorized statement:
GRANT Object Permissions, ON Object TO (subject: the database user or role) [WITH GRANT OPTION]
example:
GRANT the SELECT ON abc Addres the TO
GRANT EXECUTE ON the OBJECT ... HR.EI to abc
GRANT the REFERENCES (Employeel) ON vEmp
the TO abc WITH GRANT OPTION
Refused permission to
DENY target object privileges ON TO (subject: the database user or role) [CASCADE] [AS body]
DENY the SELECT ON abc Addres the TO
DENY EXECUTE ON the OBJECT ... HR.EI to abc
DENY the REFERENCES (Employeel) ON vEmp
the TO CASCADE abc
Full income statement
REVOKE object privileges ON Object TO (subject: the database user or role) [CASCADE] [AS role]
REVOKE the SELECT ON abc Addres the TO
REVOKE EXECUTE ON the OBJECT ... HR.EI to abc
REVOKE the REFERENCES (Employeel) ON vEmp
the TO abc CASCADE
Statement-level permissions to
the CREATE
DATABASE | PROCEDURE | TABLE | VIEW | FUNCTION
the BACKUP DATABASE | LOG
role:
a group of users with the same permissions that role
in SQL Server 2008 is divided into a predetermined role to system roles and user roles two kinds of
system roles partakers fixed server role (server-level role) and fixed database role (database role)
user role military database-level role
Fixed server role
Bulkadmin: execute BULK INSERT statement permissions.
Dbcreator: create, modify, delete, restore the database permissions
Diskadmin: you have permission to manage disk file
Securitydamin: special administrative login account, read the error log execute CREATE DATABASE privilege account, convenient
Serveradmin: server-level configuration options and shut down the server permissions
Setupadmin: Add delete linked server
Sysadmin: system administrator, Windows super user is automatically mapped to the system administrator
Public: pre-defined server roles, each login name are members of this role, there is no grant or deny specific rights, it will have the role of authority
Example:
fixed database role
defined at the database level, the existence of each data, each user would have added fixed database role permissions database role.
Db_accessadmin: add or delete database permissions
Db_backupoperator: database backup, logging rights
Db_datareader: query the database permissions
Db_datawriter: have insert, delete, change permissions
Db_ddladmin: Data Definition rights
Db_denydatareader: not allowed to have all the privileges of the user data query database
Db_denydatawriter: no allowed to have insert, delete, change all the data permissions in the database
Db_owner: with all the operating authority, including configuration, maintenance, and delete database
db_securityadmin: with administrative database roles, role memberships and data statement and object permissions
user-defined roles
user-defined role belong to a database
used to simplify the use of the database is the rights management
roles can be user-defined user roles or database user
Note: the role of members have permission to members of their own authority + = where the role of authority, but if a privilege in a role denied, members no longer have
Create a user-defined role: CREATE ROLE
delete user-defined role: DROP ROLE
Oracle security mechanisms into table-level security controls, column-level, data-level row-level security controls
security at the database level through user authentication and user permissions grant the appropriate systems to ensure
table-level, column-level, row-level security or recovery by granting object privileges guaranteed to support centralized, distributed, cross-platform application
Oralce system administrator is usually set two levels of security:
Global Set: responsible for the management, coordination and safeguard global data consistency and security
field level: This node is responsible for database security, user management, system privileges and role management
User and resource management
by size divided into DBA privileges users and the average user
DBA DBMS users to automatically create, sys and system users, with full system privileges
Establishing a user:
the CREATE USE1 the IDENTIFIED BY the USER 123456 the DEFAULT TABLESPACE student (student table space in the system)
QUOTA 5M the ON student (restricted space 5M)
Manage users and resources
DBA privileged user can change a user resource usage quota, diffuse, logins, etc.
the ALTER USE1 the USER
QUOTA 60M ON Student (restrictions on the use of space 60M)
the ALTER USE1 the USER IDENTIFIED BY 12345678
Delete User
DROP the USER
DROP the USER user1 CASCADE (delete the user and all objects owned)
Rights management
(1) System privileges
three default privileges:
Connect: can not create any object can access the database and query the data dictionary objects
Recourse: can create database objects (tables, views, indexes ...)
DBA: All authority has predefined
Object privileged
user to maintain the security table level, row-level, column-level data