Giter Site home page Giter Site logo

Comments (9)

Nordes avatar Nordes commented on May 20, 2024

from identityserver4.ldapextension.

AdamDurani avatar AdamDurani commented on May 20, 2024

from identityserver4.ldapextension.

Nordes avatar Nordes commented on May 20, 2024

Sorry for late reply,

Pull requests can be done from your own repository. You first need to fork, then be on the latest version + do your changes and then pull... normally it will shows into the pull request list.

from identityserver4.ldapextension.

Nordes avatar Nordes commented on May 20, 2024

Please, also give a full detail for your user properties. A user without a username is a bit problematic ;).

I will require the steps to reproduce locally. Thank you.

from identityserver4.ldapextension.

Nordes avatar Nordes commented on May 20, 2024

FYI: I received pullrequest from peoeple who don't have any access.

from identityserver4.ldapextension.

ttutko avatar ttutko commented on May 20, 2024

I just ran into this very thing after spending many hours thinking I was screwing up the appsettings configuration. The bug is in the SetBaseDetails method of ActiveDirectoryAppUser.cs. If DisplayName attribute is not present on the Active Directory user, then NullReferenceException is thrown when StringValue is accessed on line 130. A similar issue could happen with Username on line 131.

The steps to reproduce for me were:

  1. Stand up Windows Server 2019 Core instance (performed using a Hyper-V VM)
  2. Promote to domain controller
  3. Create a user using Powershell: New-ADUser -Name "testuser" -GivenName Test -SurName User -SamAccountName testuser -UserPrincipalName [email protected]
  4. Set password for user using Powershell: Set-ADAccountPassword "CN=testuser,CN=users,dc=mydomain,dc=local" -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "mypassword" -Force
  5. Enable the account: Enable-ADAccount -Identity testuser
  6. Attempt to login using the Sample project and you will simply get a Invalid Username/Password.

I have not created a PR on github in the past but I can look at doing so.

from identityserver4.ldapextension.

ttutko avatar ttutko commented on May 20, 2024

Note: My PR does not handle UserName attribute being null. I intentionally avoided changing that because if UserName is null then SubjectId won't be set and I think there will be a whole lot of other problems. Might be best to split that out into a separate issue and perhaps just update the returned error message (or at least log something better) that indicates something like "Required attribute 'UserName' is missing from the user's ActiveDirectory attributes."

from identityserver4.ldapextension.

dmitrydvm avatar dmitrydvm commented on May 20, 2024

I have same problem. @Nordes Please fix it.

from identityserver4.ldapextension.

Nordes avatar Nordes commented on May 20, 2024

Should now be available through Nuget.
https://www.nuget.org/packages/IdentityServer.LdapExtension/2.1.7

from identityserver4.ldapextension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.