Skip to content

Database Proxy: Oracle Database

The 12Port Database Proxy brokers native database connections. A user connects with their usual database client (SQL Developer, sqlplus, a JDBC application) to the 12Port Database Proxy instead of to the database. 12Port authenticates the user, checks their access to the database asset, and logs in to the database with the asset's own account. The user never sees or handles the database password; 12Port injects it into the backend login.

Every session is listed in 12Port and can be terminated by an Administrator. When the asset's access profile is enabled, the session is recorded as a readable, encrypted transcript of statements, bind values, result rows, row counts and errors, and each statement is saved as a session event.

The proxy is agentless meaning nothing is installed on the database server or on the user's computer.

This guide specifically covers Oracle Database usage through the 12Port Database Proxy.


How It Works

  1. The user's client connects to the 12Port Database Proxy port and names the database asset as the Oracle service name (or SID).
  2. The proxy recognizes the Oracle protocol, looks up the asset, and completes the protocol negotiation for the client.
  3. The client logs in with the user's personal 12Port account (not the database account). The proxy verifies the password in the database's own logon protocol (O5LOGON); the credential never travels over the network.
  4. 12Port authorizes the session: asset permissions, an approved access request where the asset requires one, the access profile, and MFA.
  5. The proxy connects to the database defined in the asset's URL, directly or through a peer gateway, over TCP or TCPS, with Oracle native network encryption where configured.
  6. The proxy logs in to the database with the asset's User and Password credentials.
  7. From then on, the proxy relays the client's traffic to the database unchanged and, when recording is on, writes a transcript and statement events as the session runs.
  8. When either side disconnects, or the session is terminated in 12Port, both connections close and the session is completed.

Because the client authenticates to 12Port and not to the database, the user needs no database account or password of their own, and the database account's password can be rotated by 12Port without notifying users.


Supported Databases and Clients

The proxy has been tested with:

Component Tested versions
Oracle Database 19c (19.3, Enterprise Edition, Windows), 23ai / 26ai Free (Linux)
JDBC thin driver (ojdbc) 23.7, 23.26
Oracle SQL Developer 26.2 (bundled JDK 17, ojdbc 23.7)
sqlplus (OCI) Oracle Instant Client 23 on Windows

Other clients built on ojdbc or OCI use the same protocol and are expected to behave the same way.

Logon methods: password logon (O5LOGON) only. Operating-system authentication, Kerberos, RADIUS and certificate (wallet) logon to the proxy are not currently supported.

One listening port serves every database type. The proxy recognizes the protocol from the client's first bytes; connections that are not Oracle connections are closed.


Requirements

  • 12Port tenant with the Database Proxy enabled (Configuration > Database Proxy).
  • A Database Access Server port assigned to the tenant and reachable from the users' clients.
  • Network access from the 12Port node (or from a peer gateway) to the database listener.
  • For each database: a database asset of the Oracle Database type (or a type based on it) with a valid database connection URL, a user name and a password.
  • For each user: a 12Port user account with permission and an appropriately configured access profile on the asset. The user must log in to the 12Port web portal one time before a proxy session can authenticate properly.

Configuration

1. Tenant port

Each tenant has its own Database Access Server port, assigned automatically starting from 15200. It is shown on the tenant's Configuration > Database Proxy page.

After changing a tenant's Database Access Server port, open the Database Proxy page and save it again so that the listener moves to the new port.

2. Database Proxy page

Open Configuration > Database Proxy.

Setting Description
Server Port The tenant's Database Access Server port (read-only). Can only be changed from the /base tenant.
Require TLS On (default): clients must connect over TLS (Oracle TCPS). Clients that connect over plain TCP are refused with ORA-12506. Off: clients may use TCP or TCPS.
Shared Sessions Across Programs On (default): Database tools often open several connections at once. DBeaver, for example, opens one to browse the database, one to read metadata, and one for each SQL editor. The proxy records all the connections of one client in a single session, so the user passes MFA once and the session is terminated as a whole. This setting decides whether other programs on the same client machine join that session too, for example sqlplus started from DBeaver's Execute in native client. See the Note on the bottom of this section for additional information.
Certificate subject, fingerprint, validity The certificate the proxy presents to TLS clients. The fingerprint is shown as SHA256:<HEX>.
Provide your certificate Generate a certificate automatically, keep the existing one, or import your own: PEM, PEM bundle (certificate chain and key) or PKCS#12.
Download certificate Downloads the proxy certificate, for clients that must trust it explicitly.
Enabled Starts or stops the tenant's Database Proxy listener.

A generated certificate names the 12Port host (the host of the tenant's URL) in its subject CN and subject alternative name. Clients that check the server name should connect to that host name.

Changes to the certificate or to Require TLS take effect for new connections immediately, without restarting the listener. Open sessions keep the settings they started with.

If Require TLS is on and no certificate exists yet, no client can connect. Save the page once with Generate certificate automatically selected.

Note

Additional comments about the Shared Sessions Across Programs parameter:

On (the default): a new connection joins the open session when it comes from the same 12Port user, to the same asset, from the same client IP address and the same operating system user. The program does not matter. The connection does not ask for MFA again, it is recorded in the same transcript under its own name (for example 4 sqlplus), and terminating the session closes it too.

Off: each program has its own session. A second program, such as sqlplus started from DBeaver, asks for MFA when it connects. If the MFA method cannot be completed from that program, its connection is refused.

What to consider

- No database client tells the proxy which program started it. With the setting on, the proxy cannot tell between sqlplus being started from DBeaver compared to sqlplus started manually on the same machine. Any program that connects as the same 12Port user from the same IP address and OS user while the session is open, or within a minute after its last connection closed, joins without MFA.
- Every connection still has to give the user's 12Port password. Only MFA is skipped.
- The operating system user is reported by the client and is not verified. Where many users share one IP address, for example on a terminal server or behind NAT, consider turning the setting off.
- Access is still checked for every connection. Each connection's program, machine and OS user are listed in the transcript and in the session events.

The setting applies to new connections as soon as it is saved; open sessions keep their configuration.

3. Database Assets

Create an asset of the Oracle Database type for each database.

Field Description
Name The name users connect with (see Naming the asset).
URL An Oracle JDBC URL naming the database host, port and service (or SID). See the forms below.
User The database account the proxy logs in as.
Password That account's password. 12Port can manage and rotate it like any other asset password.
Native Network Encryption Optional checkbox. When checked, the proxy encrypts and integrity-protects its connection to the database with Oracle native network encryption even when the database does not ask for it. Hidden by default in the asset type; make it visible in the asset type's field settings to use it.

Accepted URL Forms

Form Example
Easy Connect, service name jdbc:oracle:thin:@//db.contoso.com:1521/ORCLPDB
Easy Connect without // jdbc:oracle:thin:@db.contoso.com:1521/ORCLPDB
SID jdbc:oracle:thin:@db.contoso.com:1521:ORCL
TCP jdbc:oracle:thin:@tcp://db.contoso.com:1521/ORCLPDB
TCPS jdbc:oracle:thin:@tcps://db.contoso.com:2484/ORCLPDB
TCPS with a certificate subject check jdbc:oracle:thin:@tcps://db.contoso.com:2484/ORCLPDB?ssl_server_cert_dn="CN=db.contoso.com"
Connect descriptor jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db.contoso.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCLPDB)))
Connect descriptor, TCPS ...(ADDRESS=(PROTOCOL=TCPS)(HOST=db.contoso.com)(PORT=2484))...(SECURITY=(SSL_SERVER_CERT_DN="CN=db.contoso.com"))

The port defaults to 1521. A user/password before the @ is ignored; the proxy uses the asset's User and Password fields. TNS aliases (@MYDB) are not supported, because the proxy has no tnsnames.ora; use a connect descriptor instead.

For TCPS, the proxy accepts the database's certificate as-is. To pin the database's identity, add ssl_server_cert_dn to the URL (or SSL_SERVER_CERT_DN to the descriptor's SECURITY); the connection is then refused unless the certificate's subject matches.

4. Access control

The Database Proxy applies the same checks as the other available 12Port proxies.

Check Where it is configured Effect
Permission Asset or site roles The user needs a role on the asset, or a site role of Asset Manager or Administrator.
Access request Asset workflow Where the asset requires an approved request, the user must have one prior to connecting.
Access profile Asset's access profile Native Session = Deny refuses the connection. Native Session = Allow allows the connection, Native Session = Allow and Record and generates a session transcript. Keyboard = Record saves each statement as a session event. A user without an assigned access profile is refused.
MFA Tenant or user MFA policy The MFA code is appended to the user name (see User name).

Every refusal reaches the client as ORA-01017: invalid username/password; logon denied, the same answer as a wrong password, so a client cannot learn which check failed. The specific reason is written to the 12Port log.

5. User Transit Credential

Each user has a transit credential assigned in their 12Port profile at My Account > Profile > Transit Credentials. This is their personal password used to authenticate into 12Port and by the proxies. If one is not assigned, please click the available button and enter the current password.

A user without a transit credential cannot log in through the proxy.

6. Peer Gateways

A database that the 12Port node cannot reach directly can be reached through a peer gateway. Link the asset to a peer node (Manage > Peer Nodes) as for any other asset. The proxy then opens its connection to the database through the peer's HTTP proxy tunnel, and the session lists the peer as its gateway.

The URL's host and port are resolved by the peer, so they must be valid from the peer's network. For example, 127.0.0.1 in the URL means the peer itself.

A change to an asset's peer link applies to new connections within 10 seconds.


Connecting

Naming the Asset

The database client utilizes the 12Port Asset Name as the Oracle service name (or SID):

  • The name is matched exactly against asset names, ignoring case. Assets in personal spaces are not supported.
  • The asset's id (a UUID) can be used instead of its name.
  • A # in an asset name must be written as \# in the service name.

If several assets share a name and also share the same site, URL and peer, the user's permissions determines the one asset the user may use, is then connected. If the same-named assets differ, or the user may use more than one of them, the connection is refused. Rename one of the assets, or connect by unique asset ID instead.

Username

The user name is the user's 12Port user name:

[DOMAIN\]user[?code]
Part Meaning
DOMAIN\ The directory domain for directory users, for example CORP\alice. Omit it for local users.
user The 12Port user name.
?code The current MFA code, when MFA is required. &code works the same way.

The password is the user's personal password for 12Port authentication.

Characters such as \, ? and @ have a meaning to some clients. Quote the user name where the client requires it, for example in sqlplus:

sqlplus '"CORP\alice?123456"'@//proxy.contoso.com:15200/oracle-prod

Connection Examples

In the examples, proxy.contoso.com is the 12Port host, 15200 the tenant's Database Access Server port, and oracle-prod the asset name.

JDBC (ojdbc thin), TLS required

jdbc:oracle:thin:@tcps://proxy.contoso.com:15200/oracle-prod

The Java runtime must trust the proxy certificate. Either import the downloaded certificate into a trust store and pass it to the JVM:

-Djavax.net.ssl.trustStore=/path/to/proxy-truststore.p12
-Djavax.net.ssl.trustStoreType=PKCS12
-Djavax.net.ssl.trustStorePassword=<trust store password>

or, on Windows, import it into the Windows certificate store and use -Djavax.net.ssl.trustStoreType=Windows-ROOT.

When the client connects by IP address or by a name that is not in the certificate, name the certificate subject explicitly:

jdbc:oracle:thin:@tcps://192.0.2.10:15200/oracle-prod?ssl_server_cert_dn="CN=proxy.contoso.com"

JDBC, TLS not required

jdbc:oracle:thin:@//proxy.contoso.com:15200/oracle-prod

SQL Developer

Create a connection with:

Field Value
Username The 12Port user name, for example alice or CORP\alice
Password The 12Port user's password
Connection Type Basic (plain TCP) or Custom JDBC (TCPS)
Hostname / Port / Service name proxy.contoso.com / 15200 / oracle-prod

For TCPS, use the Custom JDBC URL from the JDBC example above and make SQL Developer's JVM trust the proxy certificate (for example AddVMOption -Djavax.net.ssl.trustStoreType=Windows-ROOT in sqldeveloper.conf after importing the certificate into the Windows store).

sqlplus, TLS required

Import the proxy certificate into the trusted root store (on Windows, the Local Machine Trusted Root Certification Authorities store), then use a tnsnames.ora entry:

ORACLE_PROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCPS)(HOST = proxy.contoso.com)(PORT = 15200))
    (CONNECT_DATA = (SERVICE_NAME = oracle-prod))
    (SECURITY = (SSL_SERVER_CERT_DN = "CN=proxy.contoso.com")))
sqlplus alice@ORACLE_PROD

SSL_SERVER_CERT_DN is needed when the client's host name does not match the certificate (for example, when connecting by IP address).

sqlplus, TLS not required

sqlplus alice@//proxy.contoso.com:15200/oracle-prod

Connection Cases

The client's connection to the proxy and the proxy's connection to the database are independent. Each can use TCP or TLS, and the database connection can also use native network encryption.

Client to Proxy

Client connects with Require TLS on Require TLS off
TCP Refused: ORA-12506 Connected
TCPS (TLS) Connected Connected

The client connection never uses Oracle native network encryption, instead use TLS to protect it. A client configured to require native encryption (SQLNET.ENCRYPTION_CLIENT = required) cannot connect through the proxy. The default (accepted) works.

Proxy to Database

Asset URL Database setting Native Network Encryption field Proxy to database connection
TCP No encryption configured Off Plain TCP
TCP Encryption or integrity requested or required Any Native network encryption, negotiated with the database
TCP No encryption configured On Native network encryption, requested by the proxy
TCPS No encryption configured Off TLS
TCPS Encryption required Any Depends on the database version. Oracle 23ai and later: TLS, with native network encryption inside it. Oracle 19c: refused by the database, which rejects TCPS while native encryption is required, for every client, not only through the proxy. On 19c, use either TCPS or required native encryption, not both.

With native network encryption, the proxy offers only FIPS-approved algorithms:

Service Algorithms, in order of preference
Encryption AES256, AES192, AES128 (CBC)
Integrity SHA512, SHA384, SHA256
Key exchange Diffie-Hellman with the database's 2048-bit group

A database whose SQLNET.ENCRYPTION_TYPES_SERVER or SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER allows none of these refuses the connection, and the 12Port log names the reason.

To confirm what a session negotiated, run in that session:

select network_service_banner from v$session_connect_info
 where sid = sys_context('userenv', 'sid');

The result describes the proxy's connection to the database, for example AES256 Encryption service adapter and SHA512 Crypto-checksumming service adapter. The query needs SELECT on V$SESSION_CONNECT_INFO.

Through a Peer Gateway

Every case above also works through a peer gateway. The TLS or native encryption runs end to end between the proxy and the database, inside the peer's tunnel.

Canceling a running statement

A client's cancel request (JDBC Statement.cancel(), Ctrl+C in sqlplus) is relayed to the database, which stops the statement with ORA-01013; the session stays open. With native network encryption, the proxy keeps its encryption in step with the cancel.

SQL Developer's Cancel button resets its own connection to stop a statement. It does this with or without the proxy, and the statement then shows in the transcript without a response.


Sessions

Each connection that passes authorization becomes a 12Port session:

Property Value
Channel DBP:Oracle
Account The asset's database account
Gateway The 12Port node and Database Access Server port, or the peer gateway
Status Active while connected; Completed when closed; Terminated when ended from 12Port
  • Terminate: terminating the session in 12Port closes both connections within a few seconds; the client sees a lost connection (for example ORA-03113). A terminated session stays Terminated.
  • Sessions report: the asset view of an Oracle Database asset includes the Sessions report.
  • Failed backend logins: when the database rejects the asset's account (for example after its password was changed outside 12Port), the session records an error event with the database's message, and the client receives ORA-01017.

Recording

Recording is controlled by the user's access profile assigned on the asset:

Access profile setting What is recorded
Native Session = Allow and Record An encrypted transcript of the session, downloadable from the session list.
Keyboard = Allow and Record Each statement as a session event.
Both Both.

Recording observes the relayed traffic without changing it. If part of the traffic cannot be read, the transcript says so and the session continues unaffected.

Transcript

The transcript is plain text where comment lines start with --, statements are written as sent, and result rows are written as CSV.

-- 12Port database session 6f1c...
-- user alice as APP_OWNER on asset oracle-prod (DBP:Oracle)
-- started 2026-11-12 09:41:58
-- 2026-11-12 09:42:00.577 #1 QUERY
select id, name, created from customers where region = :1
-- binds: EMEA
-- columns: ID NUMBER, NAME VARCHAR2, CREATED DATE
ID,NAME,CREATED
1,Acme,2024-02-29 00:00:00
2,Globex,2025-01-15 00:00:00
-- 2 rows
-- 2026-11-12 09:42:05.102 #2 CHANGE
update customers set name = :1 where id = :2
-- binds: Acme Ltd, 1
-- 1 row affected
-- 2026-11-12 09:42:05.140 #3 TRANSACTION
COMMIT
-- done
-- 2026-11-12 09:42:09.881 #4 QUERY
select * from no_such_table
-- error 942: ORA-00942: table or view does not exist
-- 2026-11-12 09:42:12.003 logoff

For each statement, the transcript records:

Item Recorded as
Time and sequence -- <time> #<n> <kind>
Statement text As sent by the client, including PL/SQL blocks
Bind values -- binds: ..., in bind order. NULL is shown as empty.
Result columns Name and type
Result rows CSV, up to the row limit
Outcome Row count (5 rows, 1 row affected), done, or error <code>: <message>

Statement kinds:

Kind First keyword
QUERY SELECT, WITH, VALUES, TABLE
CHANGE INSERT, UPDATE, DELETE, MERGE, UPSERT, REPLACE, COPY
DEFINITION CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE, RENAME, COMMENT, AUDIT, NOAUDIT, PURGE, FLASHBACK
CALL BEGIN, DECLARE, CALL, EXEC, EXECUTE, DO
TRANSACTION COMMIT, ROLLBACK, SAVEPOINT, START, END, SET TRANSACTION
OTHER Anything else

Limits

Limit Value In the transcript
Text value size 64 KB Larger values are recorded as type and size, for example <VARCHAR2 70000 bytes>
Binary and LOB values Always Recorded as type and size, for example <CLOB 300 chars>, <BLOB 70000 bytes>, <RAW 3 bytes>
Rows per result 1000 -- rows after the first 1000 are counted, not recorded; the total count is always recorded, for example -- 1500 rows, 1000 recorded

Statement Events

With Keyboard = Allow and Record, each statement is saved as a session event when the database has answered it:

Statement kind Event type
QUERY SqlQuery
CHANGE SqlChange
DEFINITION SqlDefinition
CALL SqlCall
TRANSACTION SqlTransaction
OTHER SqlOther

The event holds the statement text (up to 4000 characters), its start and end time, and its row count.

Recording Cases

Case How it is recorded
Query Columns, rows (to the limit), total row count
Large result fetched in several round trips One statement with all its rows, including rows that repeat values from the previous row
INSERT, UPDATE, DELETE, MERGE Bind values and the number of rows affected
DDL Statement and done
PL/SQL block or procedure call Statement, IN bind values, and done
OUT bind (:x set by PL/SQL) Shown in the binds as empty (ojdbc) or <OUT> (sqlplus); OUT values are not written to the transcript
CLOB or BLOB column in a result <CLOB n chars> or <BLOB n bytes>; content is not recorded
LOB bound as a LOB object (setClob, setBlob, sqlplus variable x clob) <CLOB> or <BLOB>
Text over 32 KB bound with setString or a stream <TEXT n bytes> or <LONG RAW n bytes>
sqlplus set serveroutput on The DBMS_OUTPUT.GET_LINES call sqlplus makes after each statement is recorded as a CALL; the output lines themselves are not recorded
Database error -- error <code>: <message>
Commit and rollback TRANSACTION statements
Statement cancelled by the client The statement, then the database's ORA-01013
Connection closed before the database answered -- no response: the session ended before the database answered
Native network encryption on the database connection Recorded the same as without encryption
Through a peer gateway Recorded the same as a direct connection
End of session -- <time> logoff

The same session gives the same transcript whether the client is ojdbc or sqlplus, and whether the database is 19c or 23ai.

Not Recorded

  • The content of LOB values, and of LOB reads and writes (DBMS_LOB, client LOB streaming); only types and sizes are recorded.
  • OUT bind values and DBMS_OUTPUT text.
  • Values in object-type and collection columns, beyond their type and size.
  • Calls that are not SQL statements, such as session property changes made by the driver.

When part of a request or response cannot be read, the transcript notes it in place, for example -- a request could not be read (...) or -- the response could not be read (...), followed by the number of rows recorded before that point.

Viewing and Storing Transcripts

Transcripts are stored encrypted in the 12Port recordings directory location, one file per session. Download a session's transcript from the Session Report list. When recording is off, a transcript is not written, saved, or stored.


Troubleshooting

Errors the Client Sees

Error Meaning What to check
ORA-12506 The client connected over TCP and the proxy requires TLS. Use TCPS, or turn Require TLS off.
ORA-12514 No asset matches the service name, the asset's URL is missing or not an Oracle URL, or same-named assets differ. The service name equals the asset name (or id); the asset has a valid Oracle URL; asset names are unique.
ORA-01017 Wrong user name or transit credential retrieved; the user was denied by a 12Port check (permission, access request or access expiration, access profile, MFA, ambiguous asset); or the database rejected the asset's account. The user's transit credential; the user's role on the asset; an approved request if required; the access profile's Native Session setting; the MFA code suffix; the asset's User and Password (the session shows an error event). The 12Port log may capture the reason.
Connection closed during login (ojdbc: ORA-17002) The proxy could not complete the database connection. Database host and port reachable from 12Port (or from the peer); TCPS certificate subject if ssl_server_cert_dn is set; the database's native encryption settings; 19c with TCPS and required native encryption.
ORA-03113 / connection lost The session was terminated in 12Port, or the database closed the connection. The session list and the 12Port log.
Database errors (ORA-0xxxx) Returned by the database and relayed as is. The statement.

A TLS client that does not trust the proxy certificate fails before reaching the proxy (for example ORA-29002, ORA-17965, ORA-28759, or a Java PKIX path building failed). Trust the downloaded proxy certificate, and connect by a host name in the certificate or set the certificate subject explicitly.

Logging

The proxy logs to the 12Port log under com.otna.proxy.db. To diagnose a problem, set that logger to DEBUG in the 12Port Logger configuration on the /base tenant. DEBUG logging includes the connection steps, the reason for every refusal, the negotiated native encryption, and recording notes.


Security notes

  • Users never receive the database account's password, instead the proxy injects it into the backend login.
  • The user's transit credential is checked in the Oracle logon protocol and is not sent over the network. A wrong password, an unknown user, and a denied user all receive the same ORA-01017.
  • Use Require TLS (ON by default) so the client connection is encrypted, when the database client supports it natively. Use TCPS or native network encryption so the database connection is encrypted.
  • Native network encryption uses FIPS-approved algorithms only.
  • Transcripts are encrypted at rest. Session events contain statement text, so protect access to session data accordingly.