-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.DirectoryServices.Protocols - Linux - kerberos(keytab) #48491
Comments
@birojnayak From looking at the source code, you will need to use AuthType.Kerberos as otherwise it just uses as simple bind and not a sasl bind. |
@stcpottdav I have tried that too, didn't work... have you tried, let me know.. if it works in your case |
In my case I haven't been able to get the ldapsearch utility working and have asked from help from another team. One general thing -> the search base must be an organizational unit. It doesn't support searching at the root of the domain as per #44826. The Error code gives some information for the actual error which can be found here: |
Can you try with latest 6.0 bits? That should translate the error code and also potentially provide more details. It might be in 6.0 preview 2. |
I have it working on buster, focal and alpine containers. Alpine was tricky as it also needed the KRB5CCNAME set. |
If you don't mind.. could you please share code snippet ? |
` public AppPermission GetPermissions(string username)
|
thank you guys.. it worked in my linux... the hint "One general thing -> the search base must be an organizational unit. It doesn't support searching at the root of the domain as per #44826 " was on the spot.. bdw why is that restriction? |
The end of #44826 has the workaround to the searching at domain level issue. If you add the environment variable LDAPREFERRALS=off to your container/OS it will work at the domain level. Hopefully this all gets fixed with v6 so there aren't workarounds necessary anymore. |
Correct me if I'm wrong, but seems like the main problem here was that the library didn't support searching on the root of the domain, and looks like that was fixed by turning off ldapreferrals, which @iinuwa has merged in 6.0 on PR #54380. That means that you shouldn't need to set the variable in your container any longer and should be able to search on the root of the domain again. Given this understanding, I'll go ahead and close this issue as resolved for now, but if I misunderstood anything please let me know and we can reopen this. |
Hi Guys,
We are planning to use System.DirectoryServices.Protocols to get claims info in CoreWCF.(CoreWCF/CoreWCF#265). I was doing a simple test to see if it supports keytab, couldn't make it work ?
Below query works in my Linux (I have Keytab and my KRB5_KTNAME is set to proper location)
But below snippet throws me below error,
So just checking if kerberos(keytab) is supported in Linux or I am doing something incorrect in my code ?
The text was updated successfully, but these errors were encountered: