With the Innovation Release 21c Oracle has introduced one or the other security feature. These include small improvements that make DB operation more secure and easier. But also completely new concepts like DB Nest, which introduce a new approach for databases, how DB security can be implemented in multitenant.
2. Stefan Oehrli
Platform Architect, Trainer and Partner at Trivadis
• Since 1997 active in various IT areas
• Since 2008 with Trivadis AG
• More than 22 years of experience in Oracle databases
Focus: Protecting data and operating databases securely
• Security assessments and reviews
• Database security concepts and their implementation
• Oracle Backup & Recovery concepts and troubleshooting
• Oracle Enterprise User Security, Advanced Security, Database Vault, …
• Oracle Directory Services
Co-author of the book The Oracle DBA (Hanser, 2016/07)
@stefanoehrli www.oradba.ch
3.
4.
5. Agenda
• Introduction
• Authentication and Authorization
• Auditing
• Confidentiality of Data and Database Hardening
• Network
• Conclusion
05.05.21 SOUG Day - Oracle Database New Security Features
5
6. Introduction
• Oracle distinguish between
• Long Term Release i.e. 19c
• Innovation Release i.e. 21c
• Chance to see what's coming up
• Test new features
• Engineer new concepts
• Simplifies release planning
• Features are evolving over RU
• i.e. features will sometimes be
backported to a Long Term Release
• Clear distinction of features between releases
and RU is blurred
Source: Oracle Support Doc ID 742060.1 Release Schedule of Current Database Releases
05.05.21 SOUG Day - Oracle Database New Security Features
6
7. Security Areas and MDSA
• New security features are spread across
the entire database landscape
• Classic areas of the database security
• Authentication
• Authorization
• Auditing
• Confidentiality of Data
• Network
• Features may be assigned to
multiple areas
05.05.21 SOUG Day - Oracle Database New Security Features
7
9. SQL> CREATE USER scott_data NO AUTHENTICATION;
General improvements
• Default user accounts now Schema-Only
• Schema-Only accounts have been introduced with Oracle 18c
• No password is assigned to this accounts
• No need to maintain these passwords
• Example to create a Schema-Only account
SOUG Day - Oracle Database New Security Features
9 05.05.21
• Ability to grant or revoke administrative privileges to and from Schema-Only accounts
• It is possible to grant SYSDBA, SYSOPER etc to Schema-Only accounts
• Privilege Analysis documentation moved to Oracle Database Security Guide
• Privilege Analysis used to be part of Oracle Database Vault
• Feature has been moved away from DB Vault and it is now part of Oracle Enterprise Edition
• Very useful tool for the implementation of the least privilege principle.
10. SQL> CREATE OR REPLACE DIRECTORY cmu_dir AS
'/u01/app/oracle/network/cmu_wallet’;
SQL> ALTER DATABASE PROPERTY SET CMU_WALLET=cmu_dir';
Centrally Managed User (CMU)
SOUG Day - Oracle Database New Security Features
10 05.05.21
• Oracle CMU is a promising feature that was introduced with Oracle 18c
• So far its configuration depends on sqlnet.ora, WALLET_LOCATION, environment variables etc.
• To find the proper wallet location is sometimes cumbersome in particular in container databases
• Simplification through new database property CMU_WALLET introduced with Oracle 21c
• Backport for 19c available as patch 31404487
• Example for the property
• Directory is for the CMU wallet as well the dsi.ora configuration file
• Can be set on CDB or PDB level
11. Authentication
• New and Updated Password User Profiles
• DoD STIG compliant
• CIS Center for Internet Security compliant
• Minimum password length enforcement for all PDBs
• Common profile in CDB
• Only limit PASSWORD_VERIFY_FUNCTION
• CREATE MANDATORY PROFILE
• Force upgraded password file to be case sensitive
• No longer be possible to enable / disable
• All passwords in new password files are case
sensitive by default
SOUG Day - Oracle Database New Security Features
11 05.05.21
12. • Disable the rollover period
SQL> SELECT username,account_status,password_versions, profile
FROM dba_users WHERE username='SCOTT';
USERNAME ACCOUNT_STATUS PASSWORD_VERSIONS PROFILE
---------- -------------------- -------------------- ----------
SCOTT OPEN & IN ROLLOVER 11G 12C DEFAULT
SQL> ALTER USER scott EXPIRE PASSWORD ROLLOVER PERIOD;
Authentication
• Gradual database password rollover for applications
• Allow to use old an new password for a defined timeframe
• Time period used to change all the application passwords
• Configured via password profile PASSWORD_ROLLOVER_TIME
• Status is visible in ACCOUNT_STATUS of DBA_USERS
SOUG Day - Oracle Database New Security Features
12 05.05.21
13. • Oracle database connections to KDC now default to TCP
• Used to be UDP by default
scott_krb =
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db21)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME= pdb1.trivadislabs.com))
(SECURITY=(KERBEROS5_CC_NAME = /tmp/scott/krb.cc)
(KERBEROS5_PRINCIPAL = scott@trivadislabs.com)))
king_krb =
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db21)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME= pdb1.trivadislabs.com))
(SECURITY=(KERBEROS5_CC_NAME = /tmp/king/krb.cc)
(KERBEROS5_PRINCIPAL = king@trivadislabs.com)))
Authentication – Kerberos
• Multiple Kerberos Principals with a Single Database Client
• Specify additional kerberos principals using tnsnames.ora
SOUG Day - Oracle Database New Security Features
13 05.05.21
14. Authorization
• New System privilege and initialization parameter for diagnostic events
• ENABLE DIAGNOSTICS system privilege
• DIAGNOSTICS_CONTROL initialization parameter
• Oracle SQL*Loader Support for Object Store Credentials
• Allow to access / load data from OCI object store
SOUG Day - Oracle Database New Security Features
14 05.05.21
16. Auditing
• Desupport of UNIFIED_AUDIT_SGA_QUEUE_SIZE
• Audit Data is written immediately to an internal relational table
• No data lost in case Instance Crash / SHUTDOWN ABORT
• Deprecation of settings to flush audit trail records to disk
• Data is written automatically in a new internal
relational table
• Existing unified audit records have to be
transferred
• Unified Audit is now enabled by default
• Mixed mode and classic Audit is depreciated
SOUG Day - Oracle Database New Security Features
16 05.05.21
17. Auditing – A few odds and ends
• As of Oracle 19c it is now possible to audit only top level statements
• i.e. just the package and not the 100 sql statements within the package
• Improved read performance on the unified audit trail
• PDB_GUID has been added as an audit record field name for SYSLOG
• Changes to the Unified Audit policy configuration are effective immediately
• Uniform audit policies enforced for the current user
• Predefined Unified Audit policies for STIG Security Technical Implementation Guides compliance
• Auditing for Oracle XML DB HTTP and FTP Services
• Unified Auditing on an Editioned Object Now Applies to All Its Editions
• SYSLOG Destination for Common Unified Audit Policies
SOUG Day - Oracle Database New Security Features
17 05.05.21
19. Transparent Data Encryption
There was the thing with the online encryption…
• Gradual improvement of existing features
• More algorithms for offline TDE
• Online conversion support for auto-renaming
in Non-OMF Mode
• Support for operation on closed wallets
• Set default TDE algorithm
• Extensions specifically for cloud environments
• Sharing TDE master keys across Oracle processes
• Control hard beats with Oracle Key Vault
• Improved performance with large numbers of TDE Keys
• Simplification of known pain points
• TDE WALLET configuration with WALLET_ROOT
05.05.21 SOUG Day - Oracle Database New Security Features
19
20. Transparent Data Encryption – A few odds and ends
• More algorithms for offline TDE
• Now supports AES128, AES192, AES256, and 3DES168 as well as ARIA and GOST
• Online conversion support for auto-renaming in Non-OMF Mode
• No need to specify the FILE_NAME_CONVERT clase
• Support for operation on closed wallets
• Access to encrypted Oracle maintained tablespaces e.g. SYSTEM, SYSAUX etc. is also possible
with closed wallet
• Init.ora parameter TABLESPACE_ENCRYPTION_DEFAULT_ALGORITHM to set default TDE algorithm
• Currently limited to AES128, AES192, AES256, and 3DES168
• TDE WALLET configuration with WALLET_ROOT
• Specify the wallet location by the init.ora parameter WALLET_ROOT
• Combination with TDE_CONFIGURATION parameter
• No dependency on sqlnet.ora
05.05.21 SOUG Day - Oracle Database New Security Features
20
21. Oracle Blockchain Table
• New append-only table type
• Only insert operations are allowed
• Deleting rows is either
• Prohibited
• Restricted based on time
• Rows in a blockchain table are tamper-proof
SOUG Day - Oracle Database New Security Features
21 05.05.21
Source: Oracle® Database Learning Database New Features 21c
22. Container Database Security
• Out of the box no special measures
• Security and operational risks
• PDB privilege escalation
• Excessive use of shared resources
• Gain access to CDB or PDBs
• Use of critical features like
• A few multitenant features
• PATH_PREFIX and CREATE_FILE_DEST
• PDB_OS_CREDENTIAL parameter
• Lockdown profiles to restrict certain
operations or functionalities in a PDBs
SOUG Day - Oracle Database New Security Features
22 05.05.21
23. Oracle DB Nest
Available in Oracle 20c
• Hidden Feature in 19c
Control and isolation of
• OS resources used by a PDB
• File system isolation per PDB
• Secure computing
Concept analog to Container Technologies like Docker
• Use of Linux Namespaces
• Use of CGROUPS
05.05.21 SOUG Day - Oracle Database New Security Features
23
24. Architecture of a CDB Nest
05.05.21 SOUG Day - Oracle Database New Security Features
24
Source: Oracle® Database Security Guide 21c
25. Kernel Namespaces
• Linux kernel function for isolation and
virtualization of system resources
• When a DB Nest is launched, Oracle creates a
set of namespaces for that DB Nest
• Processes within a DB Nest see only its
namespace
SOUG Day - Oracle Database New Security Features
25 05.05.21
26. Control groups (cgroups)
• cgroups is a Linux kernel feature
• mainlined into the Linux kernel since 2007
• Allows to limit that limits, accounts for,
and isolates the resource usage of a
collection of processes
• Possibility of limiting and isolating the
consumption of resources
• Heavely used in Container (runc, Docker
etc.)
• CPU, memory, maximum number of PIDs,
(network, disk I/O)
SOUG Day - Oracle Database New Security Features
26 05.05.21
Source: Wikipedia (https://en.wikipedia.org/wiki/Cgroups)
27. Sneak Preview on DB Nest
• Introduction of new init.ora parameter
• DBNEST_ENABLE – Enables or disables DB Nest
• DBNEST_PDB_FS_CONF – Specifies the location of an optional file system configuration file. Set
this parameter in the CDB root.
• Use of a dedicated broker configured in listener.ora by DEDICATED_THROUGH_BROKER_LISTENER
• Introduction of new commandline tools dbnest and dbnestinit
• Allows to create, initialize and test DB Nests
• Requires additional OS package
• nscd – A Name Service Caching Daemon (nscd)
• sssd – System Security Services Daemon
SOUG Day - Oracle Database New Security Features
27 05.05.21
28. • Enable the broker
# DB Nest
DEDICATED_THROUGH_BROKER_LISTENER=ON
ALTER SYSTEM SET use_dedicated_broker=TRUE;
Basic DB Nest Configuration
• Configure a dedicated broker in listener.ora
SOUG Day - Oracle Database New Security Features
28 05.05.21
• Enable DB Nest and restart the database
ALTER SYSTEM SET dbnest_enable=cdb_resource_pdb_all SCOPE=SPFILE;
• Check the alert.log for DB Nest
Instance running inside DB Nest (TDB200C_TDB200C)
…
PDBHR(3):DB Nest (PDB00003, 2968463207) open successful
29. oracle@ol7db21:~/ [TDB210C] dbnest list
----------------------------------------------------------------------------
Id : Nest : Parent : : Tag : State
----------------------------------------------------------------------------
1 : TDB200C_TDB200C : : TDB200C_TDB200C : OPEN
Net State :
Namespace State : (pid=0,cnid=4026531836,pnid=4026531836,no namespace,type=0x0)
Resources : (cpu=0)
Property enabled : resources
Seccomp status : (level=none)
FS Isolation : (disabled)
----------------------------------------------------------------------------
2 : PDB00001 : TDB200C_TDB200C : PDB00001 : OPEN
<REMOVED>
---------------------------------------------------------------------------
3 : PDB00002 : TDB200C_TDB200C : PDB$SEED (uid=2427344711) : OPEN
<REMOVED>
----------------------------------------------------------------------------
4 : PDB00003 : TDB200C_TDB200C : PDBHR (uid=2968463207) : OPEN
Net State :
Namespace State : (pid=3827,cnid=4026532191,pnid=4026531836,type=0x7)
Resources : (cpu=0)
Property enabled : namespaces,resources
Seccomp status : (level=strict1)
FS Isolation : (default-config)
-----------------------------------------------------------------------------
Number of active nest namespaces = 4
----------------------------------------------------------------------------
The DB Nest
SOUG Day - Oracle Database New Security Features
29 05.05.21
30. • Try the PDB nest
oracle@ol7db21:~/ [TDB210C] dbnest enter PDB00001
Entering nest namespace : PDB00001
oracle@ol7db20:~/ [TDB210C] exit
exit
Exiting nest namespace : PDB00001
oracle@ol7db21:~/ [TDB210C] dbnest enter PDB00003
Entering nest namespace : PDB00003
shell not found : errno = 2
Exiting nest namespace : PDB00003
Entering DB Nests
• Use dbnest to enter the namespace of a nest e.g. opening a shell in this namespace
SOUG Day - Oracle Database New Security Features
30 05.05.21
31. Outlook to DB Nest
• Become production in main release
• Enhanced Doc, Conf and Examples
• Available information is limited
• Introduce more configuration features
• Introduce Linux CGROUPS
• Control resources e.g. CPU, Memory
• Control device access
• Become Maturate
SOUG Day - Oracle Database New Security Features
31 05.05.21
32. • Reveals a functionality named DB Nest.
And yes it does work J
Parameter Instance Description
----------------------- ----------- --------------------------------
_dbnest_enable NONE dbNest enable
_dbnest_pdb_fs_conf PDB Filesystem configuration
_dbnest_pdb_fs_type DEFAULT PDB FS Type
_dbnest_pdb_scm_conf PDB SCM configuration
_dbnest_pdb_scm_level STRICT1 PDB SCM Level
_dbnest_stage_dir Staging directory configuration
_instance_dbnest_name Instance dbNest Name
05.05.21 SOUG Day - Oracle Database New Security Features
32
Side Note – Oracle DB Nest in 19c
• A possible hint in Oracle 19c based on a few hidden parameter
34. Network Security
There is no new killer feature in the area of network security
• Oracle did its home work i.e. decent improvements to existing features
A few examples:
• Simplify configuration of CMU by relacing dependency on sqlnet.ora / WALLET_LOCATION
• Remove dependency on sqlnet.ora for TDE by introducing WALLET_ROOT
• Enhance Kerberos functionality i.e.
• Ability to use multiple Kerberos principals with a database client (tnsnames.ora configuration)
• Oracle Database connections to KDC now default to TCP rather than UDP
• Multiple wallet Support for distinct SSL connections in one process
• And a few more…
05.05.21 SOUG Day - Oracle Database New Security Features
34
35. Summary
• There are a few more “small” security improvements
• Many of the improvements simplify the use of existing security features
in the daily business
• The focus on cloud-based solutions (public and private) is clearly
evident
• A lot of necessary and useful, but not earth-shattering
• Block chain table…
• …I’m wondering when Oracle starts to use it for the audit trail
• The new functionality DB Nest does look promising
• Exciting to see that it also works in Oracle 19c J
• It is a young feature and requires quite some engineering and
maturity
SOUG Day - Oracle Database New Security Features
35 05.05.21