Skip to content

LDAP Support #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,22 @@ are supported by Oracle R2DBC:
- `HOST`
- `PORT`
- `DATABASE`
- The database option is interpreted as the
[service name](https://docs.oracle.com/en/database/oracle/oracle-database/21/netag/identifying-and-accessing-database.html#GUID-153861C1-16AD-41EC-A179-074146B722E6)
of an Oracle Database instance. _System Identifiers (SID) are not recognized_.
- `USER`
- `PASSWORD`
- `SSL`
- `CONNECT_TIMEOUT`
- `STATEMENT_TIMEOUT`.

> Oracle R2DBC interprets the `DATABASE` option as the
> [service name](https://docs.oracle.com/en/database/oracle/oracle-database/21/netag/identifying-and-accessing-database.html#GUID-153861C1-16AD-41EC-A179-074146B722E6)
> of an Oracle Database instance. _System Identifiers (SID) are not recognized_.
- `PROTOCOL`
- (For inclusion in the next release) Accepted protocol values are "tcps", "ldap", and "ldaps"

#### Support for Extended R2DBC Options
Oracle R2DBC extends the standard set of R2DBC options to offer functionality
that is specific to Oracle Database and the Oracle JDBC Driver. Extended options
are declared in the
[OracleR2dbcOptions](src/main/java/oracle/r2dbc/OracleR2dbcOptions.java)
class.
[OracleR2dbcOptions](src/main/java/oracle/r2dbc/OracleR2dbcOptions.java) class.

#### Configuring an Oracle Net Descriptor
The `oracle.r2dbc.OracleR2dbcOptions.DESCRIPTOR` option may be used to configure
Expand Down Expand Up @@ -234,6 +234,22 @@ located:
r2dbc:oracle://?oracle.r2dbc.descriptor=myAlias&TNS_ADMIN=/path/to/tnsnames/
```

#### (For inclusion in the next release) Configuring an LDAP URL
Use `ldap` or `ldaps` as the URL protocol to have an Oracle Net Descriptor
retrieved from an LDAP server:
```
r2dbc:oracle:ldap://ldap.example.com:7777/sales,cn=OracleContext,dc=com
r2dbc:oracle:ldaps://ldap.example.com:7778/sales,cn=OracleContext,dc=com
```
Use a space separated list of LDAP URIs for fail over and load balancing:
```
r2dbc:oracle:ldap://ldap1.example.com:7777/sales,cn=OracleContext,dc=com%20ldap://ldap2.example.com:7777/sales,cn=OracleContext,dc=com%20ldap://ldap3.example.com:7777/sales,cn=OracleContext,dc=com
```
> Space characters in a URL must be percent encoded as `%20`

An LDAP server request will **block a thread for network I/O** when Oracle R2DBC
creates a new connection.

#### Configuring a java.util.concurrent.Executor
The `oracle.r2dbc.OracleR2dbcOptions.EXECUTOR` option configures a
`java.util.concurrent.Executor` for executing asynchronous callbacks. The
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@
<arg>-Xlint:-processing</arg>
<arg>-Xlint:-serial</arg>
</compilerArgs>
<!-- LDAP URL tests require the java.naming module -->
<!-- Maven seems to ignore the forceJavacCompilerUse.
This results in an error when passing the addModules option to
the javax.tools API. For this reason, Oracle R2DBC's module-info is
declaring a depency on the java.naming module.
TODO: Figure out how to make maven compile tests correctly, and
remove the java.naming depenency from Oracle R2DBC.
<fork>true</fork>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<testCompilerArgument>- -add-modules java.naming</testCompilerArgument>
-->
<showWarnings>true</showWarnings>
<release>${java.version}</release>
</configuration>
Expand Down Expand Up @@ -150,6 +161,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<!-- Include tests in the oracle.r2dbc.test package -->
<includes>
<include>**/*Test.java</include>
<include>**/*TestKit.java</include>
Expand Down Expand Up @@ -278,7 +290,6 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<profiles>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
with oracle.r2dbc.impl.OracleConnectionFactoryProviderImpl;

requires java.sql;
requires java.naming;
requires com.oracle.database.jdbc;
requires reactor.core;
requires transitive org.reactivestreams;
Expand Down
Loading