"htmldb_ldap.is_member" supplied function and ORA-31202 error?
426850Jun 14 2006 — edited Jun 19 2006Since these are my test settings I can share in order to find what is wrong with the argument that I pass to htmldb_ldap.is_member supplied function. I recieved These information from our ldap administrator;
dn: cn=KatalogOkuma,ou=tutemaGroups,ou=Groups,dc=entp,dc=tgc
uniqueMember: uid=TYILMAZ,ou=people,o=turkcell,dc=entp,dc=tgc
objectClass: top
objectClass: groupofuniquenames
cn: KatalogOkuma
I followed the instructions at http://www.oracle.com/technology/products/database/application_express/howtos/how_to_ldap_authenticate.html and my ApEx application Authenticates from this test ldap server. But I also want the Authorization to be done by ldap so I will create an appropriete Authorization Scheme. The only example I could find was from Oracle Application Express Studio Tips & Tricks, How to use OID Groups to Manage HTML DB Security, Submitted by SCOTT SPENDOLINI as follows;
/*
FUNCTION IS_MEMBER RETURNS BOOLEAN
Argument Name Type Description
-------------- ------------------------------------------------
P_USERNAME VARCHAR2 HTML DB App User (:APP_USER)
P_PASS VARCHAR2 Password leave NULL
P_AUTH_BASE VARCHAR2 User Search Base parameter from OID
P_HOST VARCHAR2 Server name where OID is running
P_PORT VARCHAR2 Port OID is running on
P_GROUP VARCHAR2 OID Group Name
P_GROUP_BASE VARCHAR2 Group Search Base parameter from OID
return htmldb_ldap.is_member
(:APP_USER,
null,
'cn=users, dc=somedomain,dc=com',
'oidserver.somedomain.com',
'389',
'SAMPLE_APP_ADMINS',
'cn=Groups, dc=somedomain,dc=com');
*/
BEGIN
IF htmldb_ldap.is_member(p_username => 'TCHASYILMAZ',
p_pass => NULL, -- '123456',
p_auth_base => 'ou=people,o=turkcell,dc=entp,dc=tgc',
p_host => 'pergamum.sss.turkcell.tgc',
p_port => '389',
p_group => 'cn=KatalogOkuma',
p_group_base => 'ou=tutemaGroups,ou=Groups,dc=entp,dc=tgc') THEN
dbms_output.put_line('OK GO ON');
ELSE
dbms_output.put_line('SORRY, NOT OK');
END IF;
END;
My problem is if I leave p_pass to NULL then Authorization fails, and when I set the password for my test user that I was Authenticated this time I get ORA-31202 error.
Any comments will be welcomed :)
Thank you very much,
Best regards.
Tonguç