Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

APEX interacting with Secure LDAP (Port 636) Microsoft ADS !

MK1Dec 2 2010 — edited Dec 3 2010
Hi,

I am trying to access the LDAP from APEX 3.2 application.
i am using oracle 11G database. And i am trying to communicate Microsoft ADS LDAP.

The APEX application authentication scheme does not support communicating to the secure LDAP 636 port, it supports communicating
with port 389 which is non-secure port for LDAP. I have to write a custom PL/SQL code to communicate with the SSL port.

So, i am writing a PL/SQL function to communicate with secure LDAP, once it works i can call the function from APEX authentication scheme

The things which i did are

1. Created a Wallet using Oracle Wallet Manager and imported the trusted certificate of the LDAP site. I need to create
a Wallet bcos i am accessing Microsoft ADS LDAP not Oracle Internet Directory (OID) LDAP
2. Saved the wallet file in Oracle defined location eg: C:\app\mycomp\product\11.2.0\dbhome_1\BIN\owm\wallets\mycomp

Ran the below code on the SQL Prompt:
DECLARE
vSession DBMS_LDAP.session;
vResult PLS_INTEGER;
BEGIN
DBMS_LDAP.use_exception := TRUE;
vSession := DBMS_LDAP.init
( hostname => 'abcd.com'
, portnum => 636
);
vResult := DBMS_LDAP.open_ssl
(
ld => vSession,
sslwrl => 'C:\app\mycomp\product\11.2.0\dbhome_1\BIN\owm\wallets\mycomp', -- Wallet location
sslwalletpasswd => 'oracle23', -- wallet password

sslauth => 2 -- 2 For Microsoft ADS
);

vResult := dbms_ldap.simple_bind_s( vSession, 'abc.def','password');


DBMS_Output.put_line('User authenticated!');

vResult := DBMS_LDAP.unbind_s(vSession);
END;


I see the below error:
ora-31202 DBMS_LDAP: LDAP client/server error: unknown error encountered
11:46 AM
ERROR at line 1:
ORA-31202: DBMS_LDAP: LDAP client/server error: UnKnown Error Encountered
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_LDAP", line 1457
ORA-06512: at "SYS.DBMS_LDAP", line 1234
ORA-06512: at line 10


Can anyone give the reason and suggestions for the above error ...

Thanks

Edited by: MadhuK1 on Dec 3, 2010 7:55 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2010
Added on Dec 2 2010
0 comments
495 views