Nordes / IdentityServer4.LdapExtension

IdentityServer4 Ldap Extension (OpenLdap or ActiveDirectory)
MIT License
202 stars 62 forks source link

Wrong AD user returns token in Docker container #66

Open hernancantori opened 3 years ago

hernancantori commented 3 years ago

In local environment, tokens are generated sucessfully for existing AD users. When token is requerested for unexisting user or wrong password entered, server logs invalid_username_or_password, which is correct.

After publishing server in a docker container and requesting a token through connect/token endpoint, any value entered in username and password fields generates a token.

Any idea what I could be doing wrong?

Package used are the following:

"IdentityServer.LdapExtension" Version="2.1.49" "IdentityServer4" Version="2.4.0"

Local environment: image

Docker container image

Nordes commented 3 years ago

Probably you've done some wrong configuration when registering the service (startup.cs). On my end it seems to work ok. I didn't investigate much on your issue. I can try later. I am trying to upgrade for the 4.1.2 and i<ll see after.

Note that I don't have much time to maintain this project, so contributions are welcome.

Also, IdentityServer4 will be available only until nov. 2022 (see official website https://identityserver4.readthedocs.io/en/latest/)

hernancantori commented 3 years ago

Thanks for the quick response. After digging depper into the issue, I found out that the server is throwing an exception in the RegisterLdapConfigurations method, because apparently the configuration (IConfiguration configuration) is null.

Im checking if the dockerfile is well formed and if AppSettings.json file is being published inside the docker container.