Closed akhil closed 10 years ago
@akhil It's unclear what you are trying to accomplish. Are you wanting your normal DB user to authenticate against LDAP? Can you provide an example in the Oracle docs on how this is normally accomplished in other systems (e.g., jdbc)?
Here is how we handle this in java
jdbc.driver=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@ldap://192.168.123.123:312/CONTAINER_NAME,cn=OracleContext,dc=ora jdbc.username=user jdbc.password=pass
So what you've posed @medokin is not "LDAP Auth", but rather (I believe) an LDAP search against OID (Oracle's Directory) for the connection string. We use the same thing in my organization, and I have searched long and far for a way to make the Instant Client connect using an alias from LDAP, with no success.
One thing we've ended up doing is to use ldapjs to query OID directly at app-start. I can post that as a gist if you're interested.
If anyone knows how to get the Instant Client to leverage LDAP to get the connection string, I'd love to hear it.
@raztus
That explains a lot.
And yes, i'd like to see that gist. Thanks
Here ya go: https://gist.github.com/raztus/9962797
Not that in that code I was searching using an LDAP alias, and I wanted that alias dereferenced server-side, as opposed to having to do a second search. That required patching the ldapjs library, as noted in the code comments.
If you're unfamiliar with LDAP (I was when I put this together), I highly recommend downloading the Apache Directory Studio and trying your search there before you ever attempt it from ldapjs. That way you can make sure you're using the right search string and LDAP options.
Thanks for the tip. I'll look into it.
I think it should be added to README, that LDAP is not supported.
@akhil Closing this now since I don't know what you were really trying to achieve. Please post here if you'd like to clarify.
I'm in the same position @medokin was in: I have a JDBC URL specifying an LDAP lookup that I'd like to try to "port" for use with this driver. Assuming this is still unsupported?
LDAP connectivity is handled by Oracle Net, so it's unlikely that node-oracle needs to have anything special implemented. Both this unmaintained node-oracle driver (hint: don't use this for new work) and the new node-oracledb driver use OCI where the Oracle Net configuration files specify the LDAP connection, see http://stackoverflow.com/questions/31994159/how-do-you-connect-to-an-ldap-server-using-node-oracledb for the steps.
Sorry for posting it as an issue.
Is there a way to connect to oracle DB using LDAP for auth?