Activities of "vijay.nallala"

Answer

as sample below bind =BindAsync working cn.Bind(LdapAuthType.Digest, new LdapCredential { UserName = "username", Password = "clearTextPassword", AuthorizationId = "u:admin" });

how can i override from abp?

--- admin auth vs were abp override method?? await ldapConnection.BindAsync(LdapAuthType.Negotiate, new LdapCredential { // Configure username according to your LDAP config: // cn=admin,dc=abp,dc=com or just username. UserName = adminUserName, Password = adminPassword, AuthorizationId = baseDc,
});

--- user auth as below sample abp override method??

var searchResults = await ldapConnection.SearchAsync(baseDc, $"(&(objectClass=user)(cn={testUserName}))");

                //var searchResults = await ldapConnection.SearchAsync(baseDc, $"(&(uid={testUserName}))");
                Console.WriteLine();
                Console.WriteLine($"{testUserName} attributes:");
                
                var userEntry = searchResults.First();
                Console.WriteLine(string.Join(", ", userEntry.ToDirectoryEntry().Attributes));

                await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
                {
                    UserName = userEntry.Dn,
                    Password = testPassword
                });

here abp - not sure which one has user auth and admin auth call.. after that it make the entry in user table

public class LdapManager : ILdapManager, ITransientDependency { public ILogger<LdapManager> Logger { get; set; } protected ILdapSettingProvider LdapSettingProvider { get; }

public LdapManager(ILdapSettingProvider ldapSettingProvider)
{
    LdapSettingProvider = ldapSettingProvider;
    Logger = NullLogger&lt;LdapManager&gt;.Instance;
}

public virtual async Task&lt;bool&gt; AuthenticateAsync(string username, string password)
{
    try
    {
        using (var conn = await CreateLdapConnectionAsync())
        {
            await AuthenticateLdapConnectionAsync(conn, username, password);
            return true;
        }
    }
    catch (Exception ex)
    {
        Logger.LogException(ex);
        return false;
    }
}

protected virtual async Task&lt;ILdapConnection&gt; CreateLdapConnectionAsync()
{
    var ldapConnection = new LdapConnection();
    await ConfigureLdapConnectionAsync(ldapConnection);
    await ConnectAsync(ldapConnection);
    return ldapConnection;
}

protected virtual Task ConfigureLdapConnectionAsync(ILdapConnection ldapConnection)
{
    return Task.CompletedTask;
}

protected virtual async Task ConnectAsync(ILdapConnection ldapConnection)
{
    ldapConnection.Connect(await LdapSettingProvider.GetServerHostAsync(), await LdapSettingProvider.GetServerPortAsync());
}

protected virtual async Task AuthenticateLdapConnectionAsync(ILdapConnection connection, string username, string password)
{
    await connection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential()
    {
        UserName = username,
        Password = password
    });
}

}

Answer

Hi maliming,

As you see code/error getting from sample application(https://github.com/abpframework/abp-samples/tree/master/AbpLdapSample). we followed same document to enable the ldap. now we are getting same issue as (https://support.abp.io/QA/Questions/754/How-To-use--LDAP-authentication) for that and this issue looking for answer.

Question
  • ABP Framework version: 5.14
  • UI type: Angular / MVC / Blazor: MVC
  • DB provider: EF Core / MongoDB: EFCore
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no Yes
  • Exception message and stack trace: LdapForNet.LdapInvalidCredentialsException: 'Invalid Credentials. Invalid Credentials. Result: 49. Method: ldap_parse_result. Details: errorMessage: 8009030C: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 2030, v3839 matchedMessage: '
  • Steps to reproduce the issue:"This exception was originally thrown at this call stack: LdapForNet.Native.LdapNative.ThrowIfError(System.Runtime.InteropServices.SafeHandle, int, string, System.Collections.Generic.IDictionary<string, string>) LdapForNet.LdapConnection.ThrowIfParseResultError(System.IntPtr) LdapForNet.LdapConnection.BindAsync(LdapForNet.Native.Native.LdapAuthType, LdapForNet.LdapCredential) System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() AbpLdapSample.Program.Main(string[]) in Program.cs

I have refer below and nothing found solution. we are getting same issue Can you please provide updated fix? https://support.abp.io/QA/Questions/754/How-To-use--LDAP-authentication

sample out side https://www.codemag.com/article/1312041/Using-Active-Directory-in-.NET

I am not able see below folder . Can you please send what ever it was done from your end? also we are facing same issue on proxy as well. i guess it same lib causing both issues

angular.suite\schematics

I am not able see below folder . Can you please send what ever it was done from your end? also we are facing same issue on proxy as well. i guess it same lib causing both issues

angular.suite\schematics

just found below error - is that help to find out issues??

No - Can you please provide step to correct it what i am doing wrong. Is that possible we can connect on zoom or call or private call.. this is very critical now lot of entities need to update/added.

Can I provide the list entities what we need..

i have tried same but it not showing after.. it brand new project also not working

secondly, we are not unable to create the proxy for given controls.

yes - it was not giving any error. but nothing got created?

  1. Can you please taken my entity and replicated the same? if yes please provide the screen shot created crud page on angular.
  2. please see the folder after created the angular..
  3. we got enterprise level lic/price -- why can't connect with on zoom/call to resolve the issue???? this is not helping as enterprise customers..
  4. did anyone getting same issue??
  5. secondly, we are unable to create the proxy for given controls.

under angular folder

under dev-app

Hi @vijay.nallala,

Have you changed the location of angular folder?

no location and all same created from abp suite

Showing 11 to 20 of 49 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11