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 Team - LDAP Authentication: bug when using LDAP Username Edit Function

522277Dec 30 2008 — edited Jul 17 2009
Hi,
I have an application where I have to implement LDAP authentication. I am using the supplied "Show Login Page and Use LDAP Directory Credentials" Authentication Scheme from the Gallery and the 101 Login Page. When I try to log in, I get the following error messages:

ORA-01400: cannot insert NULL into ("FLOWS_030100"."WWV_FLOW_USER_ACCESS_LOG1$"."SECURITY_GROUP_ID")
ERR-10480 Unable to run authentication credential check function.
Return to application.
Location: f?p=400:101:3689887425104703¬ification_msg=Credenciais%20de%20Log-in%20Inv%C3%A1lidas/9C45F101210701893B3040F5D55AFF5C/

User objects are stored in different OUs, so I had to code this LDAP Username Edit Function:
CREATE OR REPLACE FUNCTION LDAP_DNPREP(p_username IN VARCHAR2) RETURN VARCHAR2 IS
    dn_ldap    VARCHAR2(100);
  BEGIN
    SELECT DN_LDAP INTO dn_ldap FROM SERVIDOR, LOTACAO WHERE SERVIDOR.ID_LOTACAO = LOTACAO.ID_LOTACAO AND USUARIO_LDAP = p_username;

    RETURN P_USERNAME || ',' || dn_ldap;
  END LDAP_DNPREP;
/
It works fine with the LDAP Test Tool.

When I code the OU directly into the LDAP DN String and leave the LDAP Username Edit Function blank, I can log in just fine - but only users belonging to that particular OU can successfully authenticate.
This is with Apex Application Express 3.1.2.00.02 running on top of Oracle XE.

Regards,

Georger
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2009
Added on Dec 30 2008
7 comments
2,896 views