Replies: 1 comment
-
|
You are reading the docs correctly that the example snippet is a little confusing, but the bullet points below it clarify the real behavior:
So if your goal is LDAPS, then For confirming whether you are really using LDAPS:
About the That usually suggests the connection/bind may have succeeded far enough to reach the server, but the server is rejecting the operation afterward because something about the secure setup or bind context is not right. A few practical things I would verify:
Since both connections started failing when TLS was mixed between them, I would also avoid testing with one secure and one non-secure connection in the same script until the baseline works cleanly. I would first get one connection working with So in short:
If it helps, I’d test one connection first with the smallest possible query and verify that exact host can bind and search over LDAPS before reintroducing the second connection. If this helps, feel free to mark it as the answer so others can find it faster. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to update my connection to use LDAPS but I am confused about something in the documentation (https://ldaprecord.com/docs/core/v4/configuration) under the TLS & STARTTLS section.
This is a connection to a Windows AD instance (and my code is running on Windows Server using IIS).
There is this code snippet on that page
The way I am reading this, it makes it seem like if you set 'use_tls' to false, that enables using ldaps:// protocol.
However, a few lines under that, there is an info dialog that states "Only one can be set to true. You must choose either or."
That makes me think that setting one of those to true should turn it on.
Clarification on that would be helpful (though I did set use_tls to true and I believe it was trying to use ldaps:// protocol, though that leads me to my next question).
My bigger question is, how would I go about verifying that I am connecting to the AD using ldaps://?
Part of this is to confirm that I am, but the other part is to confirm if the one error I hit after trying to enable it for one script is because of the secure connection.
When I set use_tls to true for my one script, I retrieved the following error:
I am using 2 connections in this script and immediately after I set the use_tls to false for the one connection, I received the same error as above but at a different line which used the 2nd connection. Once I set use_tls to false for that connection, the script was able to successfully run.
The line that is causing the error from above is:
The line that causes the error when the first connection is set to use_tls false:
So one is trying to get computer info and the other is trying to get user info.
The connection information is a such (with use_tls being uncommented when I received the above error):
And my "connect" section is:
I had a different script I was using for testing and that seemed to work, but I could not figure out how to get some kind of output somewhere to confirm I was connecting using the ldaps:// protocol.
So I guess I have 2 or 3 questions in this.
As I have said in past questions I have opened, I really do appreciate this library and all the work you have put into.
Also, while I might be getting slightly better with programming, it is not my day job so forgive me if I need extra clarification.
Thanks,
Shark2k
Beta Was this translation helpful? Give feedback.
All reactions