Securing Oracle Connections
An Oracle connection (connection type Oracle, ORACLE-CONN-V2) can protect its traffic in two ways.
- Oracle native network encryption encrypts and checksums the session. It's negotiated with the server through the encryption settings on the connection. It doesn't verify the server's identity.
- TLS (TCPS) encrypts the session and verifies the server's certificate. It's set in the server secret, and the integration runtime must trust the certificate's issuer.
Native network encryption
The Oracle connection has four settings for native network encryption:
| Setting | Values |
|---|---|
| Encryption (Client) | accepted, requested, required or rejected |
| Encryption Types (Client) | A parenthesised list such as (AES256). Leave blank to offer every algorithm. |
| Crypto Checksum (Client) | accepted, requested, required or rejected |
| Crypto Checksum Types (Client) | A parenthesised list such as (SHA512). Leave blank to offer every algorithm. |
Encryption (Client) and Crypto Checksum (Client) default to required on new connections. A connection created before these settings were added negotiates as accepted until you set them, so native network encryption is off unless the server requests or requires it.
With required, the session is always encrypted: the connection succeeds against a server set to accepted (Oracle's default), requested or required, and fails with ORA-12660 against a server set to rejected. With accepted, native network encryption is on only if the server requests or requires it. Use accepted only for a server set to reject native network encryption.
TLS
You need an Oracle listener with a TCPS endpoint (commonly port 2484) and the certificate of the CA that issued the server's certificate.
Set the server secret
Store a TCPS connect descriptor in the Key Vault secret named by the connection's Server Secret Name:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=oracle.example.com)(PORT=2484))(CONNECT_DATA=(SERVICE_NAME=ORCLPDB1))(SECURITY=(SSL_SERVER_DN_MATCH=YES)))
SSL_SERVER_DN_MATCH=YES checks HOST against the certificate's common name or subject alternative names, so HOST must be a name or IP address in the certificate.
To accept only one certificate subject, add SSL_SERVER_CERT_DN to the SECURITY clause. The connection then fails with ORA-29003 for any other subject:
(SECURITY=(SSL_SERVER_DN_MATCH=YES)(SSL_SERVER_CERT_DN="CN=oracle.example.com,O=Example"))
Trust the certificate on a self-hosted integration runtime
Do this on every node of the integration runtime. If the node doesn't trust the issuing CA, the connection fails with ORA-00542 (SSL handshake failed).
Windows certificate store (recommended). Import the CA certificate into the local computer's Trusted Root Certification Authorities store. The connection string needs no extra settings.
Import-Certificate -FilePath C:\certs\oracle-ca.crt -CertStoreLocation Cert:\LocalMachine\Root
A CA distributed by Group Policy is usually already in this store.
Oracle wallet. Create an auto-login wallet (cwallet.sso) that holds the CA certificate as a trusted certificate. Put it in a folder the integration runtime service account (NT SERVICE\DIAHostService) can read, and add the folder to the SECURITY clause:
(SECURITY=(SSL_SERVER_DN_MATCH=YES)(WALLET_LOCATION=C:\OracleWallet))
Only the plain folder form works. The (SOURCE=(METHOD=...)) forms of WALLET_LOCATION, including METHOD=MCS, are rejected with ORA-50122.
Azure integration runtime
The Azure integration runtime can't use a wallet or your certificate store, so the server's certificate must be issued by a public CA. SSL_SERVER_DN_MATCH and SSL_SERVER_CERT_DN work the same way.
Troubleshooting
Data Factory reports most Oracle connection failures as ORA-50201. The underlying error code is at the end of the message.
| Error | Cause |
|---|---|
| ORA-12660 | The connection requires native network encryption or checksums, and the server rejects them. |
| ORA-12650 | The connection and the server have no encryption or checksum algorithm in common. |
| ORA-00542 | The integration runtime doesn't trust the server's certificate. |
| ORA-29003 | The server's certificate subject doesn't match SSL_SERVER_CERT_DN. |
| ORA-50122 | The server string uses a parameter Data Factory doesn't support. |