Using SQL*Net Native Encryption with Direct TCP/IP

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
holger_nis
Posts: 7
Joined: Wed 26 Nov 2014 10:02

Using SQL*Net Native Encryption with Direct TCP/IP

Post by holger_nis » Wed 22 Sep 2021 08:43

Our customer wants to introduce SQL*Net native encryption by setting SQLNET.ORA server parameters
* SQLNET.ENCRYPTION_SERVER =ACCEPTED
* SQLNET.ENCRYPTION_TYPES_SERVER = AES256

How can we use this with ODAC and a direct TCP/IP connection?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by MaximG » Wed 22 Sep 2021 11:39

The process of using direct secure connection is described in detail in the documentation :

https://www.devart.com/odac/docs/ssl.htm

holger_nis
Posts: 7
Joined: Wed 26 Nov 2014 10:02

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by holger_nis » Thu 23 Sep 2021 07:10

The documentation you are referring to describes a manual setup using either an Oracle wallet or a certificate.
My question is regarding native encryption. When using either Oracle SQL*net or Oracle JDBC driver I only have to set two parameters in SQLNet.ora or JDBC configuration:
* SQLNET.ENCRYPTION_SERVER =ACCEPTED
* SQLNET.ENCRYPTION_TYPES_SERVER = AES256
I don't have to bother with wallets or certificates, everything is managed automatically by Oracle.
Our customers are asking if this can be used together with direct TCP/IP.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by MaximG » Mon 27 Sep 2021 12:25

Thanks for the clarifications!
You can try using Direct Mode to work with the given parameters. Please note that the OraNet.EncryptionLevel variable is responsible for using the SQLNET.ENCRYPTION_SERVER parameter in our components (the default value is slAccepted).
The encryption algorithm used by the client (analogous to SQLNET.ENCRYPTION_TYPES_SERVER) will be detected by our components automatically when trying to connect to the database server.

Feel free to contact us any time in case of any questions!

heidenbluth
Posts: 56
Joined: Mon 08 Nov 2004 19:01
Location: Germany

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by heidenbluth » Fri 29 Oct 2021 08:37

Thank you,

When enforcing required encryption

Code: Select all

OraNet.EncryptionLevel := slRequired;   
it works fine with direct TCP/IP.

Unfortunately, an encryption request such as

Code: Select all

OraNet.EncryptionLevel := slRequested;
OraNet.DataIntegrityLevel := slRequested;
doesn't work in conjunction with the following sqlnet server settings:

Code: Select all

SQLNET.ENCRYPTION_SERVER=ACCEPTED
SQLNET.ENCRYPTION_TYPES_SERVER=(AES256)
SQLNET.CRYPTO_CHECKSUM_SERVER=ACCEPTED
SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER=(SHA256)
I was checking

Code: Select all

SELECT NETWORK_SERVICE_BANNER from from v$session_connect_info
and for my session no network service adapter for encryption is listed.

When using similar SqlNet settings, the adapter is listed:

Code: Select all

SQLNET.ENCRYPTION_CLIENT=REQUESTED
SQLNET.ENCRYPTION_TYPES_CLIENT=(AES256)
SQLNET.CRYPTO_CHECKSUM_CLIENT=REQUESTED
SQLNET.CRYPTO_CHECKSUM_TYPES_CLIENT=(SHA256)
Can you please check this?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by MaximG » Tue 09 Nov 2021 10:20

Thank you for the information. We will investigate the described issue and let you know the results shortly.

heidenbluth
Posts: 56
Joined: Mon 08 Nov 2004 19:01
Location: Germany

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by heidenbluth » Wed 15 Dec 2021 06:14

Hasn't this been fixed in ODAC 12.0.2?
I am just wondering release notes do not mention.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Using SQL*Net Native Encryption with Direct TCP/IP

Post by MaximG » Wed 09 Feb 2022 13:06

No, it wasn't fixed in ODAC 12.0.2. We are working on the necessary changes.

Post Reply