Chapter2 User
Chapter2 User
CSEC3360
Chapter 2: Essential Elements of User Security
Textbook: David C. Knox, William Maroulis, and Scott Gaetjen:Oracle Database 12c
Security.Thanks to Engineer Saif
3. Assuming the password is correct, the database assumes the user can
be trusted with the identity presented. The database will then
determine what privileges and authorizations the user has. Data
security is implemented based on the user’s privileges and
authorizations.
Identification Methods
❑ In all cases, the user is responsible for providing the correct identifying
information.
❑ Biometrics:
o Refers to the biological characteristics of people that can be measured to
distinguish the differences among them.
o Impossible to guess and difficult to steal.
Technological Identification
Technological Identification
❑ Biometrics :
o Biometrics are unique in that the same biometric can be used
for both the identification and the authentication processes:
❖ With biometric identification, the biometric information is considered
unique and can be used to accurately identify the person presenting the
biometric.
❑ Digital Identities:
o An example seen today is the digital certificates used as part of Public Key
Infrastructures (PKIs).
o Digital certificates are popular not only because the certificates are standards based,
but also because the certificates contain additional informationthat can be used in
implementing effective security controls.
Technological Identification
➢ No specific syntax for creating different types in Oracle ( they can all be
created with the CREATE USER command).
➢ The types are actually derived by the permissions the accounts possess
and how they are used.
4. Application schema This account type owns the database objects, such as
tables, views.
A container is either a PDB or the root container (also called the root). The root is
a collection of schemas, schema objects, and non-schema objects to which all PDBs
belong.
Every multitenant container database will have exactly one root container, named
CDB$ROOT, for common users, and one PDB Seed Database PDB$SEED.
Database Account Types in Oracle Database 12c
Multitenant Architecture
Database Account Types in Oracle Database 12c
Multitenant Architecture
❑ Advantages:
1. At first glance, you might think this consolidation has only reduced the need for multiple
operationalDBAs.
2. This is certainly desirable as it reducesthatcost associated with managing these accounts on
multiple database servers.
3. There are also labor costs savings in the work that these operationalDBAs perform.
4. We will have fewer servers that we need to apply software patchesto, so the cost to ensure
our databasesare running the latest functional or security patchesis reduced.
5. Cost savingsrelated to the time it takes create and managea database’ssecure initialization
parameters.
Privileged Database Account Management in
Oracle Database 12c
❑ Administrative Privileges for Separation of Duty:
➢ Oracle Database 12c creates the SYS and SYSTEM schemas when you create a
new database:
❖ The SYS schema owns a large number database objects, referred to as the data
dictionary. The SYSTEM account owns a less number of database objects.
❖ The SYSTEM schema is an Oracle account that has the DBA role granted to it by
default.
❖ SYS : The super-user, manages core database functionality. Used for critical
database operations.
❖ SYSTEM : A privileged user for general administration, but not as powerful as
SYS. Primarily used for routine management tasks
▪ Key Difference: SYS manages the database engine, while SYSTEM manages
user-level tasks.
PrivilegedDatabaseAccount Managementin OracleDatabase
12c
PrivilegedDatabaseAccount Managementin OracleDatabase
12c
SYSBACKUP SYSDG
SYSKM SYSASM
PrivilegedDatabaseAccount Managementin OracleDatabase
12c
➢ Notice that Oracle Database 12c added a “common”column for accounts to indicate the
account is shared between the root container andall pluggable databases
Methodsfor Privileged DatabaseAccountManagement
❑ Creating Accounts:
1. Create a mapping from an OS account to the database administrative account.
2. Create a standard database account and grant the role/privileges to that user.
Methodsfor Privileged DatabaseAccountManagement
PrivilegedDatabase AccountManagementBasedonOracleOSAuthentication:
Methodsfor Privileged DatabaseAccountManagement
Methodsfor Privileged DatabaseAccountManagement
session_privs
ORDER B Y 1;
Methodsfor Privileged DatabaseAccountManagement
➢ Next we grant this account the SYSBACKUP privilege and we grant the CREATESESSION
privilege so thatthe accountcan log in to the database
➢ To create a local account in a pluggable database, we first need to decide which PDBs the
account will be created in
SHOW PDBS
Managing Accounts in a Pluggable Database
❑ Creating aPluggable Database:
➢ The SALES PDB was created from PDB$SEEDwith the following command:
CREATE PLUGGABLE DATABASE sales
ADMIN USER pdbadmin IDENTIFIED B Y Admin123
ROLES = (DBA)
FILE_NAME_CONVERT =
('D:\app\OracleHomeUser1\oradata\orcl\',
'D:\app\OracleHomeUser1\oradata\orcl\mypdb\');
CREATE USER sh
1
IDENTIFIED BY welcome1
DEFAULT TABLESPACE sales;
3 CONNECT sh/welcome1@sales
7 COMMIT;
Managing Database Account Passwords and Profiles
➢ Oracle enabled you to enforce the choice of strong passwordsthrough the use of password
complexityroutines.
2
3
plain-text (2)
Verifier
User Encrypted
Compare Passwords
1
Data
Oracle Dictionary
4
5 If Matching
Managing DatabaseAccountPasswords andProfiles
o Expire Password:
o To change an account’s password, you must have the ALTER USER systemprivilege
▪ The challenge and response data during this authentication phase is encrypted.
▪ The database initialization parameter should be used to control the number of times a remote
client can fail login attempts.
Managing DatabaseAccountProfiles
❑ Oracle Database profiles include support for the following password constraints controls:
1. Failed logon attempts: Thenumber of times an incorrect password can be used before the
account is locked.
2. Account lockout: The amount of time that an account will remain locked after repeated
incorrect password login attempts.
3. Password lifetime or age: The number of days that a password can be used before it must be
changed.
4. Password grace time: The amount of time that an account can use an expiring password
before it must be changed.
Managing DatabaseAccountProfiles
5. Password reuse time/max: The number of times different passwordsmust be used before a
password can be reused or the number of days before a password can be reused.
6. Password verification: The ability to specify a custom PL/SQL function to verify that a
password meets your organization'spassword complexity rules
2
1 Expire the user’s existing
password
Create a password profile After creating a passwordprofile,
you will force your users to change
their passwords to ensure all
passwords being used comply with
the profile.
4 Check NewPassword
The new password is
Reset Password
3
checked against the Uponthe next login, the
complexityroutine and the database prompts the user to
other password profile reset the password.
values will also be enforced.
Managing DatabaseAccountProfiles
❑ Three template password verification PL/SQL functions are provided by Oracle Database 12c:
1. verify_function_11g
2. ora12c_verify_function
3. ora12c_strong_verify_function
❑ To illustrate, we will first deploy the password complexity routinesprovided with Oracle
Database 12c as follows:
@D:\app\OracleHomeUser1\product\12.2.0\dbhome_1\rdbms\admin\utlpwdmg.sql
Managing DatabaseAccountProfiles
❑ This function should be used if you want to enforce that new and old passwords are
not the same or even similar.
Managing DatabaseAccountProfiles
❑ Then:
Profile altered.
Managing DatabaseAccountProfiles
Profile altered.
Managing DatabaseAccountProfiles
CREATEUSER user1
*
ERRORatline1:
ORA-28003:password verificationforthe specified password failed
ORA-20023:Password must contain atleast2uppercase character(s)
Managing DatabaseAccountProfiles
User created.
-- Note: the Levenshteindistance algorithmwill fire for the real end user changing the password
not an administrator like SYSDBA so let's login as the account to test this
--ChangePassword
PASSWORD
Managing DatabaseAccountProfiles
ERROR:
ORA-28003:password verification forthe specified password failed
ORA-20032:Password should differ from previous password by atleast4 characters
Password unchanged
❖ Total Mutations: 2
➢ Old Pass: WElcome@@123
➢ NewPass: WElcome@?122 ❖ Mutations:
1. Replace @at position 9 with ?.
2. Replace 3 at position 12with 2.
Managing DatabaseAccountProfiles
❑ Recommendations:
➢ Defense Challenge: arises from the fact that there are an enormous number of
ways to trigger such an attack.
➢ Result: exhaust computing resources to the point that the database can no longer
provide adequate service
Managing Database Account Profiles