3 Replies Latest reply on Jul 11, 2014 5:22 AM by swesley_perth

    LDAP Connectionname / Connectionpassword - Eventstart

    pleNn

      Heyho,

       

      I got two questions for setting up my LDAP Connection:

       

      1. How can I put a connectionname and a connectionpassword to my init step.

       

                I tested DBMS_LDAP.init() already, but here I can only set hostname and port. But I need to add connectionname and password also.

       

      2. How is it possible to start the LDAP Session with the Application start?

       

                I want two establish the ldpa session once and then use this session for all users tryin to login in my application. Is there a possibility to start an event when my application get started or something?

       

       

      Oracle Version: 11g2 / Apex Version 4.2

       

      greetz

       

      pleNn

        • 1. Re: LDAP Connectionname / Connectionpassword - Eventstart
          swesley_perth

          Can you just do it declaratively?

          Grassroots Oracle: Using LDAP to authenticate your APEX users

           

          What is the intent behind your request? The book linked in the post describes how to replicate LDAP data using materialized views, which might be handy for what you need.

          • 2. Re: LDAP Connectionname / Connectionpassword - Eventstart
            pleNn

            heyho scott,

             

            I already used my own authentication scheme with apex functionality.

             

            For this authentication I used in my code the following:

             

            In the fist step I used hostname and the port.

             

                 1. L_SESSION := DBMS_LDAP.INIT(L_LDAP_ADDRESS, L_LDAP_PORT);

             

            After that, I was binding my session using user and password.

             

                 2. L_RETVAL := DBMS_LDAP.SIMPLE_BIND_S(L_SESSION,L_LDAP_USER,P_PASSWORD);

             

             

            This all worked fine with my test-ldap server. But for now I have to initialize the connection with a pwassword and and connectionuser, so that setting up a session is secured also.

             

            So i need something like:

             

                 L_SESSION := DBMS_LDAP.INIT(L_LDAP_ADDRESS, L_LDAP_PORT,CONNECTIONNAME,PASSWORD);

             

            Is there a function like that i can use?

             

            My second question:

             

            2. How is it possible to start the LDAP Session with the Application start?

             

                      I want two establish the ldpa session once and then use this session for all users tryin to login in my application. Is there a possibility to start an event when my application get started or something?

             

            I would like to start my session I set up with my connection name once I started the application. So I can use this session to handle all user-logins. So i dont have to do DBMS_LDAP.INIT every time i want to log in with an user.

             

            Hope my questions are clear now.

             

            pleNn

            • 3. Re: LDAP Connectionname / Connectionpassword - Eventstart
              swesley_perth

              1) I'm not familiar enough with DBMS_LDAP to help you out there, this is the place to go

              DBMS_LDAP PL/SQL Reference - 11g Release 1 (11.1.1)

               

              2) This won't be possible. APEX shares database connections within a pool. If you're after performance benefits - get a copy of the book and read the chapter showing how to replicate data from LDAP using materialised views.

              Pro Oracle Application Express