doag oracle 12c new security features soe

38
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH Oracle 12c New Security Features Or what might be available in the near future .... Stefan Oehrli

Upload: others

Post on 09-Jan-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DOAG Oracle 12c New Security Features soe

BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH

Oracle 12c New Security FeaturesOr what might be available in the near future ....

Stefan Oehrli

Page 2: DOAG Oracle 12c New Security Features soe

Our company.

DOAG SIG Security - Oracle 12c New Security Features2 18.10.16

Trivadis is a market leader in IT consulting, system integration, solution engineeringand the provision of IT services focusing on andtechnologiesin Switzerland, Germany, Austria and Denmark. We offer our services in the followingstrategic business fields:

Trivadis Services takes over the interacting operation of your IT systems.

O P E R A T I O N

Page 3: DOAG Oracle 12c New Security Features soe

COPENHAGEN

MUNICH

LAUSANNEBERN

ZURICHBRUGG

GENEVA

HAMBURG

DÜSSELDORF

FRANKFURT

STUTTGART

FREIBURG

BASEL

VIENNA

With over 600 specialists and IT experts in your region.

DOAG SIG Security - Oracle 12c New Security Features3 18.10.16

14 Trivadis branches and more than600 employees

200 Service Level Agreements

Over 4,000 training participants

Research and development budget:CHF 5.0 million

Financially self-supporting andsustainably profitable

Experience from more than 1,900 projects per year at over 800customers

Page 4: DOAG Oracle 12c New Security Features soe

18.10.16 DOAG SIG Security - Oracle 12c New Security Features4

Technology on its own won't help you.You need to know how to use it properly.

Page 5: DOAG Oracle 12c New Security Features soe

Stefan Oehrli

DOAG SIG Security - Oracle 12c New Security Features18.10.16

Solution Manager BDS SECWorking since 1997 in IT

Since 2008 with Trivadis AG

Since 2010 Discipline Manager SEC INFR

Since 2014 Solution Manager BDS Security

SkillsBackup & RecoveryOracle Advanced Security Oracle AVDF und DB VaultOracle Directory ServicesTeam / Project Management

IT ExperienceConsultant for DB Admin and DB security solutionsAdmin of complex and heterogeneous DB SystemsHead of DBA Team

SpecializationDB Security and OperationSecurity ConceptsSecurity ReviewsOracle Backup & Recovery

5

Page 6: DOAG Oracle 12c New Security Features soe

Disclaimer

DOAG SIG Security - Oracle 12c New Security Features6 18.10.16

Analysis, opinions, and representations expressed in this presentation are solely those of the author and have not been approved or endorsed by Oracle.

All Information we share with you today is preliminaryFor this reason the slides will not be distributed

PDF Distribution will only contain Information for Oracle 12c R1 and Oracle ExadataExpress Cloud Service

Page 7: DOAG Oracle 12c New Security Features soe

Agenda

DOAG SIG Security - Oracle 12c New Security Features7 18.10.16

1. Introduction2. Authentication3. Authorization4. Auditing5. Confidentiality of data6. Network7. Other Stuff8. Conclusion

Page 8: DOAG Oracle 12c New Security Features soe

Introduction

DOAG SIG Security - Oracle 12c New Security Features8 18.10.16

New Feature Review based on Oracle 12.2 Beta2 and its documentation

According to different source on the way 12c R2 will be released “Cloud first”

– Software Download for on Premise later…

– CRN Blog Post http://url.oradba.ch/2c0TTc7 / http://url.oradba.ch/2c8jZIQ

– Inside Channels http://url.oradba.ch/2cs0pYO

Release Date is still open as far as I know…

… but it has to be soon 😉

Source: Mike Dietrich Blog Post at OOW 2015https://blogs.oracle.com/UPGRADE/entry/oracle_database_12_2_just

… Oracle 12c Release 2 has been releasedfor the 2 days ago

Oracle Exadata Express Cloud

Page 9: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features9 18.10.16

Authentication

Page 10: DOAG Oracle 12c New Security Features soe

Authentication

DOAG SIG Security - Oracle 12c New Security Features10 18.10.16

Oracle Patchset 12.1.0.2 introduced SHA-2 Support for 12C Password Version

– New additional Password Verifier respectively hash in spar4 column

Strong Password Verifiers by Default

– ALLOWED_LOGON_VERSION_SERVER defaults to 12 (use to be 8)

– By default just the 11g and 12c Password Verifier (Hash) is created

– 10g Password Verifier is only created with ALLOWED_LOGON_VERSION_SERVER set to 11

Higher Security but less compatibility

– There are still plenty of applications which can not handle case sensitive passwords

Page 11: DOAG Oracle 12c New Security Features soe

Authentication – Users

DOAG SIG Security - Oracle 12c New Security Features11 18.10.16

Lock inactive users eg. Lock user which have not logged in for n days

– Set INACTIVE_ACCOUNT_TIME in an Oracle Profile

– Value between 15 and 24855 or set to UNLIMITED

– LAST_LOGIN_TIME is used

New columns in dba_users according to cdenv.sql

– LOCAL_TEMP_TABLESPACE – Default local temporary tablespace for the user

– INHERITED – Was user definition inherited from another container

– DEFAULT_COLLATION – User default collation

– IMPLICIT – Is this user a common user created by an implicit application

Page 12: DOAG Oracle 12c New Security Features soe

Authentication – Proxy Authentication

DOAG SIG Security - Oracle 12c New Security Features12 18.10.16

Proxy Authentication is available since a couple of Releases and can be used for different use cases. eg. Multi Tier Application, Power User or DB Admin

– pass-through User User is not known to the application

– Application User identity is not known to the database

– Proxy User User is known in the database or the directory

Can be combined with

– Secure External Password Store

– Enterprise User Security

– Kerberos Authentication

Page 13: DOAG Oracle 12c New Security Features soe

Authentication – Proxy Authentication

DOAG SIG Security - Oracle 12c New Security Features13 18.10.16

Allow to limit login’s for a particular Schema eg. Application Schema

Feature is still not documented

SQL> ALTER USER hr PROXY ONLY CONNECT;

SQL> CONNECT hr/hrERROR:ORA-28058: login is allowed only through a proxy

Since Oracle 12c it is possible to define a PROXY ONLY CONNECT

– Only proxy authentication is possible, regular login’s are blocked

Proxy only Connect for the Application Schema HR

Page 14: DOAG Oracle 12c New Security Features soe

Authentication – Proxy Authentication

DOAG SIG Security - Oracle 12c New Security Features14 18.10.16

SQL> connect oehrli[scott]/managerERROR:ORA-28000: the account is lockedWarning: You are no longer connected to ORACLE.

SQL> SELECT username,account_status FROM dba_usersWHERE username IN ('OEHRLI','SCOTT')

USERNAME ACCOUNT_STATUS---------- ---------------SCOTT LOCKEDOEHRLI OPEN

User cannot be locked

SQL> ALTER USER hr CANCEL PROXY ONLY CONNECT;

Deactivate Proxy only

Page 15: DOAG Oracle 12c New Security Features soe

Authentication – Kerberos

DOAG SIG Security - Oracle 12c New Security Features15 18.10.16

[6809] 1473350974.161563: Resolving hostname mneme08.postgasse.org.[6809] 1473350974.162656: Sending initial UDP request to dgram 192.168.56.71:88[6809] 1473350974.163829: Received answer (1373 bytes) from dgram 192.168.56.71:88[6809] 1473350974.164486: Response was not from master KDC[6809] 1473350974.164533: Decoding FAST response[6809] 1473350974.164668: TGS reply is for [email protected] -> krbtgt/[email protected] with session key aes256-cts/9C94[6809] 1473350974.164745: Got cred; 0/Success[6824] 1473350974.172743: Storing [email protected] -> krbtgt/[email protected] in FILE:/u00/app/oracle/network/admin/krbcache

Revision of Kerberos stack (again… 🤔 )

– KERBEROS5PRE not used anymore

– Supports the MIT Kerberos 5 Release 1.8

– Supports the environment variable KRB5_TRACE ➡ finally some kind of a Kerberos Trace file

Page 16: DOAG Oracle 12c New Security Features soe

Authentication – Kerberos

DOAG SIG Security - Oracle 12c New Security Features16 18.10.16

Introduction of okcreate

– Simplify the creation of keytabs from the KDC or a service endpoint

– But okcreate does use ssh to get the keytab from KDC (MS AD and SSH!?)

Generic krb5.conf to enable realm and KDC information to be automatically retrieved from the DNS information

– Automatic KDC Discovery when Configuring OCI Clients

– No need to deploy krb5.conf file on Clients, just the sqlnet.ora with basic settings

– No krb5.conf means also less misconfiguration

Page 17: DOAG Oracle 12c New Security Features soe

Authentication – Kerberos

DOAG SIG Security - Oracle 12c New Security Features17 18.10.16

SQL> connect /@TDB12XConnected.SQL> show userUSER is "[email protected]"SQL> exitDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.0.2 - 64bit BetaWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsORA-24550: signal received: [si_signo=11] [si_errno=0] [si_code=128] [si_int=0] [si_ptr=(nil)] [si_addr=(nil)]kpedbg_dmp_stack()+400<-kpeDbgCrash()+210<-kpeDbgSignalHandler()+121<-skgesig_sigactionHandler()+272<-__sighandler()<-_int_free()+1040<-nauztk5adisconnect()+3900<-snau_dis()+1462<-nadisc()+323<-nsnadisc()+339<-nsclose()+723<-nioqds()+417<-upidhs()+213<-kpudtch()+513<-aficntdta()+107<-aficexf()+43<-aficex()+366<-afiexi()+1086<-aficmd()+2926<-aficfd()+3053<-aficdr()+151<-afidrv()+5613<-main()+105<-__libc_start_main()+253Segmentation fault (core dumped)

It does work sort of…

Quote: Kerberos is Hell, but as soon as it does work, it's nice and cosy...

…and now a bit cosier

Page 18: DOAG Oracle 12c New Security Features soe

Authentication – Enterprise User Security

DOAG SIG Security - Oracle 12c New Security Features18 18.10.16

dbca -silent -configureDatabase \-sourceDB TDB12X -sysDBAUserName sys -sysDBAPassword manager \-registerWithDirService true -dirServiceUserName cn=orcladmin -dirServicePassword manager -walletPassword TVD04manager \-databaseCN TE122

SSL / TLS Version and Vulnerabilities still somehow around

– LDAP Issue with EUS and SSL v3 Bug 19285025

Custom Name entry for the Database in the Oracle Directory

Undocumented Parameter in dbca -databaseCN

– Useful for Oracle DataGuard to register DB Unique Name

– Already available since 12.1 (hidden)

Page 19: DOAG Oracle 12c New Security Features soe

Authentication – Multitenant

DOAG SIG Security - Oracle 12c New Security Features19 18.10.16

Limited OS interactions

– External jobs that do not already have an operating system credential specified

– External table per-processors

– PL/SQL library executions

BEGIN DBMS_CREDENTIAL.CREATE_CREDENTIAL (credential_name => 'CDB1_PDB1_OS_USER', username => 'os_admin', password => 'password');

END;

Ability to Set the Identity of the Operating System User for PDBs

Define OS User by PDB_OS_CREDENTIAL Create a Credential with DBMS_CREDENTIAL.CREATE_CREDENTIAL

Page 20: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features20 18.10.16

Authorization

Page 21: DOAG Oracle 12c New Security Features soe

Authorization – READ / READ ANY

DOAG SIG Security - Oracle 12c New Security Features21 18.10.16

New READ Object Privilege and READ ANY TABLE System Privilege

Regular SELECT Privilege allows to

– LOCK TABLE table_name IN EXCLUSIVE MODE

– SELECT ... FROM table_name FOR UPDATE

READ Privilege allows to restrict access to queries only

Page 22: DOAG Oracle 12c New Security Features soe

Authorization – PDB Lockdown Profiles

DOAG SIG Security - Oracle 12c New Security Features23 18.10.16

PDB Lockdown Profiles to Restrict Operations on PDBs

– Restrict functionality available to users in a given PDB

– Eg. disable specific privileges of ALTER SYSTEM

– PDB profiles custom security policies for an application

– Designed for both Cloud and non-Cloud environments

Designed for Use Case where Identities are shared…

– … at os level when DB interact with OS

– ... at network level eg. Network access features like UTL_TCP, UTL_HTTP, etc

– ... Inside the DB when access common user or objects

– … when using administrative features and xml features

Page 23: DOAG Oracle 12c New Security Features soe

Authorization – PDB Lockdown Profiles

DOAG SIG Security - Oracle 12c New Security Features24 18.10.16

Default PDB Lockdown Profiles

PRIVATE_DBAAS, restrictions suitable for private Cloud DBaaS deployments

– Same DBA for all PDB, different User, different Applications

SAAS, restrictions suitable for SaaS deployments

– Same DBA for all PDB, different User, same Applications

PUBLIC_DBAAS, restrictions suitable for public Cloud DBaaS deployments

– Different DBA for each PDB, different User, different Applications

Page 24: DOAG Oracle 12c New Security Features soe

Authorization – PDB Lockdown Profiles

DOAG SIG Security - Oracle 12c New Security Features25 18.10.16

connect admin@pdb1ALTER SYSTEM SET PDB_LOCKDOWN = scott_pdb SCOPE = SPFILE; ALTER PLUGGABLE DATABASE scott_pdb CLOSE;ALTER PLUGGABLE DATABASE scott_pdb OPEN;

Enable lockdown profile at PDB level

CREATE LOCKDOWN PROFILE scott_pdb;ALTER LOCKDOWN PROFILE scott_pdb DISABLE STATEMENT = ('ALTER SYSTEM'); ALTER LOCKDOWN PROFILE scott_pdb ENABLE STATEMENT = ('ALTER SYSTEM') clause = ('kill session');

Create a lockdown profile

Page 25: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features29 18.10.16

Auditing

Page 26: DOAG Oracle 12c New Security Features soe

Auditing – Unified Audit

DOAG SIG Security - Oracle 12c New Security Features30 18.10.16

AUDIT POLICY audit_test01 BY USERS WITH GRANTED ROLES dba;

Enable it for all User having the DBA Role

CREATE AUDIT POLICY audit_test01 ACTIONS SELECT ON sys.user$;

Enable Audit Policy for Groups of users through roles

– New clause BY USERS WITH GRANTED ROLES for AUDIT and NOAUDIT

Define a new Audit Policy

Page 27: DOAG Oracle 12c New Security Features soe

Auditing – Unified Audit

DOAG SIG Security - Oracle 12c New Security Features31 18.10.16

SELECT * FROM audit_unified_enabled_policies;

USER_NAME POLICY_NAME ENABLED_OPT ENABLED_OPTION ENTITY_NAME ENTITY_TYPE SUC FAI---------- ------------------ ----------- --------------- ----------- ----------- --- ---

AUDIT_TEST01 INVALID BY GRANTED ROLE DBA ROLE YES YESALL USERS ORA_SECURECONFIG BY BY USER ALL USERS USER YES YESALL USERS ORA_LOGON_FAILURES BY BY USER ALL USERS USER NO YES

Additional Attributes in AUDIT_UNIFIED_ENABLED_POLICIES

– ENTITY_NAME captures the user name or role name.

– ENTITY_TYPE indicates if the entity name is a USER or a ROLE.

– ENABLED_OPT displays BY and EXCEPT for policies that are enabled on users, but displays INVALID for policies that are enabled on roles

Page 28: DOAG Oracle 12c New Security Features soe

Auditing

DOAG SIG Security - Oracle 12c New Security Features32 18.10.16

SQL> SELECT rls_info FROM unified_audit_trail WHERE rls_info IS NOT NULL;RLS_INFO------------------------------------------------------------((POLICY_TYPE=[3]'VPD'),(POLICY_SCHEMA=[6]'SECUSR'),(POLICY_NAME=[10]'EMP_POLICY

New Audit Events for Oracle Database Real Application Security

– AUDIT_GRANT_PRIVILEGE

– AUDIT_REVOKE_PRIVILEGE

Capture Oracle Virtual Private Database Predicates

– New column RLS_INFO in UNIFIED_AUDIT_TRAIL, DBA_AUDIT_TRAIL, V$XML_AUDIT_TRAIL and DBA_FGA_AUDIT_TRAIL

Page 29: DOAG Oracle 12c New Security Features soe

Auditing

DOAG SIG Security - Oracle 12c New Security Features33 18.10.16

Deprecation 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 an internal relational table

Page 30: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features34 18.10.16

Confidentiality of data

Page 31: DOAG Oracle 12c New Security Features soe

Confidentiality of data – TSDP

DOAG SIG Security - Oracle 12c New Security Features35 18.10.16

Define sensitive data types in the database and classify the data to be protect

Protecting a Class with appropriate TSDP policies

– Protection of data / columns with VPD or Data Redaction

– Use / definition of uniform policies for all classified data

Assignment of TSDP policies in other databases

– Company-wide protection of sensitive data

New TSDP Policies covering the following Security Features…

– Unified auditing policies

– Fine-grained auditing policies

– Transparent Data Encryption column encryption

Page 32: DOAG Oracle 12c New Security Features soe

Confidentiality of data – Data Redaction

DOAG SIG Security - Oracle 12c New Security Features36 18.10.16

Create Named Data Redaction Policy Expressions

– Reuse a named expression in multiple redaction policies

Additional Expression Function Support for Data Redaction Policies

– SYS_CONTEXT, XS_SYS_CONTEXT, SUBSTR, LENGTH, LENGTHB, LENGTHC, LENGTH2, and LENGTH4

Ability to Display Redacted Data Using Null Values

– New function parameter DBMS_REDACT.NULLIFY

Data Redaction Regular Expression Enhancements

– NCLOB and VCLOB data types

– New regular expression function types

Page 33: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features47 18.10.16

Network

Page 34: DOAG Oracle 12c New Security Features soe

Network

DOAG SIG Security - Oracle 12c New Security Features48 18.10.16

No ”New Security Features” – 12c Issues not yet verified

SSL / TLS Version and Vulnerabilities

– Poodle Vulnerability

– LDAP Issue with EUS and SSL v3 Bug 19285025

Memory Leak when using new SHA Checksums

Page 35: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features49 18.10.16

Other Stuff

Page 36: DOAG Oracle 12c New Security Features soe

Other Stuff

DOAG SIG Security - Oracle 12c New Security Features50 18.10.16

Multitenant now support Application containers

– User created CDB component to store data and metadata applications

– Kind of an application specific CDB within a CDB

– Can contain multiple PDB’s

– Single place to maintain Application

– Share Application metadata across multiple application

– Create new application based on a application seed

Actual use case is SaaS

Impacts different security Topics eg. Application Common Objects, Users, Roles,...

Page 37: DOAG Oracle 12c New Security Features soe

DOAG SIG Security - Oracle 12c New Security Features52 18.10.16

Conclusion

Not as many new security features as for Oracle 12c Release 1

– But a some meaningful improvements

– A few “must have” for the Cloud

Finally there seems to be a possibility to migrate existing Tablespaces to TDE

Time will show what’s in the official on premise release

Page 38: DOAG Oracle 12c New Security Features soe

Stefan OehrliSolution Manager / Trivadis Partner

Tel.: +41 58 459 55 [email protected]

18.10.16 DOAG SIG Security - Oracle 12c New Security Features53