Angel_Flores
4/3/2019 - 9:44 PM

authentication ldap

/
BEGIN 
DBMS_NETWORK_ACL_ADMIN.create_acl (
    acl          => 'ldap_acl_file.xml', 
    description  => 'ACL to grant access to LDAP server',
    principal    => 'APEX_LDAP_AUTH',
    is_grant     => TRUE, 
    privilege    => 'connect',
    start_date   => SYSTIMESTAMP,
    end_date     => NULL);
 
 DBMS_NETWORK_ACL_ADMIN.assign_acl (
    acl         => 'ldap_acl_file.xml',
    host        => 'ldap.example.com', 
    lower_port  => 389,
    upper_port  => NULL); 
    
  COMMIT;
END;
/
CREATE USER apex_ldap_auth IDENTIFIED BY 2345
  DEFAULT TABLESPACE TEMP
  QUOTA UNLIMITED ON temp_;.
/  
  
ALTER USER apex_ldap_auth ACCOUNT LOCK;
/
ALTER USER apex_ldap_auth ACCOUNT unLOCK;
/
grant create session to apex_ldap_auth;
/
grant connect to apex_ldap_auth;
/
grant create session, create any procedure to apex_ldap_auth identified by 2345;
/
GRANT EXECUTE ON apex_ldap_auth.ldap_auth TO schema_01;


alter session set current_schema = apex_ldap_auth;
/
grant execute on DBMS_NETWORK_ACL_ADMIN to schema_01;