Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
71 views2 pages

Ldap Oracle Apex Config

The document outlines the process of creating and configuring an Access Control List (ACL) for LDAP connections in a database. It includes steps for creating the ACL, assigning hosts and ports, and adding privileges for users. Additionally, it demonstrates how to connect to an LDAP server using specified credentials and then unbinds the session.

Uploaded by

simok111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views2 pages

Ldap Oracle Apex Config

The document outlines the process of creating and configuring an Access Control List (ACL) for LDAP connections in a database. It includes steps for creating the ACL, assigning hosts and ports, and adding privileges for users. Additionally, it demonstrates how to connect to an LDAP server using specified credentials and then unbinds the session.

Uploaded by

simok111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

BEGIN

--Create the ACL


dbms_network_acl_admin.create_acl(
acl => 'ldap',
description => 'ldap host',
principal => 'SYSTEM',
is_grant => TRUE,
privilege => 'connect'
);
END;
/
BEGIN
--Assign hosts and ports to the ACl
dbms_network_acl_admin.assign_acl(
acl => 'ldap',
host => '10.10.1.9',
lower_port => 389
);
-- add user to the acl
dbms_network_acl_admin.add_privilege(
acl => 'ldap',
principal => 'PUBLIC',
is_grant => TRUE,
privilege => 'connect'
);
END;
/

DECLARE

l_ldap_host VARCHAR2(256) := '10.10.1.9'; --Supplying the values

l_ldap_port VARCHAR2(256) := '389';

l_ldap_user VARCHAR2(256) := '[email protected]'; --


Supplying the values

l_ldap_password VARCHAR2(256) := 'MDP';

l_retval PLS_INTEGER;

l_session DBMS_LDAP.session;

BEGIN

-- Connect to the LDAP server.

l_session := DBMS_LDAP.init(hostname => l_ldap_host,

portnum => l_ldap_port);

l_retval := DBMS_LDAP.simple_bind_s(ld => l_session,

dn => l_ldap_user,

passwd => l_ldap_password);

dbms_output.put_line(l_retval);
l_retval := DBMS_LDAP.unbind_s(ld => l_session);

END;

You might also like